QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#313178 | #4832. Telepathy | tuanlinh123 | 0 | 4ms | 5892kb | C++20 | 575b | 2024-01-24 16:27:28 | 2024-01-24 16:27:28 |
answer
#include<bits/stdc++.h>
#define ll long long
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ld long double
using namespace std;
ll str[8]={2, 0, 1, 1, 2, 2, 2, 2};
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
string s; cin >> s;
ll n, k; cin >> n >> k >> s;
vector <ll> ans;
for (ll i=1; i<=n; i+=10)
{
ll bit=(s[i]-'0')+(s[i+1]-'0')*2+(s[i+2]-'0')*4;
ans.pb(i+str[bit]);
}
for (ll i:ans) cout << i << " ";
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 4ms
memory: 5892kb
input:
Flim 1000000 100000 1101111111100010011110111001110011110110100000111110011111111111110111110100000001001000000110111000000101110000001100111110100100000100010111001011111010001000101100101100001111011100110010010000100100100101110100100110101001001000001011111101111111001100101000010110001011011000...
output:
3 13 23 33 43 53 63 73 81 92 103 113 122 133 141 152 163 173 181 191 202 211 222 233 243 253 263 273 283 292 303 313 322 333 343 352 363 373 383 393 401 413 422 433 443 452 463 473 482 493 503 513 522 533 543 552 562 572 581 591 603 613 623 632 643 652 662 673 683 692 703 712 722 731 743 753 763 771...
input:
Flam 1000000 100000 0000001101000100010010001001011111000101010011011001010100101001110101001011001011100001011100110100011110011010100101110101101101100101111011000111001101001100010000010010101110101010111110001100110000110001001111010010000010111101110001011011101101010000111111011111100100010001...
output:
3 13 23 33 41 53 63 72 82 91 103 112 123 133 141 153 161 172 182 193 203 213 223 233 243 251 263 271 282 293 303 313 323 333 342 353 361 373 381 393 401 413 422 433 443 453 463 472 483 492 503 513 523 533 543 553 562 571 581 591 603 613 623 633 641 653 663 673 681 693 703 713 721 733 743 752 762 773...
result:
wrong answer 47657 matched, but you need to match at least 66666 positions