QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#803759#9852. DivisionsWzy#WA 0ms3716kbC++14737b2024-12-07 18:20:352024-12-07 18:20:43

Judging History

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

  • [2024-12-07 18:20:43]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3716kb
  • [2024-12-07 18:20:35]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef  long long LL;
typedef pair<LL,LL> PII;
const int N=20,M=2*N;
const int mod=998244353;
const int INF=1e9+7;


void solve(){
    int mid ;  
   cin >> mid ;
   if(mid > 366){
    cout << "-1" ;
    return ;
   }else if(mid == 0){
    cout << "7\n" ;
    cout << "2 5 3 6 4 3 5" ;
    return ;
   }else if(mid == 1){
    cout << "6\n1 1 4 5 1 4" ;
    return ;
   }else{
    cout << mid - 1 << '\n' ;
    for(int i = 1 ; i <= mid - 1 ; ++ i) {
        cout << i << ' ' ;
    }
    return ;
   }

}
 
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int T=1;
    //cin>>T;

    while(T--) solve();
 
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1

output:

6
1 1 4 5 1 4

result:

ok correct

Test #2:

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

input:

2

output:

1
1 

result:

ok correct

Test #3:

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

input:

0

output:

7
2 5 3 6 4 3 5

result:

ok correct

Test #4:

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

input:

3

output:

2
1 2 

result:

ok correct

Test #5:

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

input:

4

output:

3
1 2 3 

result:

ok correct

Test #6:

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

input:

5

output:

4
1 2 3 4 

result:

ok correct

Test #7:

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

input:

6

output:

5
1 2 3 4 5 

result:

ok correct

Test #8:

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

input:

7

output:

6
1 2 3 4 5 6 

result:

ok correct

Test #9:

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

input:

8

output:

7
1 2 3 4 5 6 7 

result:

ok correct

Test #10:

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

input:

9

output:

8
1 2 3 4 5 6 7 8 

result:

ok correct

Test #11:

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

input:

10

output:

9
1 2 3 4 5 6 7 8 9 

result:

ok correct

Test #12:

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

input:

11

output:

10
1 2 3 4 5 6 7 8 9 10 

result:

ok correct

Test #13:

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

input:

12

output:

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

result:

ok correct

Test #14:

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

input:

13

output:

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

result:

ok correct

Test #15:

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

input:

14

output:

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

result:

ok correct

Test #16:

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

input:

15

output:

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

result:

ok correct

Test #17:

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

input:

16

output:

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

result:

ok correct

Test #18:

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

input:

24

output:

23
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 

result:

ok correct

Test #19:

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

input:

31

output:

30
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 

result:

ok correct

Test #20:

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

input:

32

output:

31
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 

result:

ok correct

Test #21:

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

input:

63

output:

62
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 

result:

ok correct

Test #22:

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

input:

64

output:

63
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 

result:

ok correct

Test #23:

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

input:

127

output:

126
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok correct

Test #24:

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

input:

128

output:

127
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok correct

Test #25:

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

input:

255

output:

254
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok correct

Test #26:

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

input:

256

output:

255
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok correct

Test #27:

score: -100
Wrong Answer
time: 0ms
memory: 3708kb

input:

511

output:

-1

result:

wrong answer jury has answer but participant not