用户输出
banana
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#25453 | #1142. ddd和大象 | Accepted | 100 | 405 ms | 356 K | C++ 17 / 1.4 K | Eric | 2020-05-02 10:24:31 |
#include <iostream>
using namespace std;
bool flags[4];
int main() {
for (int i = 0; i < 4; ++i) flags[i] = true;
int n;
cin >> n;
while (n--) {
int x, y;
cin >> x >> y;
if (x == 0 && y == 0) {
cout << "banana";
return 0;
}
if (x == 0 && y > 0) {
flags[0] = false;
flags[3] = false;
flags[1] = false;
} else if (x == 0 && y < 0) {
flags[2] = false;
flags[3] = false;
flags[1] = false;
} else if (y == 0 && x < 0) {
flags[2] = false;
flags[0] = false;
flags[1] = false;
} else if (y == 0 && x > 0) {
flags[2] = false;
flags[3] = false;
flags[0] = false;
} else if (x > 0 && y > 0) {
flags[0] = false;
flags[3] = false;
} else if (x > 0 && y < 0) {
flags[2] = false;
flags[3] = false;
} else if (x < 0 && y < 0) {
flags[2] = false;
flags[1] = false;
} else if (x < 0 && y > 0) {
flags[1] = false;
flags[0] = false;
}
}
for (int i = 0; i < 4; ++i) {
if (flags[i] == true) {
cout << "ddd";
return 0;
}
}
cout << "banana";
return 0;
}
100000
-1000000000 -1000000000
-1000000000 -1000000000
-1000000000 -1000000000
-1000000000 -10000000
<2399907 bytes omitted>
用户输出
ddd
系统信息
Exited with return code 0
100000
-571340417 463560346
403124531 -797547705
-758821057 -514451613
831005957 -500699947
-6422173
<2077792 bytes omitted>
用户输出
banana
系统信息
Exited with return code 0
100000
-438108394 170968360
-234057734 -829803060
-262258987 -231854118
-922675242 943352998
2528484
<2077959 bytes omitted>
用户输出
banana
系统信息
Exited with return code 0
100000
-549857431 345016800
-412131138 556921917
7246642 -464357808
-975496833 602878280
445593594 8
<2077557 bytes omitted>
用户输出
banana
系统信息
Exited with return code 0
100000
678089562 538953470
258583896 912487915
420506774 510970659
128240660 405522019
958653829 394
<2027598 bytes omitted>
用户输出
ddd
系统信息
Exited with return code 0
100000
61058594 -659126515
632527415 -498875302
-883598349 -754477065
-813784284 -741617825
-3903755
<2127879 bytes omitted>
用户输出
ddd
系统信息
Exited with return code 0
5
637698483 -974613293
-928109931 465894288
70394878 -224931957
768070863 594202926
766088780 955236
<3 bytes omitted>
用户输出
banana
系统信息
Exited with return code 0