QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#688960#5434. Binary Substringsucup-team1329#WA 0ms3664kbC++17663b2024-10-30 14:31:582024-10-30 14:31:59

Judging History

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

  • [2024-10-30 14:31:59]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3664kb
  • [2024-10-30 14:31:58]
  • 提交

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;
}

Details

Tip: Click on the bar to expand more detailed information

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