QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#642655 | #5434. Binary Substrings | guodong# | WA | 0ms | 3536kb | C++17 | 405b | 2024-10-15 15:32:30 | 2024-10-15 15:32:30 |
Judging History
answer
#include <bits/stdc++.h>
#define For(i,a,b) for(int i = a; i <= b; ++i)
using namespace std;
signed main(){
#ifdef NICEGUODONG
freopen("data.in","r",stdin);
#endif
int n;
cin >> n;
int len = 1;
string a;
while(1){
For(i,1,len){
a.push_back('0');
}
For(i,1,len){
a.push_back('1');
}
++len;
if(a.size() > n)
break;
}
For(i,0, n - 1)
cout << a[i];
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3508kb
input:
2
output:
01
result:
ok meet maximum 3
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3536kb
input:
5
output:
01001
result:
wrong answer not meet maximum 11 < 12