QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#439422 | #5434. Binary Substrings | zlxFTH# | WA | 1ms | 3704kb | C++14 | 362b | 2024-06-11 21:40:40 | 2024-06-11 21:40:40 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
int main() {
cin.tie(0)->sync_with_stdio(0);
int n;
cin >> n;
int t = 1, cur = 0;
for (int i = 0; ; i ^= 1, ++t) {
for (int j = 1; j <= t; ++j) {
if (cur < n) {
cout << i;
cur++;
}
}
if (cur >= n) break;
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3616kb
input:
2
output:
01
result:
ok meet maximum 3
Test #2:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
5
output:
01100
result:
ok meet maximum 12
Test #3:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
1
output:
0
result:
ok meet maximum 1
Test #4:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
3
output:
011
result:
ok meet maximum 5
Test #5:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
4
output:
0110
result:
ok meet maximum 8
Test #6:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
6
output:
011000
result:
ok meet maximum 16
Test #7:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
7
output:
0110001
result:
ok meet maximum 21
Test #8:
score: -100
Wrong Answer
time: 0ms
memory: 3560kb
input:
8
output:
01100011
result:
wrong answer not meet maximum 26 < 27