举报原因:抄题解 题目:P1308 原题解: (https://www.luogu.com.cn/problem/solution/P1308)
用户@今A的。
评测记录:(https://www.luogu.com.cn/record/list?pid=P1308&user=1066028)
源代码:
#include <iostream>
#include <string>
using namespace std;
void convert(string &p);
int main(void)
{
string key;
string data;
int flag = 0;
int demo = -1;
getline(cin,key);
getline(cin,data);
convert(data);
convert(key);
int i = 0; int j = 0;
while(data[i] != '\0')
{
if(flag == 0)
{
demo = i;
}
while(data[i] == key[j])
{
if(key[j+1] == '\0' && (data[i+1] == ' ' || data[i+1] == '\0'))
{
flag++;
break;
}
else
{
j++;
i++;
}
}
j = 0;
while(data[i++] != ' ' && data[i] != '\0')
{
}
}
if(flag != 0)
cout << flag << " " << demo;
else
cout << -1;
return 0;
}
void convert(string &p)
{
int i = 0;
while(p[i] != '\0')
{
if(p[i] >= 'A' && p[i] <= 'Z' )
p[i] += 32;
i++;
}
}
P1914:
原题解:https://www.luogu.com.cn/problem/solution/P1914
用户@AdzearDisjudge的。
评测记录:https://www.luogu.com.cn/record/list?pid=P1914&user=1066028
源代码:https://www.luogu.com.cn/record/139382152
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
string s;
int n,i,j;
cin>>n;
cin>>s;
for(i=0;i<s.size();++i)
{
for(j=1;j<=n;++j)
{
++s[i];
if(s[i]>'z')
s[i]='a';
}
}
cout<<s;
return 0;
}
P1200: 原题解:https://www.luogu.com.cn/problem/solution/P1200
用户@DrinkOnstage的。
评测记录:https://www.luogu.com.cn/record/list?pid=P1200&user=1066028
源代码:
#include <iostream>
int main()
{
using namespace std;
int a = 1 , b = 1;
char v;
while ( (v = cin.get() ) != '\n') a *= v - 'A' + 1;
while ( (v = cin.get() ) != '\n') b *= v - 'A' + 1;
if (a % 47 == b % 47) cout << "GO";
else cout << "STAY";
return 0;
}
代码一模一样,细节和变量名等一模一样。
请求处理!
祝各位管理员rp++!