QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#294395#4832. Telepathyucup-team055#0 8ms4176kbC++23693b2023-12-30 13:21:452023-12-30 13:21:45

Judging History

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

  • [2023-12-30 13:21:45]
  • 评测
  • 测评结果:0
  • 用时:8ms
  • 内存:4176kb
  • [2023-12-30 13:21:45]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = LLONG_MAX / 4;
#define rep(i, a, b) for(ll i = a; i < b; i++)
#define all(a) begin(a), end(a)
template<class T> bool chmin(T& a, T b) { if(a <= b) return 0; a = b; return 1; }
template<class T> bool chmax(T& a, T b) { if(a >= b) return 0; a = b; return 1; }


int main() {
    cin.tie(0)->sync_with_stdio(0);
    
    string player;
    ll N, K;
    string S;
    
    cin >> player >> N >> K >> S;
    
    assert(ranges::count(S, '0') >= K);
    
    for(ll i = 0; i < N; i++) if(S[i] == '0') {
        K--;
        cout << i + 1 << " \n"[!K];
        if(K == 0) return 0;
    }
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 8ms
memory: 4176kb

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:

1 2 3 4 5 6 9 11 12 13 15 16 17 19 20 22 23 24 26 27 29 35 36 37 39 41 43 44 47 50 51 53 55 57 58 60 62 63 67 69 71 72 74 77 78 80 84 85 86 87 89 93 94 97 99 100 101 106 107 110 112 114 115 117 121 123 126 129 132 133 135 140 143 144 145 149 150 153 155 156 159 160 161 163 164 165 166 167 169 170 17...

result:

wrong answer 50007 matched, but you need to match at least 66666 positions