QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#166679#7029. Xu Xiake in Henan ProvinceHandwerAC ✓2ms3496kbC++141.4kb2023-09-06 16:33:442023-09-06 16:33:45

Judging History

你现在查看的是最新测评结果

  • [2023-09-06 16:33:45]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3496kb
  • [2023-09-06 16:33:44]
  • 提交

answer

#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <string>
#include <vector>

#define forall(G,i) for (int i = 0, __for_siz__ = (int) (G).size(); i < __for_siz__; ++i)
#define DEBUG(x) std::cerr << #x << " = " << x << endl;
#define rep(i_,a_,b_) for (int i_ = (a_); (i_) <= (b_); (i_) = (i_) + 1)
#define ALL(x) (x).begin(), (x).end()
#define MP std::make_pair
#define se second
#define endl '\n'
#define fi first

using std::cin;
using std::cout;

typedef long long int lli;

inline int read() {
    int s = 0, x = 1; char ch = getchar();
    while (!isdigit(ch)) { if (ch == '-') x = -x; ch = getchar(); }
    while (isdigit(ch)) { s = s * 10 + ch - '0'; ch = getchar(); }
    return s * x;
}

inline lli readll() {
    lli s = 0, x = 1; char ch = getchar();
    while (!isdigit(ch)) { if (ch == '-') x = -x; ch = getchar(); }
    while (isdigit(ch)) { s = s * 10 + ch - '0'; ch = getchar(); }
    return s * x;
}

int a[5];

int main() {
	int T = read();
	while (T --> 0) {
		int x = 0;
		for (int i = 1; i <= 4; ++i) {
			a[i] = read();
			x += (a[i] > 0);
		} 
		switch(x) {
			case 0:
				puts("Typically Otaku");
				break;
			case 1:
				puts("Eye-opener");
				break;
			case 2:
				puts("Young Traveller");
				break;
			case 3:
				puts("Excellent Traveller");
				break;
			case 4:
				puts("Contemporary Xu Xiake");
				break;
		}
	}
	return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3376kb

input:

5
0 0 0 0
0 0 0 1
1 1 0 0
2 1 1 0
1 2 3 4

output:

Typically Otaku
Eye-opener
Young Traveller
Excellent Traveller
Contemporary Xu Xiake

result:

ok 5 lines

Test #2:

score: 0
Accepted
time: 2ms
memory: 3496kb

input:

10000
0 3 0 0
0 0 1 0
0 0 0 0
0 3 0 22
0 3 0 2
2 0 0 0
9 0 6 37
0 0 0 0
9 2 0 0
1 0 0 0
0 0 5 1
3 6 0 0
2 3 8 0
0 3 0 1
0 25 0 2
0 2 0 0
3 0 0 0
3 13 0 6
0 0 0 3
0 0 28 0
0 0 3 1
21 32 0 0
2 0 0 0
45 0 0 12
4 0 0 0
0 0 0 6
0 0 0 0
24 0 3 0
0 5 28 0
1 10 10 2
0 7 0 0
3 1 24 1
2 2 0 78
0 0 41 0
6 4 0 ...

output:

Eye-opener
Eye-opener
Typically Otaku
Young Traveller
Young Traveller
Eye-opener
Excellent Traveller
Typically Otaku
Young Traveller
Eye-opener
Young Traveller
Young Traveller
Excellent Traveller
Young Traveller
Young Traveller
Eye-opener
Eye-opener
Excellent Traveller
Eye-opener
Eye-opener
Young Tr...

result:

ok 10000 lines