QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#231861 | #5434. Binary Substrings | inverno | Compile Error | / | / | C++14 | 320b | 2023-10-29 17:21:14 | 2023-10-29 17:21:14 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0); cin.tie(0);
int n ;cin >> n;
int w = log2(n);
bool ch = 1;
for (int i = 1;i <= n;i += w){
for (int j = 1;j <= min(n-i+1,w);++ j) {
if (ch) put('0');
else put('1');
}
ch^=1;
}
return 0;
}
詳細信息
answer.code: In function ‘int main()’: answer.code:12:33: error: ‘put’ was not declared in this scope; did you mean ‘putw’? 12 | if (ch) put('0'); | ^~~ | putw answer.code:13:32: error: ‘put’ was not declared in this scope; did you mean ‘putw’? 13 | else put('1'); | ^~~ | putw