QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#324203 | #4832. Telepathy | ucup-team1069# | 0 | 10ms | 4968kb | C++23 | 798b | 2024-02-10 16:55:41 | 2024-02-10 16:55:42 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0), cin.tie(0);
int n = 1e6, k = 1e5;
string s, t;
cin >> s >> n >> k >> t;
vector<int> ans;
if (s == "Flim") {
for (int i = 0; i < n; ++i) {
if (t[i] == '0') {
ans.push_back(i + 1);
if (ans.size() == k) break;
}
}
sort(ans.begin(), ans.end());
for (int i : ans) cout << i << " ";
}
else {
for (int i = n - 1; i >= 0; --i) {
if (t[i] == '0') {
ans.push_back(i + 1);
if (ans.size() == k) break;
}
}
sort(ans.begin(), ans.end());
for (int i : ans) cout << i << " ";
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 10ms
memory: 4968kb
input:
Flim 1000000 100000 1101111111100010011110111001110011110110100000111110011111111111110111110100000001001000000110111000000101110000001100111110100100000100010111001011111010001000101100101100001111011100110010010000100100100101110100100110101001001000001011111101111111001100101000010110001011011000...
output:
3 12 13 14 16 17 22 26 27 31 32 37 40 42 43 44 45 46 52 53 67 73 75 76 77 78 79 80 81 83 84 86 87 88 89 90 91 94 98 99 100 101 102 103 105 109 110 111 112 113 114 117 118 124 126 127 129 130 131 132 133 135 136 137 139 143 144 146 152 154 155 156 158 159 160 162 165 166 168 171 172 173 174 179 183 1...
input:
Flam 1000000 100000 0000001101000100010010001001011111000101010011011001010100101001110101001011001011100001011100110100011110011010100101110101101101100101111011000111001101001100010000010010101110101010111110001100110000110001001111010010000010111101110001011011101101010000111111011111100100010001...
output:
799998 799999 800000 800002 800004 800005 800007 800008 800009 800010 800012 800014 800018 800019 800020 800022 800026 800029 800031 800037 800045 800047 800049 800051 800052 800054 800056 800057 800060 800061 800067 800075 800076 800078 800081 800089 800090 800091 800094 800095 800096 800097 800100...
result:
wrong answer 50239 matched, but you need to match at least 66666 positions