QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#400543#5434. Binary Substringscomeintocalm#WA 1ms3688kbC++17352b2024-04-27 13:36:332024-04-27 13:36:35

Judging History

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

  • [2024-04-27 13:36:35]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3688kb
  • [2024-04-27 13:36:33]
  • 提交

answer

#include <bits/stdc++.h>
#define LL long long
#define db double
using namespace std;

const int MAXN = 5e3 + 5;
int n;

int main() {
	int i,j,k;
	int cnt = 1;
	cin >> n;
	while (n) {
		if (n & 1) {
			for (i = 0; i < (cnt >> 1); ++i) putchar ('0');
			for (; i < cnt; ++i) putchar ('1');
		}
		cnt <<= 1;
		n >>= 1;
	}
	return 0;
}

详细

Test #1:

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

input:

2

output:

01

result:

ok meet maximum 3

Test #2:

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

input:

5

output:

10011

result:

ok meet maximum 12

Test #3:

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

input:

1

output:

1

result:

ok meet maximum 1

Test #4:

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

input:

3

output:

101

result:

ok meet maximum 5

Test #5:

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

input:

4

output:

0011

result:

ok meet maximum 8

Test #6:

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

input:

6

output:

010011

result:

ok meet maximum 16

Test #7:

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

input:

7

output:

1010011

result:

ok meet maximum 21

Test #8:

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

input:

8

output:

00001111

result:

wrong answer not meet maximum 24 < 27