QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#324406#4832. Telepathyhotboy27030 7ms4400kbC++141.3kb2024-02-10 18:20:302024-02-10 18:20:31

Judging History

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

  • [2024-02-10 18:20:31]
  • 评测
  • 测评结果:0
  • 用时:7ms
  • 内存:4400kb
  • [2024-02-10 18:20:30]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define pll pair <ll,ll>
#define fi first
#define se second
#define sz(a) (ll((a).size()))
#define BIT(mask,i) (((mask) >> (i))&1LL)
#define MASK(i) (1LL << (i))
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll random(ll l,ll r){
    return rng()%(r-l+1)+l;
}
ll myrandom(ll i){
    return rng()%i;
}
ll sz = 6;
ll a[] = {4,3,2,2,0,3,0,1,3,3,2,2,0,3,0,1,5,3,2,2,0,3,0,5,0,3,2,2,0,3,0,4,0,3,2,2,0,3,0,1,0,3,2,2,0,3,0,1,5,3,2,2,0,3,0,5,0,3,2,2,0,3,0,2,4,2,1,2,1,1,1,1,0,2,0,2,0,3,0,3,1,2,0,2,1,1,1,1,0,2,0,2,0,3,0,3,4,2,2,2,1,1,1,1,0,2,0,2,0,4,0,5,4,2,2,2,1,1,1,1,0,2,0,2,0,4,0,3};
int main(){
    ios_base::sync_with_stdio(0);cin.tie(nullptr);cout.tie(nullptr);
    string task;
    cin>>task;
    ll n,k;
    cin>>n>>k;
    string s;
    cin>>s;
    for (ll i = 1;i <= k;i ++){
        ll mask = 0;
        ll st = i * sz - 5;
        for (ll j = 0;j < sz;j ++)mask += (s[j + st] == '1') * MASK(j);
        cout<<a[mask+(task=="Flam")*MASK(sz)]+st<<' ';
    }
    cout<<'\n';
}
/*
Flim
20 5
00101011011110111001
4 8 11 16 17
0 1 1 1 1
Flam
20 5
11000111101000011010
1 7 12 15 20
0 1 1 1 1
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 7ms
memory: 4400kb

input:

Flim
1000000 100000
1101111111100010011110111001110011110110100000111110011111111111110111110100000001001000000110111000000101110000001100111110100100000100010111001011111010001000101100101100001111011100110010010000100100100101110100100110101001001000001011111101111111001100101000010110001011011000...

output:

4 8 15 21 25 31 39 43 51 57 65 71 76 79 89 93 101 106 109 118 123 130 136 140 145 153 157 166 172 180 184 189 196 202 208 214 219 223 229 235 244 248 256 264 267 271 281 283 292 297 301 307 316 319 327 334 337 346 352 355 365 370 374 382 387 396 399 403 411 418 423 427 436 439 447 453 460 468 469 47...

input:

Flam
1000000 100000
0000001101000100010010001001011111000101010011011001010100101001110101001011001011100001011100110100011110011010100101110101101101100101111011000111001101001100010000010010101110101010111110001100110000110001001111010010000010111101110001011011101101010000111111011111100100010001...

output:

5 8 15 21 26 32 38 44 50 57 61 68 74 79 86 93 99 105 109 118 125 130 137 140 146 152 159 164 169 177 181 189 195 199 206 212 218 223 232 236 241 248 253 260 268 273 278 283 289 297 301 307 316 320 327 336 339 343 350 355 363 368 373 380 390 391 398 404 411 417 423 429 434 443 449 452 457 465 473 476...

result:

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