QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#688960 | #5434. Binary Substrings | ucup-team1329# | WA | 0ms | 3664kb | C++17 | 663b | 2024-10-30 14:31:58 | 2024-10-30 14:31:59 |
Judging History
answer
#include <bits/stdc++.h>
using i64 = long long;
using A2 = std::array<i64, 2>;
#define Fast_IOS \
std::ios::sync_with_stdio(false), \
std::cin.tie(0), \
std::cout.tie(0)
const i64 mod = 998244353;
class ICPC {
public:
int N, T = 1;
ICPC() {
// Fast_IOS;
// std::cin >> T;
}
void solve() {
int n;
std::cin >> n;
int t = 0, tt = 0;
while (n) {
t++;
tt = std::min(n, t);
n -= tt;
while (tt--) std::cout << 1;
tt = std::min(n, t);
n -= tt;
while (tt--) std::cout << 0;
}
std::cout << '\n';
}
};
int main() {
ICPC icpc;
while (icpc.T--) {
icpc.solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3628kb
input:
2
output:
10
result:
ok meet maximum 3
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3664kb
input:
5
output:
10110
result:
wrong answer not meet maximum 11 < 12