QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#105349#6386. DollsChtholly_Nephren23 3ms3512kbC++14474b2023-05-13 22:44:312023-05-13 22:44:34

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-13 22:44:34]
  • 评测
  • 测评结果:23
  • 用时:3ms
  • 内存:3512kb
  • [2023-05-13 22:44:31]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,a[1000005];
signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin>>n;
	if(n<=200){
		for(int i=1; i<=n; i++){
			cin>>a[i];
			sort(a+1,a+i+1);
			int ans=0,last=-1; 
			for(int j=1; j<=i; j++)
				if(a[j]-last>=2)
					last=a[j],ans++;
			cout<<ans<<' ';
		}
	}
	else{
		for(int i=1; i<=n; i++){
			cin>>a[i];
			cout<<i<<' ';
		}
	}
	return 0;
}




Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 23
Accepted

Test #1:

score: 23
Accepted
time: 1ms
memory: 3456kb

input:

190
57 94 24 27 110 44 72 82 55 7 9 43 22 86 95 84 125 16 75 28 46 10 14 131 112 132 33 53 103 139 118 126 137 13 140 77 25 23 47 116 68 150 81 97 165 58 88 63 42 89 123 11 113 83 124 130 80 35 143 155 153 48 8 136 104 101 90 37 21 99 142 34 64 115 109 26 92 144 61 51 114 49 148 96 60 30 54 134 141 ...

output:

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

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 11 11 12 ... 77 77 77 77 77 77 77 77 77 77 '

Test #2:

score: 0
Accepted
time: 1ms
memory: 3328kb

input:

158
46 39 57 35 42 43 60 87 44 38 89 92 41 70 78 58 48 59 51 37 36 49 77 76 71 47 50 88 45 40 36 39 92 36 39 45 46 58 51 49 47 37 47 43 87 77 45 39 89 59 57 42 89 76 76 37 47 77 36 77 60 89 40 36 45 40 76 92 88 37 46 88 46 46 36 59 78 92 35 89 60 89 77 45 70 45 70 78 51 51 92 42 35 76 60 51 35 59 49...

output:

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

result:

ok single line: '1 2 3 4 5 5 6 7 8 8 9 10 10 11... 17 17 17 17 17 17 17 17 17 17 '

Test #3:

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

input:

171
38 68 48 65 33 57 67 21 20 47 56 69 41 24 37 46 34 22 36 35 39 25 58 49 59 63 40 64 61 66 44 45 60 23 62 68 69 67 40 60 24 22 48 39 56 66 34 63 33 36 67 45 67 33 66 59 46 60 41 66 41 47 57 60 36 68 47 39 34 40 44 24 23 59 63 23 23 65 67 56 59 62 23 62 35 37 58 39 41 46 63 40 40 45 58 24 38 60 25...

output:

1 2 3 4 5 6 6 7 7 7 7 8 9 10 10 11 11 12 13 13 14 14 15 15 15 16 16 16 17 17 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 1...

result:

ok single line: '1 2 3 4 5 6 6 7 7 7 7 8 9 10 1... 18 18 18 18 18 18 18 18 18 18 '

Test #4:

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

input:

159
76 22 32 52 57 33 48 50 77 72 49 31 60 26 24 61 46 71 56 45 44 53 25 47 55 62 23 51 54 21 29 69 43 86 30 28 59 58 27 70 21 60 62 27 60 24 55 59 59 23 26 24 51 77 69 33 59 44 26 61 48 26 26 27 51 69 29 47 62 32 61 44 44 43 58 23 23 52 22 44 26 26 55 24 21 58 22 56 57 72 52 70 76 70 60 21 60 30 56...

output:

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

result:

ok single line: '1 2 3 4 5 5 6 7 7 8 8 9 10 11 ... 21 21 21 21 21 21 21 21 21 21 '

Test #5:

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

input:

67
13 26 23 7 5 21 22 28 47 27 36 16 40 41 52 31 25 19 24 46 17 10 6 20 35 49 33 48 15 30 45 29 42 37 14 44 38 9 39 32 12 18 43 11 8 6 7 9 6 12 49 19 11 27 39 45 22 36 8 40 37 12 36 37 29 38 47

