QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#107686 | #5381. Cryptographer's Conundrum | PetroTarnavskyi# | AC ✓ | 2ms | 3436kb | C++17 | 620b | 2023-05-22 14:55:08 | 2023-05-22 14:55:09 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FOR(i, a, b) for (int i = (a); i<(b); ++i)
#define RFOR(i, b, a) for (int i = (b)-1; i>=(a); --i)
#define MP make_pair
#define PB push_back
#define F first
#define S second
typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
string t;
while (SZ(t) < SZ(s)) t += "PER";
int cnt = 0;
FOR(i, 0, SZ(s))
{
cnt += s[i] != t[i];
}
cout << cnt << '\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3316kb
input:
SECRET
output:
4
result:
ok single line: '4'
Test #2:
score: 0
Accepted
time: 2ms
memory: 3376kb
input:
HEZIOLUFDSRRPCRQETPEQWEKPFY
output:
18
result:
ok single line: '18'
Test #3:
score: 0
Accepted
time: 2ms
memory: 3344kb
input:
PEYYJLVERYERSJFVERYEEPED
output:
13
result:
ok single line: '13'
Test #4:
score: 0
Accepted
time: 2ms
memory: 3424kb
input:
PDRGERPERFERPERPERPEXPEHSQGPWRNERMERPBRPERPERDEIVYRPEREER
output:
17
result:
ok single line: '17'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3348kb
input:
EXUHPLXQNRRQIMYTKREEUWBRRSAKSYAIAWOR
output:
32
result:
ok single line: '32'
Test #6:
score: 0
Accepted
time: 1ms
memory: 3388kb
input:
PERWERUDSPKRYERPJRGERPURSEFWEVFERSMRPTTYDYPCRPEYPKXPORPPYBPRYWREWRPERFIKSEIPVRRERPCSPZNPWRRRBPEEEERPERPEHPUEEEGPEOFMQAKARERHYRYEHPERPEROERCEBYEBPPNEERPXRPEROCRUEEMER
output:
82
result:
ok single line: '82'
Test #7:
score: 0
Accepted
time: 2ms
memory: 3428kb
input:
PERPYRPBNPERESRPERPESRERPERPERPEFPQRPUAPMRPERPPYXIWAEWPWYPTRPERPZRPEJOEFKERPSPPERPVRPBRRERPEDPEESEOOERPERPRRPHRPEPYRRPERIEDPERPERPCTPERAKLPERIARPURMEOVEGUNWPERPERPMRPERPEQPCRPERPYRPERNFJXERRERPETPELPERPERPERPERMERPJRPWRPERPEROERDERPDRPERILHDERPERPERPERPEZKERMERPRRPERNECPENOERPWRPERTVYPERBICPERPEVPER
output:
96
result:
ok single line: '96'
Test #8:
score: 0
Accepted
time: 2ms
memory: 3324kb
input:
PERPERPSRPERPERIERPERPERPERPERPERPEUPEVPERPIRPERPERBERPERPERPERHERPERLEKPERPERPEJPERPEPPHRPERPEIPERPERPERPERPEXPERPWRPERPERPERPERPERNBRPENPEVPERPERPERPERPERPERPDRPIRPER
output:
21
result:
ok single line: '21'
Test #9:
score: 0
Accepted
time: 2ms
memory: 3376kb
input:
PERUERPERPEFPERPERPERPERUZRPERPECPERPEWPERPERPERPEQPERPERPERPPRPERRERPERPERPSRPERPERPERPERPHRJERPEPPERPERPERPERPMRPERPERPERPERPERPERPERPERPESPERPERPKRCERPERPERPERPERPERPERPERVEREEBPERPERPTEPERPERPERPERPERPELPEQPERPERPERPERZERPERPERPERPERPERPERPERPERPERPERPERPERPURPERPERPERPERPERPERPERPERPERPERPERPER
output:
26
result:
ok single line: '26'
Test #10:
score: 0
Accepted
time: 2ms
memory: 3436kb
input:
PERPEJIERPERLERAEGPEQPOBPERPERPIRPERPERPERPERDGSPERHERPERAERPERPERPEPXQRPERPMRBERTERPERXERPYRPLRPVRPERPERUERPARUERPEQPEQPEXPTRPERQNRRIRLERPERXEUPBRUHRPEROERPERPEPPERTFRZERPSRQERHERCQRPARPUKPERIERPLRPGYPEVPERAJRPWRHERPERPQRPVRPVRPECPELPERPZRBWLPEVPERLERPBRUEQWERPEUQERPTRPSWPELPERPDVWPXPERVARVWBPERPBR
output:
95
result:
ok single line: '95'
Test #11:
score: 0
Accepted
time: 2ms
memory: 3360kb
input:
PERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERKERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERHERPERPERPERPEROERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPEBPERPERPERPERPHRPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPERPER
output:
5
result:
ok single line: '5'