QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#357881#4832. Telepathyiliaaaaa0 0ms0kbC++20921b2024-03-19 14:15:182024-03-19 14:15:18

Judging History

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

  • [2024-03-19 14:15:18]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-03-19 14:15:18]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef long double ld;
#define F first
#define S second
#define All(x) (x).begin(), (x).end()
#define len(x) (int) (x).size()
#define pb push_back

int bit(int x, int y) {
	return (x >> y) & 1;
}

void out(int x) {
	for (int i = 1; i >= 0; i--)
		cout << ((x >> i) & 1);
}
 
int get(int x, int k) {
	if (!x)
		return k - 1;
	return __builtin_ctz(x);
}


int32_t main() {
	ios:: sync_with_stdio(0), cin.tie(0), cout.tie(0);
	string s, a;
	vector<int> ans;
	int n, k;
	cin >> s >> a >> n >> k;
	for (int i = 0; i < k; i++) {
		int frst = -1;
		for (int j = 10 * i; j < 10 * (i + 1); j++)
			if (a[j] == '1') {
				frst = j;
				break;
			}
		if (frst == -1)
			frst = 10 * (i + 1) - 1;
		ans.pb(frst + 1);
	}
	for (int x: ans)
		cout << x << ' ';
	cout << '\n';
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Stage 1: Program answer Runtime Error

input:

Flim
1000000 100000
1101111111100010011110111001110011110110100000111110011111111111110111110100000001001000000110111000000101110000001100111110100100000100010111001011111010001000101100101100001111011100110010010000100100100101110100100110101001001000001011111101111111001100101000010110001011011000...

output:


input:


output:


result: