QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#604703#8934. Challenge NPCPandaGhostAC ✓18ms3880kbC++14820b2024-10-02 13:20:392024-10-02 13:20:39

Judging History

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

  • [2024-10-02 13:20:39]
  • 评测
  • 测评结果:AC
  • 用时:18ms
  • 内存:3880kb
  • [2024-10-02 13:20:39]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define OPFI(x) freopen(#x".in", "r", stdin);\
                freopen(#x".out", "w", stdout)
#define REP(i, a, b) for(int i=(a); i<=(b); ++i)
#define REPd(i, a, b) for(int i=(a); i>=(b); --i)
inline ll rd(){
    ll r=0, k=1; char c; while(!isdigit(c=getchar())) if(c=='-') k=-k;
    while(isdigit(c)) r=r*10+c-'0', c=getchar(); return r*k;
}
const int N=2e5+10;
const ll MOD=1e9+7;
ll k;
int main(){
    k=rd();
    ll n=(k+2)*2, m=(k+1)*(k+2), c=2;
    printf("%lld %lld %lld\n", n, m, c);
    REP(i, 1, k+2) printf("1 2 ");
    puts("");
    REP(i, 2, k+2){
        int y=i*2, x=y-1;
        REP(j, 1, i-1){
            printf("%d %d\n", y, j*2-1);
            printf("%d %d\n", x, j*2);
        }
    }
    return 0;
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3812kb

input:

1

output:

6 6 2
1 2 1 2 1 2 
4 1
3 2
6 1
5 2
6 3
5 4

result:

ok ok

Test #2:

score: 0
Accepted
time: 0ms
memory: 3880kb

input:

2

output:

8 12 2
1 2 1 2 1 2 1 2 
4 1
3 2
6 1
5 2
6 3
5 4
8 1
7 2
8 3
7 4
8 5
7 6

result:

ok ok

Test #3:

score: 0
Accepted
time: 0ms
memory: 3752kb

input:

3

output:

10 20 2
1 2 1 2 1 2 1 2 1 2 
4 1
3 2
6 1
5 2
6 3
5 4
8 1
7 2
8 3
7 4
8 5
7 6
10 1
9 2
10 3
9 4
10 5
9 6
10 7
9 8

result:

ok ok

Test #4:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

4

output:

12 30 2
1 2 1 2 1 2 1 2 1 2 1 2 
4 1
3 2
6 1
5 2
6 3
5 4
8 1
7 2
8 3
7 4
8 5
7 6
10 1
9 2
10 3
9 4
10 5
9 6
10 7
9 8
12 1
11 2
12 3
11 4
12 5
11 6
12 7
11 8
12 9
11 10

result:

ok ok

Test #5:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

5

output:

14 42 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 
4 1
3 2
6 1
5 2
6 3
5 4
8 1
7 2
8 3
7 4
8 5
7 6
10 1
9 2
10 3
9 4
10 5
9 6
10 7
9 8
12 1
11 2
12 3
11 4
12 5
11 6
12 7
11 8
12 9
11 10
14 1
13 2
14 3
13 4
14 5
13 6
14 7
13 8
14 9
13 10
14 11
13 12

result:

ok ok

Test #6:

score: 0
Accepted
time: 13ms
memory: 3800kb

input:

433

output:

870 188790 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 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 #7:

score: 0
Accepted
time: 18ms
memory: 3812kb

input:

500

output:

1004 251502 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 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 #8:

score: 0
Accepted
time: 17ms
memory: 3796kb

input:

499

output:

1002 250500 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 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 #9:

score: 0
Accepted
time: 13ms
memory: 3748kb

input:

457

output:

918 210222 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 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 #10:

score: 0
Accepted
time: 13ms
memory: 3808kb

input:

497

output:

998 248502 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 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