output:

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

result:

ok single line: '1 2 3 4 5 6 6 7 8 8 9 10 11 11... 24 24 24 24 24 24 24 24 24 24 '

Test #6:

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

input:

163
70 30 74 27 81 65 49 43 68 24 66 55 34 25 62 75 40 82 44 71 29 83 37 32 51 45 99 79 31 42 84 100 78 52 35 72 69 77 73 33 53 38 60 80 48 64 76 46 47 90 67 39 26 28 41 54 36 61 50 63 45 28 70 53 90 73 38 33 75 35 41 52 45 73 99 25 81 60 64 25 54 70 50 52 67 80 38 24 36 38 35 49 24 50 42 50 25 73 7...

output:

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

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 10 11 12 ... 31 31 31 31 31 31 31 31 31 31 '

Test #7:

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

input:

200
156 185 128 99 142 75 169 191 232 82 90 39 73 46 144 134 189 127 182 114 58 119 219 233 105 40 41 88 240 64 188 237 118 165 214 91 138 76 154 70 129 173 146 85 57 212 113 223 236 145 80 135 139 87 100 47 38 93 63 69 213 225 109 164 120 228 205 215 162 74 89 121 172 117 203 49 200 180 150 126 60 ...

output:

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

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 11 12 13 ... 97 98 99 99 99 99 99 99 99 99 '

Test #8:

score: 0
Accepted
time: 3ms
memory: 3508kb

input:

192
164 227 117 214 141 205 162 82 50 83 87 159 36 129 181 47 132 228 161 32 42 173 203 222 180 219 136 133 151 140 147 86 165 188 206 72 238 103 111 56 113 191 134 208 189 118 209 146 95 186 58 35 169 150 155 99 124 78 92 149 157 40 225 51 153 224 182 204 76 70 41 184 67 207 131 43 137 145 106 127 ...

output:

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

result:

ok single line: '1 2 3 4 5 6 7 8 9 9 10 11 12 1... 94 94 95 95 95 95 96 96 96 96 '

Test #9:

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

input:

199
33 25 124 109 211 161 198 85 117 104 214 21 152 110 183 125 185 49 137 138 79 208 20 135 203 100 102 29 128 45 61 87 162 93 229 197 32 233 107 227 82 228 148 55 39 156 174 31 78 184 36 209 98 147 40 157 52 23 97 129 44 167 194 216 224 84 230 99 112 62 204 86 223 96 106 202 81 37 126 28 205 35 57...

output:

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

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 11 12 13 ...99 100 100 100 100 101 101 101 '

Test #10:

score: 0
Accepted
time: 1ms
memory: 3400kb

input:

200
225 109 103 199 263 198 156 239 207 72 112 106 60 258 192 185 164 114 154 53 52 259 120 268 204 197 151 136 139 137 178 262 183 89 166 105 256 196 241 190 186 231 240 218 191 162 159 200 222 233 121 147 242 65 160 142 163 148 118 95 267 135 115 91 66 184 63 74 217 87 107 182 71 108 69 59 202 155...

output:

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

result:

ok single line: '1 2 3 4 5 5 6 7 8 9 10 11 12 1...7 97 98 99 100 100 100 100 100 '

Test #11:

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

input:

5
1 2 3 4 5

output:

1 1 2 2 3 

result:

ok single line: '1 1 2 2 3 '

Test #12:

score: 0
Accepted
time: 1ms
memory: 3472kb

input:

200
165 177 24 33 158 143 197 65 98 183 190 39 97 43 176 171 149 164 46 102 150 93 82 152 54 110 25 136 63 85 38 156 200 71 195 115 210 101 188 144 160 37 230 237 211 189 142 31 130 224 198 50 81 79 216 132 214 36 90 184 227 86 220 66 187 78 28 191 182 219 29 148 96 238 117 58 91 88 181 145 196 118 ...

output:

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

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 11 12 12 ...00 100 100 100 100 100 100 100 '

Test #13:

score: 0
Accepted
time: 1ms
memory: 3404kb

input:

