QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#439422#5434. Binary SubstringszlxFTH#WA 1ms3704kbC++14362b2024-06-11 21:40:402024-06-11 21:40:40

Judging History

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

  • [2024-06-11 21:40:40]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3704kb
  • [2024-06-11 21:40:40]
  • 提交

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