Skip to content

Commit 314df20

Browse files
authored
Create alice-and-bob-playing-flower-game.cpp
1 parent 093867e commit 314df20

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)