200
165 61 57 32 201 94 118 52 75 211 35 26 139 229 108 95 41 119 106 194 142 114 79 137 74 176 188 39 129 191 199 86 228 50 204 98 145 42 154 82 198 60 85 66 96 186 22 83 90 155 230 135 92 153 175 67 171 51 152 109 112 173 78 206 37 24 31 159 89 21 172 33 192 111 23 93 48 205 126 167 210 253 65 68 ...

output:

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

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 11 12 13 ...00 100 100 101 101 101 101 101 '

Test #14:

score: 0
Accepted
time: 1ms
memory: 3324kb

input:

5
2 4 6 8 10

output:

1 2 3 4 5 

result:

ok single line: '1 2 3 4 5 '

Test #15:

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

input:

5
3 3 1 3 2

output:

1 1 2 2 2 

result:

ok single line: '1 1 2 2 2 '

Test #16:

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

input:

5
5 2 3 1 4

output:

1 2 2 3 3 

result:

ok single line: '1 2 2 3 3 '

Test #17:

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

input:

5
10 6 8 4 2

output:

1 2 3 4 5 

result:

ok single line: '1 2 3 4 5 '

Test #18:

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

input:

155
41 3 4 20 42 45 1 30 23 2 21 32 13 31 19 22 12 43 18 5 43 43 21 2 21 19 20 23 30 18 42 19 31 43 18 4 30 23 43 12 3 22 1 32 21 32 30 4 32 3 43 20 19 45 32 43 23 12 12 13 22 4 2 22 12 31 31 3 1 22 22 3 45 23 5 2 42 18 3 42 13 41 43 23 22 42 43 45 19 45 1 32 22 43 12 13 41 5 31 20 4 4 18 4 30 3 18 ...

output:

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

result:

ok single line: '1 2 2 3 3 4 5 6 7 7 7 8 9 9 10... 12 12 12 12 12 12 12 12 12 12 '

Test #19:

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

input:

200
83 138 55 175 107 184 30 76 206 159 160 162 90 115 113 68 219 117 122 161 152 191 61 49 114 233 42 38 211 109 186 148 239 142 240 97 82 261 45 131 192 87 46 47 207 26 208 242 134 34 133 129 48 43 86 37 172 64 158 116 151 180 39 84 165 140 63 170 209 210 136 51 106 96 164 88 110 188 156 171 40 32...

output:

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

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 10 11 12 ...01 101 101 102 102 102 103 103 '

Test #20:

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

input:

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

output:

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

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 10 11 12 ... 51 51 51 51 51 51 51 51 51 51 '

Test #21:

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

input:

102
16 55 25 48 45 56 77 38 69 47 43 42 15 22 90 76 59 39 72 73 57 26 21 27 75 88 18 17 44 53 52 58 14 49 87 61 70 20 74 51 41 40 54 19 24 46 50 60 23 71 38 17 39 71 25 39 88 44 38 21 87 23 49 61 15 14 76 26 15 73 19 58 16 14 53 45 50 56 77 47 74 48 24 69 42 55 19 72 18 88 18 54 73 47 14 58 41 88 87...

output:

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

result:

ok single line: '1 2 3 4 5 5 6 7 8 8 9 9 9 10 1... 26 26 26 26 26 26 26 26 26 26 '

Subtask #2:

score: 0
Wrong Answer

Test #22:

score: 0
Wrong Answer
time: 2ms
memory: 3432kb

input:

3922
1195 63679 1195 96797 63679 60311 456263 228361 96797 270167 60311 169529 60311 60311 456263 270167 169529 375829 169529 169529 270167 375829 60311 228361 1195 375829 96797 375829 375829 96797 375829 169529 456263 375829 1195 375829 456263 96797 169529 228361 63679 270167 212365 456263 270167 9...

output:

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 102 ...

result:

wrong answer 1st lines differ - expected: '1 2 2 3 3 4 5 6 6 7 7 8 8 8 8 ...0 10 10 10 10 10 10 10 10 10 10', found: '1 2 3 4 5 6 7 8 9 10 11 12 13 ... 3917 3918 3919 3920 3921 3922 '

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%