QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#107686#5381. Cryptographer's ConundrumPetroTarnavskyi#AC ✓2ms3436kbC++17620b2023-05-22 14:55:082023-05-22 14:55:09

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-22 14:55:09]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3436kb
  • [2023-05-22 14:55:08]
  • 提交

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;
}

详细

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'