QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#550016 | #8934. Challenge NPC | wangsiyuanZP# | AC ✓ | 18ms | 3884kb | C++14 | 1.1kb | 2024-09-07 08:53:30 | 2024-09-07 08:53:30 |
Judging History
answer
// Calm down.
// Think TWICE, code ONCE.
#include<bits/stdc++.h>
#define pb push_back
#define debug printf("Passed line %d\n", __LINE__)
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
template<typename T> inline void read(T &x){
x = 0; bool F = 0; char c = getchar();
for (;!isdigit(c);c = getchar()) if (c == '-') F = 1;
for (;isdigit(c);c = getchar()) x = x*10+(c^48);
if (F) x = -x;
}
template<typename T1, typename... T2> inline void read(T1 &x, T2 &...y){read(x); read(y...);}
template<typename T> inline void checkmax(T &a, const T &b){if (a<b) a = b;}
template<typename T> inline void checkmin(T &a, const T &b){if (a>b) a = b;}
int k;
int main(){
read(k), k += 3;
printf("%d %d 2\n", k*2, (k-1)*k);
for (int i = 1;i<=2*k;i++) printf("%d ", (i&1)+1); printf("\n");
for (int i = 1;i<=k;i++){
for (int j = 1;j<i;j++){
printf("%d %d\n", j*2-1, 2*i);
printf("%d %d\n", j*2, 2*i-1);
}
}
return 0;
}
/*
self check:
1. long long
2. size of array
3. code for testing
4. initializing
*/
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3752kb
input:
1
output:
8 12 2 2 1 2 1 2 1 2 1 1 4 2 3 1 6 2 5 3 6 4 5 1 8 2 7 3 8 4 7 5 8 6 7
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
2
output:
10 20 2 2 1 2 1 2 1 2 1 2 1 1 4 2 3 1 6 2 5 3 6 4 5 1 8 2 7 3 8 4 7 5 8 6 7 1 10 2 9 3 10 4 9 5 10 6 9 7 10 8 9
result:
ok ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
3
output:
12 30 2 2 1 2 1 2 1 2 1 2 1 2 1 1 4 2 3 1 6 2 5 3 6 4 5 1 8 2 7 3 8 4 7 5 8 6 7 1 10 2 9 3 10 4 9 5 10 6 9 7 10 8 9 1 12 2 11 3 12 4 11 5 12 6 11 7 12 8 11 9 12 10 11
result:
ok ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3880kb
input:
4
output:
14 42 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 1 4 2 3 1 6 2 5 3 6 4 5 1 8 2 7 3 8 4 7 5 8 6 7 1 10 2 9 3 10 4 9 5 10 6 9 7 10 8 9 1 12 2 11 3 12 4 11 5 12 6 11 7 12 8 11 9 12 10 11 1 14 2 13 3 14 4 13 5 14 6 13 7 14 8 13 9 14 10 13 11 14 12 13
result:
ok ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3884kb
input:
5
output:
16 56 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 1 4 2 3 1 6 2 5 3 6 4 5 1 8 2 7 3 8 4 7 5 8 6 7 1 10 2 9 3 10 4 9 5 10 6 9 7 10 8 9 1 12 2 11 3 12 4 11 5 12 6 11 7 12 8 11 9 12 10 11 1 14 2 13 3 14 4 13 5 14 6 13 7 14 8 13 9 14 10 13 11 14 12 13 1 16 2 15 3 16 4 15 5 16 6 15 7 16 8 15 9 16 10 15 11 16 12 1...
result:
ok ok
Test #6:
score: 0
Accepted
time: 13ms
memory: 3724kb
input:
433
output:
872 189660 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1...
result:
ok ok
Test #7:
score: 0
Accepted
time: 18ms
memory: 3748kb
input:
500
output:
1006 252506 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 ...
result:
ok ok
Test #8:
score: 0
Accepted
time: 10ms
memory: 3876kb
input:
499
output:
1004 251502 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 ...
result:
ok ok
Test #9:
score: 0
Accepted
time: 16ms
memory: 3796kb
input:
457
output:
920 211140 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1...
result:
ok ok
Test #10:
score: 0
Accepted
time: 14ms
memory: 3800kb
input:
497
output:
1000 249500 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 ...
result:
ok ok
Extra Test:
score: 0
Extra Test Passed