QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#520977#8651. Table Tennisgreen_gold_dog#0 2ms3848kbC++201.5kb2024-08-15 19:06:222024-08-15 19:06:22

Judging History

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

  • [2024-08-15 19:06:22]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:3848kb
  • [2024-08-15 19:06:22]
  • 提交

answer

//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,sse,sse2,sse3,ssse3,sse4,abm,popcnt,mmx")
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;
typedef long double ldb;
typedef complex<double> cd;

constexpr ll INF64 = 9'000'000'000'000'000'000, INF32 = 2'000'000'000, MOD = 1'000'000'007;
constexpr db PI = acos(-1);
constexpr bool IS_FILE = false, IS_TEST_CASES = true;

random_device rd;
mt19937 rnd32(rd());
mt19937_64 rnd64(rd());

template<typename T>
bool assign_max(T& a, T b) {
	if (b > a) {
		a = b;
		return true;
	}
	return false;
}

template<typename T>
bool assign_min(T& a, T b) {
	if (b < a) {
		a = b;
		return true;
	}
	return false;
}

template<typename T>
T square(T a) {
	return a * a;
}

template<>
struct std::hash<pair<ll, ll>> {
	ll operator() (pair<ll, ll> p) const {
		return ((__int128)p.first * MOD + p.second) % INF64;
	}
};

void solve() {
	ll n, m;
	cin >> n >> m;
	cout << "YES\n";
	cout << "1\n";
	ll num = 2;
	for (ll i = 0; i < m; i++) {
		cout << "01";
		for (ll j = 2; j < num; j++) {
			cout << "1";
		}
		cout << '\n';
		num++;
	}
	for (ll i = 0; i < n - 2 - m; i++) {
		for (ll j = 0; j < num; j++) {
			cout << '1';
		}
		cout << '\n';
		num++;
	}
}

int main() {
	if (IS_FILE) {
		freopen("", "r", stdin);
		freopen("", "w", stdout);
	}
    	ios_base::sync_with_stdio(false);
    	cin.tie(0);
    	cout.tie(0);
	ll t = 1;
	if (IS_TEST_CASES) {
		cin >> t;
	}
	for (ll i = 0; i < t; i++) {
		solve();
	}
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3848kb

input:

97
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
23 0
24 0
25 0
26 0
27 0
28 0
29 0
30 0
31 0
32 0
33 0
34 0
35 0
36 0
37 0
38 0
39 0
40 0
41 0
42 0
43 0
44 0
45 0
46 0
47 0
48 0
49 0
50 0
51 0
52 0
53 0
54 0
55 0
56 0
57 0
58 0
59 0
60 0
61 0
62 0
63 0...

output:

YES
1
11
YES
1
11
111
YES
1
11
111
1111
YES
1
11
111
1111
11111
YES
1
11
111
1111
11111
111111
YES
1
11
111
1111
11111
111111
1111111
YES
1
11
111
1111
11111
111111
1111111
11111111
YES
1
11
111
1111
11111
111111
1111111
11111111
111111111
YES
1
11
111
1111
11111
111111
1111111
11111111
111111111
11...

result:

wrong answer Token "YES" doesn't correspond to pattern "(Yes)|(No)" (test case 1)

Subtask #2:

score: 0
Wrong Answer

Test #58:

score: 0
Wrong Answer
time: 0ms
memory: 3576kb

input:

1
4 4

output:

YES
1
01
011
0111
01111

result:

wrong answer Token "YES" doesn't correspond to pattern "(Yes)|(No)" (test case 1)

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Skipped

Dependency #3:

0%

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

0%