QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#217338 | #5578. Blueberry Waffle | Viktor# | AC ✓ | 0ms | 3720kb | C++14 | 461b | 2023-10-16 19:27:31 | 2023-10-16 19:27:32 |
Judging History
answer
#include <iostream>
using namespace std;
int main() {
long r;
short f, state=0;
cin >> r >> f; //Input
//Check for the rest
if (f % r > r/2) { state = 1; }
f /= r;
//Rotate for the remaining
if (f % 2) {
if (state) { cout << "up" << endl; }
else { cout << "down" << endl; }
}
else {
if (state) { cout << "down" << endl; }
else { cout << "up" << endl; }
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3716kb
input:
10 20
output:
up
result:
ok single line: 'up'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
10 34
output:
down
result:
ok single line: 'down'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
10 47
output:
down
result:
ok single line: 'down'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
249 9462
output:
up
result:
ok single line: 'up'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
165 3795
output:
down
result:
ok single line: 'down'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
612 612
output:
down
result:
ok single line: 'down'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
278 8340
output:
up
result:
ok single line: 'up'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
267 4539
output:
down
result:
ok single line: 'down'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
357 2856
output:
up
result:
ok single line: 'up'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
490 7840
output:
up
result:
ok single line: 'up'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
408 5304
output:
down
result:
ok single line: 'down'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
501 3507
output:
down
result:
ok single line: 'down'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
882 882
output:
down
result:
ok single line: 'down'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
144 4608
output:
up
result:
ok single line: 'up'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
358 2506
output:
down
result:
ok single line: 'down'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
557 6684
output:
up
result:
ok single line: 'up'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
968 1936
output:
up
result:
ok single line: 'up'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
852 6816
output:
up
result:
ok single line: 'up'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
104 5635
output:
up
result:
ok single line: 'up'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
998 8295
output:
up
result:
ok single line: 'up'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
456 5963
output:
down
result:
ok single line: 'down'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
518 7276
output:
up
result:
ok single line: 'up'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
610 3313
output:
down
result:
ok single line: 'down'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
53 1221
output:
down
result:
ok single line: 'down'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
700 3028
output:
up
result:
ok single line: 'up'
Test #26:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
40 2015
output:
up
result:
ok single line: 'up'
Test #27:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
715 333
output:
up
result:
ok single line: 'up'
Test #28:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
734 8269
output:
down
result:
ok single line: 'down'
Test #29:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
662 9398
output:
up
result:
ok single line: 'up'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
925 4763
output:
down
result:
ok single line: 'down'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
12 2725
output:
down
result:
ok single line: 'down'
Test #32:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
829 1660
output:
up
result:
ok single line: 'up'
Test #33:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
724 6100
output:
up
result:
ok single line: 'up'
Test #34:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
179 5179
output:
down
result:
ok single line: 'down'
Test #35:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
393 8978
output:
down
result:
ok single line: 'down'
Test #36:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
28 3993
output:
down
result:
ok single line: 'down'
Test #37:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
302 4489
output:
down
result:
ok single line: 'down'
Test #38:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
971 8381
output:
down
result:
ok single line: 'down'
Test #39:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
503 9391
output:
down
result:
ok single line: 'down'
Test #40:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
443 7966
output:
up
result:
ok single line: 'up'
Test #41:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
767 6533
output:
down
result:
ok single line: 'down'
Test #42:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
167 9494
output:
down
result:
ok single line: 'down'
Test #43:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
750 8639
output:
up
result:
ok single line: 'up'
Test #44:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
787 9415
output:
up
result:
ok single line: 'up'
Test #45:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
106 9826
output:
down
result:
ok single line: 'down'
Test #46:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
12 1916
output:
up
result:
ok single line: 'up'
Test #47:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
981 6498
output:
down
result:
ok single line: 'down'
Test #48:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
933 656
output:
down
result:
ok single line: 'down'
Test #49:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
6929 4189
output:
down
result:
ok single line: 'down'
Test #50:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
9860 5592
output:
down
result:
ok single line: 'down'
Test #51:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
6939 8671
output:
down
result:
ok single line: 'down'
Test #52:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
240 9453
output:
down
result:
ok single line: 'down'
Test #53:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
5350 7827
output:
down
result:
ok single line: 'down'
Test #54:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
9531 8515
output:
down
result:
ok single line: 'down'
Test #55:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
2601 8661
output:
down
result:
ok single line: 'down'
Test #56:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
4324 4936
output:
down
result:
ok single line: 'down'
Test #57:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
3216 5827
output:
up
result:
ok single line: 'up'
Test #58:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
6046 1991
output:
up
result:
ok single line: 'up'
Test #59:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
3258 8744
output:
down
result:
ok single line: 'down'
Test #60:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
5718 3014
output:
down
result:
ok single line: 'down'
Test #61:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
2918 3029
output:
down
result:
ok single line: 'down'
Test #62:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
6727 3754
output:
down
result:
ok single line: 'down'
Test #63:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
8396 3083
output:
up
result:
ok single line: 'up'