ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#193245 | #1167. 明明的随机数 | lyz111 | 100 | 3ms | 1240kb | C++ | 323b | 2023-10-14 09:51:20 | 2023-10-14 09:51:22 |
answer
#include<bits/stdc++.h>
using namespace std;
set <int> a;
int main()
{
int n;
cin >> n;
for (int i = 1; i <= n; i++)
{
int b;
cin >> b;
a.insert(b);
}
cout << a.size() << endl;
set <int>::iterator it;
for (it = a.begin(); it != a.end(); it++)
{
cout << *it << " ";
}
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 0ms
memory: 1236kb
input:
80 407 84 341 408 525 41 322 220 40 321 302 45 215 315 437 447 231 189 304 404 8 301 407 515 40 321 ...
output:
43 8 15 20 40 41 45 67 84 89 120 189 215 220 231 240 241 301 302 304 315 321 322 341 404 407 408 410...
result:
ok 2 lines
Test #2:
score: 10
Accepted
time: 1ms
memory: 1240kb
input:
20 20 40 321 677 40 20 89 301 407 515 40 321 67 40 20 89 301 407 15 499
output:
11 15 20 40 67 89 301 321 407 499 515 677
result:
ok 2 lines
Test #3:
score: 10
Accepted
time: 0ms
memory: 1236kb
input:
8 20 40 321 67 40 40 89 15
output:
6 15 20 40 67 89 321
result:
ok 2 lines
Test #4:
score: 10
Accepted
time: 1ms
memory: 1236kb
input:
90 7 2 315 437 447 231 189 301 407 8 407 84 341 408 525 41 322 220 40 321 302 457 215 315 437 447 23...
output:
48 2 5 7 8 15 20 40 41 67 84 89 120 185 189 201 215 220 231 240 241 301 302 315 321 322 341 407 408 ...
result:
ok 2 lines
Test #5:
score: 10
Accepted
time: 0ms
memory: 1240kb
input:
10 20 40 321 67 40 20 89 301 407 15
output:
8 15 20 40 67 89 301 321 407
result:
ok 2 lines
Test #6:
score: 10
Accepted
time: 1ms
memory: 1236kb
input:
30 120 40 321 677 40 321 67 40 20 89 301 407 15 499 440 240 89 301 407 515 40 321 67 40 20 89 301 40...
output:
14 15 20 40 67 89 120 240 301 321 407 440 499 515 677
result:
ok 2 lines
Test #7:
score: 10
Accepted
time: 0ms
memory: 1240kb
input:
40 5 491 440 240 89 301 407 515 403 321 120 40 321 677 402 321 67 40 20 89 301 407 15 492 440 240 89...
output:
21 5 9 15 20 40 67 89 120 240 301 321 402 403 407 410 440 491 492 499 515 677
result:
ok 2 lines
Test #8:
score: 10
Accepted
time: 0ms
memory: 1236kb
input:
50 607 420 321 67 40 20 89 301 407 135 15 4 447 241 89 301 407 515 410 321 120 40 321 667 400 321 67...
output:
26 4 8 15 20 40 49 67 89 120 135 209 240 241 301 321 400 407 410 420 440 447 499 515 607 637 667
result:
ok 2 lines
Test #9:
score: 10
Accepted
time: 0ms
memory: 1236kb
input:
60 89 301 407 515 40 321 120 40 821 675 673 671 670 67 40 20 891 301 407 15 151 97 4 241 893 301 407...
output:
32 4 15 20 40 67 81 89 97 120 150 151 240 241 301 303 311 321 407 410 420 440 499 515 670 671 673 67...
result:
ok 2 lines
Test #10:
score: 10
Accepted
time: 0ms
memory: 1240kb
input:
70 302 457 215 315 437 447 231 189 301 407 89 306 407 515 40 321 120 40 321 617 627 637 679 67 430 2...
output:
39 8 15 20 40 67 89 120 125 189 215 230 231 240 241 301 302 303 306 315 321 327 402 407 408 410 430 ...
result:
ok 2 lines