We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 093867e commit 314df20Copy full SHA for 314df20
C++/alice-and-bob-playing-flower-game.cpp
@@ -0,0 +1,10 @@
1
+// Time: O(1)
2
+// Space: O(1)
3
+
4
+// combinatorics
5
+class Solution {
6
+public:
7
+ long long flowerGame(int n, int m) {
8
+ return (1ll * n * m) / 2;
9
+ }
10
+};
0 commit comments