QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#298300#4832. Telepathyfxhd0 6ms4420kbC++17762b2024-01-05 23:20:442024-01-05 23:20:44

Judging History

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

  • [2024-01-05 23:20:44]
  • 评测
  • 测评结果:0
  • 用时:6ms
  • 内存:4420kb
  • [2024-01-05 23:20:44]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#ifdef DEBUG
  #include "debug.hpp"
#else
  #define dbg(...) 0
#endif

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  array<int, 8> T;
  if (s == "Flim") {
    T = {0, 1, 2, 2, 0, 1, 0, 0};
  }
  else {
    assert(s == "Flam");
    T = {0, 2, 0, 2, 1, 1, 0, 0};
  }
  int n, k;
  cin >> n >> k;
  string a;
  cin >> a;
  assert(int(a.size()) == n);
  vector<int> ans(k);
  for (int i = 0; i < k; ++i) {
    int b = (a[3 * i] == '1') * 4 + (a[3 * i + 1] == '1') * 2 + (a[3 * i + 2] == '1');
    ans[i] = 3 * i + T[b];
  }
  for (int i = 0; i < k; ++i) { 
    if (i > 0) cout << ' ';
    cout << (ans[i] + 1);
  }
  cout << '\n';
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 6ms
memory: 4420kb

input:

Flim
1000000 100000
1101111111100010011110111001110011110110100000111110011111111111110111110100000001001000000110111000000101110000001100111110100100000100010111001011111010001000101100101100001111011100110010010000100100100101110100100110101001001000001011111101111111001100101000010110001011011000...

output:

1 4 7 10 14 17 19 24 25 28 32 34 39 42 43 48 49 53 55 58 61 64 69 70 75 76 79 82 85 88 93 96 97 100 105 106 109 112 115 120 121 126 129 130 135 137 141 142 146 148 152 154 157 162 163 168 169 172 175 179 181 186 188 191 193 198 201 204 207 208 213 216 219 222 223 226 229 232 236 238 241 244 247 250 ...

input:

Flam
1000000 100000
0000001101000100010010001001011111000101010011011001010100101001110101001011001011100001011100110100011110011010100101110101101101100101111011000111001101001100010000010010101110101010111110001100110000110001001111010010000010111101110001011011101101010000111111011111100100010001...

output:

1 4 7 11 13 18 21 22 26 29 31 35 37 41 45 47 50 53 55 58 62 64 67 71 74 77 80 82 85 89 91 96 97 102 103 108 110 112 115 118 121 124 127 130 133 136 140 143 147 149 151 155 157 162 163 168 171 172 175 178 182 186 187 190 193 198 199 204 205 209 211 215 219 220 225 228 229 232 235 239 242 244 247 251 ...

result:

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