Problem ID string | Problem string | in string | Solution string | cpp string | out string | Images sequence |
|---|---|---|---|---|---|---|
B | *Nim Sum Dim Sum*, a bustling local dumpling restaurant, has two game theory-loving servers named, you guessed it, Alice and Bob. Its dining area can be represented as a two-dimensional grid of \(R\) rows (numbered \(1..R\) from top to bottom) by \(C\) columns (numbered \(1..C\) from left to right\).
Currently, both o... | 600
2 2 1 1
2 3 1 1
2 3 1 2
2 4 1 1
2 4 1 2
2 4 1 3
2 100 1 1
2 100 1 2
2 100 1 3
2 100 1 99
2 999999999 1 1
2 999999999 1 2
2 999999999 1 3
2 999999999 1 999999998
2 1000000000 1 1
2 1000000000 1 2
2 1000000000 1 3
2 1000000000 1 999999999
3 2 1 1
3 2 2 1
3 3 1 1
3 3 1 2
3 3 2 1
3 3 2 2
3 4 1 1
3 4 1 2
3 4 1 3
3 4 2 1... | If Alice reaches row \(R\) before Bob reaches row \(C\), then it's game over for Alice. Since each player now wants to get to the finish as slowly as possible, both have a simple dominating strategy of only moving \(1\) unit in their direction each turn, and \(R\) and \(C\) are the only things that matter.
If \(R \le ... | #include <iostream>
using namespace std;
int main() {
int T;
cin >> T;
for (int t = 1; t <= T; t++) {
cout << "Case #" << t << ": ";
int R, C, A, B;
cin >> R >> C >> A >> B;
cout << (R > C ? "YES" : "NO") << endl;
}
return 0;
}
| Case #1: NO
Case #2: NO
Case #3: NO
Case #4: NO
Case #5: NO
Case #6: NO
Case #7: NO
Case #8: NO
Case #9: NO
Case #10: NO
Case #11: NO
Case #12: NO
Case #13: NO
Case #14: NO
Case #15: NO
Case #16: NO
Case #17: NO
Case #18: NO
Case #19: YES
Case #20: YES
Case #21: NO
Case #22: NO
Case #23: NO
Case #24: NO
Case #25: NO
Ca... | [
"852013469652032.jpg",
"842253013944047.jpg"
] |
C | "“An apple a day keeps the doctor away” is Steve’s motto. His other motto, “You can never ha(...TRUNCATED) | "90\n3\n6 3 1 2 5\n2\n7 7 7\n1\n1\n3\n1 9 1 1 4\n4\n1 9 1 1 4 9 9\n4\n1 9 10 1 4 6 9\n3\n1000000000 (...TRUNCATED) | "If there's only one element, we don't care what it is, a \\(1\\) will match it. \n\nOtherwise, let'(...TRUNCATED) | "#include <algorithm>\n#include <iostream>\n#include <vector>\nusing namespace std;\n\nconst int INF(...TRUNCATED) | "Case #1: 4\nCase #2: 7\nCase #3: 1\nCase #4: -1\nCase #5: 6\nCase #6: -1\nCase #7: 1000000002\nCase(...TRUNCATED) | [
"1563872647765708.jpg"
] |
D | "You and your friends have drawn a really big connected graph in sidewalk chalk with \\(N\\) nodes ((...TRUNCATED) | "160\n13 15\n1 2\n2 3\n2 4\n4 5\n3 5\n5 6\n6 7\n6 8\n8 9\n8 12\n8 13\n9 10\n10 11\n11 12\n12 13\n5\n(...TRUNCATED) | "It's easier to think about this problem if instead of thinking about which foot we're standing on, (...TRUNCATED) | "#include <algorithm>\n#include <iostream>\n#include <queue>\n#include <set>\n#include <vector>\nusi(...TRUNCATED) | "Case #1: 5\nCase #2: -2\nCase #3: -2\nCase #4: 0\nCase #5: 270676\nCase #6: 121294\nCase #7: 305198(...TRUNCATED) | [
"903178538089777.jpg"
] |
A1 | "*This problem shares some similarities with A2, with key differences in bold.*\n\nProblem solving s(...TRUNCATED) | "79\n1 1 3\n0 2 4\n5 5 1\n0 1 1\n1 1 2\n97 1 99\n97 1 100\n100 100 1\n1 1 100\n73 11 11\n51 80 87\n9(...TRUNCATED) | "Each single provides \\(2\\) buns and \\(1\\) patty. Each double provides \\(2\\) buns and \\(2\\) (...TRUNCATED) | "#include <iostream>\nusing namespace std;\n\nint main() {\n int T;\n cin >> T;\n for (int t = 1;(...TRUNCATED) | "Case #1: YES\nCase #2: NO\nCase #3: YES\nCase #4: YES\nCase #5: YES\nCase #6: YES\nCase #7: NO\nCas(...TRUNCATED) | [
"1367507087507489.jpg"
] |
A2 | "*This problem shares some similarities with A1, with key differences in bold.*\n\nProblem solving s(...TRUNCATED) | "80\n2 3 5\n2 3 2\n2 3 1\n5 1 100\n1 3 100\n1 1 1000000000000\n314 512 1024\n10 13 11234567890\n1000(...TRUNCATED) | "Let's think about what ingredient is limiting us. If we've bought \\(0\\) singles, we're limited by(...TRUNCATED) | "#include <algorithm>\n#include <iostream>\nusing namespace std;\n\nusing int64 = long long;\n\nint6(...TRUNCATED) | "Case #1: 3\nCase #2: 1\nCase #3: 0\nCase #4: 199\nCase #5: 100\nCase #6: 1999999999999\nCase #7: 3\(...TRUNCATED) | [
"181863494933248.jpg"
] |
No dataset card yet
- Downloads last month
- 34