submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s942090988 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string x,y;
int sum;
cin>>x;
sum=strlen(x);/
sum=sum-1;
for(int i=0;a[i]!='\0';i++){
if(x[i]=='b') y[sum]='d';
if(x[i]=='d') y[sum]='b';
if(x[i]=='p') y[sum]='q';
if(x[i]=='q') y[sum]='p';
sum--;
}... | a.cc: In function 'int main()':
a.cc:8:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
8 | sum=strlen(x);/
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/incl... |
s277750731 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char x[88888888],y[88888888];
int sum;
cin>>x;
sum=strlen(x);/
sum=sum-1;
for(int i=0;a[i]!='\0';i++){
if(x[i]=='b') y[sum]='d';
if(x[i]=='d') y[sum]='b';
if(x[i]=='p') y[sum]='q';
if(x[i]=='q') y[sum]='p';
... | a.cc: In function 'int main()':
a.cc:8:19: error: expected primary-expression before '/' token
8 | sum=strlen(x);/
| ^
a.cc:10:17: error: 'a' was not declared in this scope
10 | for(int i=0;a[i]!='\0';i++){
| ^
|
s793283278 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main(){
cin>>s;
string s1=reverse(s.begin(),s.end());
for(interestingi;i<s.length();i++){
if(s[i]=='b')s[i]=d;
else if(s[i]=='d')s[i]=='b';
else if(s[i]=='p')s[i]='q';
else if(s[i]=='q')s[i]='p';
}
if(s==s1)cout<<"Yes";
else cout<<"No";
} | a.cc: In function 'int main()':
a.cc:6:26: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
6 | string s1=reverse(s.begin(),s.end());
| ~~~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:7:13: error: 'interestingi' was not declared in thi... |
s081689138 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main(){
cin>>s;
string s1=reverse(s.begin(),s.end());
for(interestingi;i<s.length();i++){
if(s[i]=='b')s[i]=d;
else if(s[i]=='d')s[i]=='b';
else if(s[i]=='p')s[i]='q';
else if(s[i]=='q')s[i]='p;
}
if(s==s1)cout<<"Yes";
else cout<<"No";
} | a.cc:11:40: warning: missing terminating ' character
11 | else if(s[i]=='q')s[i]='p;
| ^
a.cc:11:40: error: missing terminating ' character
11 | else if(s[i]=='q')s[i]='p;
| ^~~
a.cc: In funct... |
s078660209 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main(){
cin>>s;
string s1=reverse(s1.begin(),s1.end());
for(interestingi;i<s.length();i++){
if(s[i]=='b')s[i]=d;
else if(s[i]=='d')s[i]=='b';
else if(s[i]=='p')s[i]='q';
else if(s[i]=='q')s[i]=p;
}
if(s==s1)cout<<"Yes";
else cout<<"No";
} | a.cc: In function 'int main()':
a.cc:6:26: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
6 | string s1=reverse(s1.begin(),s1.end());
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:7:13: error: 'interestingi' was not declared in... |
s038089097 | p03889 | C++ | #include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n))
#define Vec(a,n) vector<string> (a)((n))
#define twovec(a,n,m) vector<vector<int>> a(n,vector<int>(m,0))
#define Twovec(a,n,m) vector<v... | a.cc:19:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
19 | void Debug(auto a);
| ^~~~
a.cc:20:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
20 | int nibul(auto a,auto b);
| ... |
s548459149 | p03889 | C++ | #include <iostream>
using namespace std;
int main()
{
string s;
cin >> s;
string s1(s);
s1.reverse();
const int slen = s1.length();
for (int i = 0; i < slen; i++)
{
if (s1[i] == 'b') s1[i] = 'd';
else if (s1[i] == 'd') s1[i] = 'b';
else if (s1[i] == 'p') s1[i] = 'q';
else if (s1[i] == 'q') s1[i] = ... | a.cc: In function 'int main()':
a.cc:9:12: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
9 | s1.reverse();
| ^~~~~~~
| reserve
|
s636689994 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int s;
string p,q;
cin>>p;
s=p.size();
for(int i=0;i<s;i++){
q[i]=p[s-i-1];//这里翻转之后的在P数组里,后面修改的却是Q数组
if(q[i]=='b')
q[i]='d';
else
if(q[i]=='d')
q[i]='b';
else
... | a.cc:33:1: error: stray '`' in program
33 | ```
| ^
a.cc:33:2: error: stray '`' in program
33 | ```
| ^
a.cc:33:3: error: stray '`' in program
33 | ```
| ^
a.cc:32:1: error: '\U00006e90\U00007801' does not name a type
32 | 源码
| ^~~~
a.cc:36:5: error: redefinition of 'int main()'
... |
s668111117 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string a;
int main()
{
cin>>a;
int len=a.size();
if(len%2==1)
{
cout<<"No";
cout<<endl;
return 0;
}
int r=0;
for(int i=0,j=len-1;i<j;i++,j--)
{
if((a[i]=='p' && a[j]=='q') || (a[i]=='q' && a[j]=='p') ||(a[i]==... | a.cc: In function 'int main()':
a.cc:20:10: error: expected '}' at end of input
20 | {
| ~^
a.cc:20:10: error: expected '}' at end of input
a.cc:17:5: note: to match this '{'
17 | {
| ^
a.cc:20:10: error: expected '}' at end of input
20 | {
| ^
a.cc:6:... |
s923151389 | p03889 | C++ | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000000
using namespace std;
string s,ll;
int main(){
cin>>s;
lll=s;
for(int i=0;i<s.size()/2;i++)swap(s[i],s[s.size()-1-i ] );
for(int i=0;i<s.size();i++){
switch(s[i]){
case 'b':s[i]='d';break;
case 'd':s[i]='... | a.cc:2:12: error: expected unqualified-id before 'long'
2 | #define ll long long
| ^~~~
a.cc:5:10: note: in expansion of macro 'll'
5 | string s,ll;
| ^~
a.cc: In function 'int main()':
a.cc:8:5: error: 'lll' was not declared in this scope; did you mean 'll'?
8 | lll=s;
... |
s438802007 | p03889 | C++ | #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
char s[100005],s1[100005];
int main()
{
gets(s);
int len=strlen(s),m=-1;
for(int i=len-1;i>=0;i--)
{
s1[++m]=s[i];
if(s1[m]=='b')s1[m]='d';
else if(s1[m]=='d')s1[m]='b';
else if(s1[m]=='p')s1[m]='q';
else if(s1[m]=='q')s1[m]='p';
... | a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(s);
| ^~~~
| getw
|
s739266775 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s1;
cin>>s1;
string b=s1;
reverse(s1.begin(),s1.end());
for(int i=0;i<s1.size();++i)
{
if(s1[i]=='b') s1[i]='d';
else if(s1[i]=='d') s1[i]='b';
else if(s1[i]=='p') s1[i]='q';
else if(s1[i]=='q') s1[i]... | a.cc: In function 'int main()':
a.cc:17:6: error: 'court' was not declared in this scope
17 | court<<endl;
| ^~~~~
|
s570943330 | p03889 | C++ | #include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
char s[100007];
int get[128];
int main()
{
get['b'] = 0 , get['p'] = 1 , get['d'] = 2 , get['q'] = 3;
scanf("%s",s+1);
for(int l = strlen(s+1), i = 1; i <= (l>>1) + 1; ++i)
{
if(get[s[i]]^((get[s[l-i+1]]+2)%4)) return printf(... | a.cc: In function 'int main()':
a.cc:15:30: error: expected '}' at end of input
15 | return printf("Yes\n"),0;
| ^
a.cc:8:1: note: to match this '{'
8 | {
| ^
|
s795535940 | p03889 | C++ | include<bits/stdc++.h>
using namespace std;
int main() {
cout<<"Yes"<<endl;
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:5: error: 'cout' was not declared in this scope
4 | cout<<"Yes"<<endl;
| ^~~~
a.cc:4:18: error: 'endl' was not declared in this scope
4 | cout<<"Yes"<<endl;
... |
s018868280 | p03889 | C++ | #include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
string a;
cin>>a;
if(a[0]=='b') b++;
if(a[0]=='d') d++;
if(a[0]=='q') q++;
if(a[0]=='p') p++;
if(a[1]=='b') b++;
if(a[1]=='d') d++;
if(a[1]=='q') q++;
if(a[1]=='p') p++;
if(a[2]=='b') b++;
if(a[2]=='d') d++;
if(a[2]=='q') q++;
if(a[2]=... | a.cc: In function 'int main()':
a.cc:8:23: error: 'b' was not declared in this scope
8 | if(a[0]=='b') b++;
| ^
a.cc:9:23: error: 'd' was not declared in this scope
9 | if(a[0]=='d') d++;
| ^
a.cc:10:23: error: 'q' was not declared in this ... |
s778777739 | p03889 | C++ | #include<iostream>
#include<cstring>
using namespace std;
int main(){
string a,b;
cin>>a;
b=a;
reverse(a.begin(),a.end());
for(int i=0;i<a.size();++i)
{
if(a[i]=='b') a[i]='d';
else if(a[i]=='d') a[i]='b';
else if(a[i]=='p') a[i]='q';
else if(a[i]=='q') a[i]='p';
... | a.cc: In function 'int main()':
a.cc:8:5: error: 'reverse' was not declared in this scope
8 | reverse(a.begin(),a.end());
| ^~~~~~~
|
s379601326 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
string b=a;
reverse(a.begin(),a.end());
for(int i=0;i<a.size();++i)
{
if(a[i]=='b') a[i]='d';
else if(a[i]=='d') a[i]='b';
else if(a[i]=='p') a[i]='q';
else if(a[i]=='q') a[i]='p';
}
... | a.cc: In function 'int main()':
a.cc:18:12: error: unable to find numeric literal operator 'operator""\U0000ff1b'
18 | return 0;
| ^~~
a.cc:18:15: error: expected ';' before '}' token
18 | return 0;
| ^
| ;
19 | }
| ~
|
s377461327 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
string b=a;
reverse(a.begin(),a.end());
for(int i=0;i<a.size();++i)
{
if(a[i]=='b') a[i]='d';
else if(a[i]=='d') a[i]='b';了
else if(a[i]=='p') a[i]='q';
else if(a[i]=='q') a[i]='p';
}
... | a.cc: In function 'int main()':
a.cc:11:37: error: '\U00004e86' was not declared in this scope
11 | else if(a[i]=='d') a[i]='b';了
| ^~
a.cc:13:9: error: 'else' without a previous 'if'
13 | else if(a[i]=='q') a[i]='p';
| ^~~~
|
s004322196 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
char a[100001],b[10001];
int len;
int main()
{
cin>>a;
strcpy(b,a);
strrev(a);
len=strlen(a);
for(int i=0;i<len;i++)
{
if(a[i]=='b') a[i]='d';
else if(a[i]=='d') a[i]='b';
else if(a[i]=='q') a[i]='p';
else if(a[i]=='p') a[i]='q';
}
if(strcmp(a,b)==0)
{
cou... | a.cc: In function 'int main()':
a.cc:9:9: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
9 | strrev(a);
| ^~~~~~
| strsep
|
s974522603 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
char a[100001],b[10001];
int len;
int main()
{
cin>>a;
strcpy(b,a);
strrev(a);
len=strlen(a);
for(int i=0;i<len;i++)
{
if(a[i]=='b') a[i]='d';
else if(a[i]=='d') a[i]='b';
else if(a[i]=='q') a[i]='p';
else if(a[i]=='p') a[i]='q';
}
if(strcmp(a,b)==0)
{
cou... | a.cc: In function 'int main()':
a.cc:9:9: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
9 | strrev(a);
| ^~~~~~
| strsep
|
s745575050 | p03889 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int m,n;
char a[100005],b;
int abs(int x){
if(x>=0) return x;
else return x*-1;
}
int main(){
while((a[++m]=getchar())!='\n');
if(m%2!=0){
cout<<"No"<<endl;
return 0;
}
for(int i=m;i>=m/2;i--){
int cha=abs(a[i],a[m-i+1]);
if(cha!=1&&cha!=2){
... | a.cc: In function 'int main()':
a.cc:17:28: error: no matching function for call to 'abs(char&, char&)'
17 | int cha=abs(a[i],a[m-i+1]);
| ~~~^~~~~~~~~~~~~~~
a.cc:6:5: note: candidate: 'int abs(int)'
6 | int abs(int x){
| ^~~
a.cc:6:5: note: candidate exp... |
s652470882 | p03889 | C++ | #include <iostream>
#include <cstdio>
#include<bits/stdc++.h>
using namespace std;
int m,n;
string a,b;
char czy(char x){
if(x=='d'){
return x-2;
}
if(x=='b'){
return x+2;
}
if(x=='p'){
return x+1;
}
if(x=='q'){
return x-1;
}
}
int main(){
while((b=getchar())!='\n'){
cin>>b;
a[++m]=b;
}
if(m%2!=... | a.cc: In function 'int main()':
a.cc:22:28: error: no match for 'operator!=' (operand types are 'std::__cxx11::basic_string<char>' and 'char')
22 | while((b=getchar())!='\n'){
| ~~~~~~~~~~~~~^~~~~~
| | |
| | char
| ... |
s144105045 | p03889 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<(n))
#define BITCNT(n) (__builtin_popcount... | a.cc: In function 'int main()':
a.cc:38:19: error: 'n' was not declared in this scope
38 | for(int i=0;i<n/2;i++){
| ^
|
s303100763 | p03889 | C++ | #include <iostream>
using namespace std;
int main{
cout<<"NO";
return 0;
} | a.cc:3:5: error: cannot declare '::main' to be a global variable
3 | int main{
| ^~~~
a.cc:4:15: error: expected '}' before ';' token
4 | cout<<"NO";
| ^
a.cc:3:9: note: to match this '{'
3 | int main{
| ^
a.cc:4:9: error: invalid user-defined conversion from ... |
s423669749 | p03889 | C++ | #include<bits/stdc++.h>//'三玖是天! '.
using namespace std;
int main()
{
string s,ss;
cin>>s;
ss=s;
reverse(s.begin(),s.end());
for(int i=0;i<s.size();i++)
{
if(s[i]=='b')s[i]='d';
else if(s[i]=='d')s[i]='b';
else if(s[i]=='p')s[i]='q';
else(s[i]=='q')s[i]='p';
}
if(ss==s)cout<<"Yes"<<endl;
else cout<<"No"... | a.cc: In function 'int main()':
a.cc:14:32: error: expected ';' before 's'
14 | else(s[i]=='q')s[i]='p';
| ^
| ;
|
s321977978 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a,s;
int main(){
cin >> a;
s = a;
reverse(a.begin(),a.end());
for (int i = 0; i < a.size(); i++){
if (a[i] == "b") a[i] = "d";
else if (a[i] == "d") a[i] = "b";
else if (a[i] == "p") a[i] = "q";
else a[i] = "p";
}
... | a.cc: In function 'int main()':
a.cc:9:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if (a[i] == "b") a[i] = "d";
a.cc:9:33: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
... |
s755904735 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a,s;
int main(){
cin >> a;
s = a;
reverse(a.begin(),a.end());
for (int i = 0; i < a.size(); i++){
if (a[i] == "b") a[i] = "d";
else if (a[i] == "d") a[i] = "b";
else if (a[i] == "p") a[i] = "q";
else a[i] = "p";
}
... | a.cc: In function 'int main()':
a.cc:9:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if (a[i] == "b") a[i] = "d";
a.cc:9:33: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
... |
s233894016 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
string a,s;
int main(){
cin >> a;
b = a;
reverse(a.begin(),a.end());
for (int i = 0; i < a.size(); i++){
if (a[i] == "b") a[i] = "d";
else if (a[i] == "d") a[i] = "b";
else if (a[i] == "p") a[i] = "q";
else a[i] = "p";
}
... | a.cc: In function 'int main()':
a.cc:6:5: error: 'b' was not declared in this scope
6 | b = a;
| ^
a.cc:9:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if (a[i] == "b") a[i] = "d";
a.cc:9:33: error: invalid conversion from 'const char*' to '__gnu_cxx:... |
s036415101 | p03889 | C++ | #include <cstdio>
#include <string>
#include <iostream>
int main() {
std::string a, b;
std::cin >> a;
b = a;
std::reverse(a.begin(), a.end());
int len = a.size();
for (int i = 0; i < len; ++i)
{
if (a[i] == 'b') a[i] = 'd';
else if (a[i] == 'd') a[i] = 'b';
else if (a[i] == 'p') a[i] = 'q';
else if (a[i]... | a.cc: In function 'int main()':
a.cc:8:14: error: 'reverse' is not a member of 'std'
8 | std::reverse(a.begin(), a.end());
| ^~~~~~~
|
s714502966 | p03889 | C++ | #include<iostream>
using namespace std;
int main()
{
cin>>s;
string s1=s;
int n=s.length();
for(int i=0;i<n/2;++i)
{
if(s1[i]=='b')s1[i]=='d';
if(s1[i]=='d')s1[i]=='b';
if(s1[i]=='q')s1[i]=='p';
if(s1[i]=='p')s1[i]=='q';
if(s1[n-i-1]=='b')s1[n-i-1]=='d';
if(s1[n-i-1]=='d')s1[n-i-1]=='b';
if(s1[n-i-1... | a.cc: In function 'int main()':
a.cc:5:14: error: 's' was not declared in this scope
5 | cin>>s;
| ^
|
s815001253 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string a,b;
int main()
{
cin>>a;
a=b;
reverse(a.begin(),a.end());
for(int i=0;i<a.size();++i)
{
if(a[i]=='b') a[i]='d';
else if(a[i]=='d') a[i]='b';
else if(a[i]=='p') a[i]='q';
else if(a[i]=='q') a[i]='p';
}
if(a==... | a.cc: In function 'int main()':
a.cc:17:17: error: expected primary-expression before '/' token
17 | cout<<"Yes";/
| ^
a.cc:18:5: error: expected primary-expression before 'else'
18 | else
| ^~~~
|
s851868071 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100010];
int main()
{
scanf("%s",s);
int l=strlen(s);
for(i=0;i<=l/2;i++)
{
if(s[i]=='b'&&s[l-i]!='d'||s[i]=='d'&&s[l-i]!='b'||s[i]=='p'&&s[l-i]!='q'||s[i]=='q'&&s[l-i]!='p')
{
cout<<"No";
return 0;
}
}
cout<<"Yes";
} | a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
8 | for(i=0;i<=l/2;i++)
| ^
|
s692754173 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
char a[10001],b[10001];
int main()
{
gets_s(a);
int l=strlen(a);
for(int i=0;i<l;i++)
{
b[l-i-1]=a[i];
if(a[i]=='b') a[i]='d';
else if(a[i]=='d') a[i]='b';
else if(a[i]=='p') a[i]='q';
else if(a[i]=='q') a[i]='p';
}
for(int i=0;i<l;i++)
if(a[i]!=b[i]) puts... | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets_s' was not declared in this scope; did you mean 'getsid'?
6 | gets_s(a);
| ^~~~~~
| getsid
|
s880324222 | p03889 | C++ | #include<bits/stdc++.h>
char s[200000];
int get[128];
int main()
{
get['b'] = 0;
get['p'] = 1;
get['d'] = 2;
get['q'] = 3;
scanf("%s",s+1);
for(int i=strlen(s+1),i=1;i<=(l>>1)+1;++i)
{
if(get[s[i]]^((get[s[l-i+1]]+2)%4))
{
return printf("No\n"),0;
}
}
return printf("Yes\n"),... | a.cc: In function 'int main()':
a.cc:11:27: error: redeclaration of 'int i'
11 | for(int i=strlen(s+1),i=1;i<=(l>>1)+1;++i)
| ^
a.cc:11:13: note: 'int i' previously declared here
11 | for(int i=strlen(s+1),i=1;i<=(l>>1)+1;++i)
| ^
a.cc:11:35: error: 'l' wa... |
s915002634 | p03889 | C++ | #include<cstdio>
#include<iostream>
#include<cstring>
#include<stack>
using namespace std;
stack<char>s;
string a;
int main()
{
cin>>a;
int n=a.size();
for(int i=0;i<n;i++)
{
s.push(a[i]);
}
bool j=1;
for(int i=0;i<n;i++)
{
char t=s.t();
if(t=='b')
{
t='d';
}... | a.cc: In function 'int main()':
a.cc:19:18: error: 'class std::stack<char>' has no member named 't'
19 | char t=s.t();
| ^
|
s674843335 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char a[100005],b[100005];
cin>>a;
int a1=strlen(a),ans=0;
for(int i=0;i<a1;i++){
if(a[i]=='b') b[i]='d';
if(a[i]=='d') b[i]='b';
if(a[i]=='q') b[i]='p';
if(a[i]=='p') b[i]='q';
}
for(int i=0;i<a1;i++){
... | a.cc: In function 'int main()':
a.cc:14:20: error: 'a1ppqb' was not declared in this scope
14 | if(a[i]!=b[a1ppqb-i-1]){
| ^~~~~~
|
s039557144 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char a[100005],b[100005];
cin>>a;
int a1=strlen(a),ans=0;
for(int i=0;i<a1;i++){
if(a[i]=='b') b[i]='d';
if(a[i]=='d') b[i]='b';
if(a[i]=='q') b[i]='p';
if(a[i]=='p') b[i]='q';
}
for(int i=0;i<a1;i++){
if(a[i]!=b[a1ppqb-i-1]){
cout<<"No";
... | a.cc: In function 'int main()':
a.cc:14:28: error: 'a1ppqb' was not declared in this scope
14 | if(a[i]!=b[a1ppqb-i-1]){
| ^~~~~~
|
s807900447 | p03889 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string a,b;
cin>>a;
int l=a.size()-1,t=l;
for(int i=0;i<l;i++){
b[i]=a[t--];
}
t=0;
for(int i=0;i<=l;i++){
if(b[i]=="d")b[t++]="b";
if(b[i]=="b")b[t++]="d";
if(b[i]=="p")b[t++]="q";
... | a.cc: In function 'int main()':
a.cc:14:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
14 | if(b[i]=="d")b[t++]="b";
a.cc:14:29: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
... |
s346828660 | p03889 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string a,b;
cin>>a;
int l=a.size()-1;
for(int i=l;i>=0;i--){
if(a[i]=="d")b[l-i]="b";
if(a[i]=="b")b[l-i]="d";
if(a[i]=="p")b[l-i]="q";
if(a[i]=="q")b[l-i]="p";
}
if(a==b)cout<<"Yes";
else
... | a.cc: In function 'int main()':
a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | if(a[i]=="d")b[l-i]="b";
a.cc:10:29: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
... |
s374156728 | p03889 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string a,b;
cin>>a;
int l=a.size()-1;
for(int i=l;i>=0;i--){
if(a[i]==d)b[l-i]=b;
if(a[i]==b)b[l-i]=d;
if(a[i]==p)b[l-i]=q;
if(a[i]==q)b[l-i]=p;
}
if(a==b)cout<<"Yes";
else
cout<<"No";
... | a.cc: In function 'int main()':
a.cc:10:18: error: 'd' was not declared in this scope
10 | if(a[i]==d)b[l-i]=b;
| ^
a.cc:10:27: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char... |
s903791847 | p03889 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string a,b;
cin>>a;
int l=a.size()-1;
for(int i=l;i>=0;i--){
if(a[i]==d)b[L-i]=b;
if(a[i]==b)b[L-i]=d;
if(a[i]==p)b[L-i]=q;
if(a[i]==q)b[L-i]=p;
}
if(a==b)cout<<"Yes";
else
cout<<"No";
... | a.cc: In function 'int main()':
a.cc:10:18: error: 'd' was not declared in this scope
10 | if(a[i]==d)b[L-i]=b;
| ^
a.cc:10:22: error: 'L' was not declared in this scope
10 | if(a[i]==d)b[L-i]=b;
| ^
a.cc:11:16: error: no match for 'operator==' (op... |
s929546942 | p03889 | C++ | #include<stdio.h>
#include<cstring>
char s[100005];
char f['z'];
int len;
int main(){
f['b']='d';
f['d']='b';
f['p']='q';
f['q']='p';
gets(s+1);
len=strlen(s+1);
int p=len>>1;
for (int i=1;i<=p;i++){
if (f[s[i]]!=s[len-i+1]){
puts("No");
return 0;
}
}
puts("Yes");
return 0;
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(s+1);
| ^~~~
| getw
|
s630590464 | p03889 | C++ | #include<stdio.h>
#include<cstring>
char s[100005];
char f[500];
int len;
int main(){
f['b']='d';
f['d']='b';
f['p']='q';
f['q']='p';
gets(s+1);
len=strlen(s+1);
int p=len>>1;
for (int i=1;i<=p;i++){
if (f[s[i]]!=s[len-i+1]){
puts("No");
return 0;
}
}
puts("Yes");
return 0;
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(s+1);
| ^~~~
| getw
|
s366202665 | p03889 | C++ | #include<stdio.h>
#include<string.h>
char s[100005];
char f[500];
int len;
int main(){
f['b']='d';
f['d']='b';
f['p']='q';
f['q']='p';
gets(s+1);
len=strlen(s+1);
int p=len>>1;
for (int i=1;i<=p;i++){
if (f[s[i]]!=s[len-i+1]){
puts("No");
return 0;
}
}
puts("Yes");
return 0;
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(s+1);
| ^~~~
| getw
|
s458255695 | p03889 | C++ | #include<stdio.h>
#include<string.h>
char s[100005];
int f[500];
int len;
int main(){
f['b']='d';
f['d']='b';
f['p']='q';
f['q']='p';
gets(s+1);
len=strlen(s+1);
int p=len>>1;
for (int i=1;i<=p;i++){
if (f[s[i]]!=s[len-i+1]){
puts("No");
return 0;
}
}
puts("Yes");
return 0;
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(s+1);
| ^~~~
| getw
|
s197502911 | p03889 | C++ | include<cstdio>
#include<iostream>
#include<cstring>
#include<stack>
using namespace std;
stack<char>s;
string a;
int main(){
cin>>a;
int n=a.size();
for(int i=0;i<n;i++){
s.push(a[i]);
}
bool ju=1;
for(int i=0;i<n;i++){
char top=s.top();
if(top=='b') top='d';
els... | a.cc:1:1: error: 'include' does not name a type
1 | include<cstdio>
| ^~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
fro... |
s164219766 | p03889 | C++ | #include<bits/stdc++.h>
using namespace std;
string a,b;
int main()
{
cin>>a;
for(int s=a.size()-1;s>=0;s--)
b=b+a[s];
for(int s=0;s<b.size();s++)
{
switch(b)
{
case 'p':b[s]='q';break;
case 'q':b[s]='p';break;
case 'b':b[s]='d';break;
case 'd':b[s]='b';break;
}
}
if(b==a)cout<<"Yes"<<endl;
el... | a.cc: In function 'int main()':
a.cc:11:24: error: switch quantity not an integer
11 | switch(b)
| ^
|
s302330124 | p03889 | C++ |
应用
冯浩云
R10864563 评测详情
冯浩云
AT2201 鏡文 / Mirror String
Judging
代码 C++,0.61KB
提交时间 2018-09-17 21:33:56
耗时/内存
-ms, -KB
评测状态
系统将会持续为您从源 OJ 获取评测结果,将持续追踪最长 30 分钟。
如超过此时间仍未获得结果,您可手动刷新。
Judging
用时: -ms / 内存: -KB
测试点信息
#1
源代码 复制
#include<cstdio>
#include<iostream>
#include<cstring>
#... | a.cc:12:19: error: invalid digit "9" in octal constant
12 | 提交时间 2018-09-17 21:33:56
| ^~
a.cc:18:57: error: extended character 。 is not valid in an identifier
18 | 系统将会持续为您从源 OJ 获取评测结果,将持续追踪最长 30 分钟。
| ^
a.cc:20:1: error: e... |
s619785268 | p03889 | C++ | #include<iostream>
#include<fstream>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
char a[2000000],b[2000000],a1=0;
int main()
{
while(cin>>a[i]&&a[i]!=EOF) a1++;
int len=a1;
for(int i=0;i<len;i++)
{
if(a[i]=='b')b[i]='d';
if(a[i]=='d')b[i]='b';
i... | a.cc: In function 'int main()':
a.cc:10:22: error: 'i' was not declared in this scope
10 | while(cin>>a[i]&&a[i]!=EOF) a1++;
| ^
|
s053881069 | p03889 | C++ | #include<iostream>
#include<fstream>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
string a,b;
int main()
{
cin>>a;
int len=a.size();
for(int i=0;i<len;i++)
{
if(a[i]=='b')b[i]='d';
if(a[i]=='d')b[i]='b';
if(a[i]=='p')b[i]='q';
if(a[i]=='q')b[i]='p';
}
bool flag=... | a.cc: In function 'int main()':
a.cc:20:26: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig... |
s994327718 | p03889 | C++ | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <string>
#include <cstring>
#include <vec... | a.cc: In function 'int main()':
a.cc:66:20: error: expected ')' before ':' token
66 | cout<<(s==t:"Yes":"No")<<endl;
| ~ ^
| )
|
s989420273 | p03889 | C++ | #include <bits/stdc++.h>
using namespace std;
int array = {{'b', 'd'}, {'d', 'b'}, {'p', 'q'}, {'q', 'p'},
int main() {
string S;
cin >> S;
int L = S.length();
bool result = true;
for(int i = 0; i < L; i++) {
switch(S[i]) {
case 'd':
if(S[L - i - 1] != 'b') result = false;
break;
case 'b':
if(... | a.cc:4:1: error: expected primary-expression before 'int'
4 | int main() {
| ^~~
a.cc:4:1: error: expected '}' before 'int'
a.cc:3:13: note: to match this '{'
3 | int array = {{'b', 'd'}, {'d', 'b'}, {'p', 'q'}, {'q', 'p'},
| ^
a.cc:3:5: error: scalar object 'array' requires one element ... |
s097845608 | p03889 | C++ | #include<iostream>
#include<iomanip>
#include<string>
#define rep(i,n) for(int i = 0; i < n; ++i)
#define all(x) x.begin(),x.end()
using namespace std;
int main(void){
string s;
cin >> s;
string t(s);
reverse(all(t));
for(int i = 0; i < t.size(); ++i){
switch(t[i]){
case 'p':
t[i] = 'q';... | a.cc: In function 'int main()':
a.cc:14:3: error: 'reverse' was not declared in this scope
14 | reverse(all(t));
| ^~~~~~~
|
s281072186 | p03889 | C++ | #include"bits/stdc++.h"
using namespace std;
int main(){
string s;
cin>>s;
string t=s;
reverse(s.begin(),s.end());
for(auto &i:s){
if(i=='b')
i=d;
else if(i=='d')
i=b;
else if(i=='p')
i=q;
else if(i=='q')
i=p;
}
if(s==t)
cout<<"Yes";
else
cout<<"No";
}
| a.cc: In function 'int main()':
a.cc:10:27: error: 'd' was not declared in this scope
10 | i=d;
| ^
a.cc:12:27: error: 'b' was not declared in this scope
12 | i=b;
| ^
a.cc:14:27: error: 'q' was not dec... |
s756494665 | p03889 | C++ | #include <iostream>
using namespace std;
int main(){
string S1,S2;
cin>>S1;
S2=S1;
reverse(S1.begin(),S2.end());
bool ans=true;
for(int i=0;i<S1.size();i++){
if((S1[i]=='b'&&S2[i]!='d')&&(S1[i]=='d'&&S2[i]!='b')&&(S1[i]=='p'&&S2[i]!='q')&&(S1[i]=='q'&&S2[i]!='p')){
ans=false... | a.cc: In function 'int main()':
a.cc:8:5: error: 'reverse' was not declared in this scope
8 | reverse(S1.begin(),S2.end());
| ^~~~~~~
|
s523995289 | p03889 | C++ | #include <iostream>
using namespace std;
int main(){
string S1,S2;
cin>>S1;
S2=S1;
reverse(S1.begin(),S2.end());
bool ans=true;
for(int i=0;i<S1.size();i++){
if((S1[i]=='b'&&S2[i]!='d')&&(S1[i]=='d'&&S2[i]!='b')&&(S1[i]=='p'&&S2[i]!='q')&&(S1[i]=='q'&&S2[i]!='p'){
ans=false;... | a.cc: In function 'int main()':
a.cc:8:5: error: 'reverse' was not declared in this scope
8 | reverse(S1.begin(),S2.end());
| ^~~~~~~
a.cc:11:114: error: expected ')' before '{' token
11 | if((S1[i]=='b'&&S2[i]!='d')&&(S1[i]=='d'&&S2[i]!='b')&&(S1[i]=='p'&&S2[i]!='q')&&(S1[i]=='q'&&S2[i]!='... |
s062507957 | p03889 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner don = new Scanner(System.in);
String[] an,bn;
String as;
an = new String[4];
bn = new String[4];
as = don.next();
for(int i=0;i<4;i++){
if(String.valueOf(as.charAt(i)).equals("d")){
an[i]="d";
bn[i]="... | Main.java:30: error: reached end of file while parsing
}
^
1 error
|
s408190865 | p03889 | C++ | #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
bool mirror(const char &a,const char &b);
int main()
{
char s[100000];
scanf("%s",&s);
int i ;
int l = strlen(s);
int mk = 0 ;
for(i = 0 ;i < l/2 ;i++)
{
bool k = mirror(s[i],s[l-i-1]);
if... | a.cc: In function 'int main()':
a.cc:25:5: error: 'else' without a previous 'if'
25 | else if(i == l/2)
| ^~~~
|
s711576782 | p03890 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<algorithm>
#include<queue>
using namespace std;
int n,ans=2,a[262144],b[262144],p1,p2;
int fang (int a,int b)
{
for(int i=1;i<a;i++)
{
b=2*b;
}
return b;
}
int main()
{
cin>>n;
ans=fang(n,ans)... | a.cc: In function 'int main()':
a.cc:38:27: error: expected ';' before ')' token
38 | for(int j=1;j<=ans)
| ^
| ;
a.cc:39:5: error: expected primary-expression before '}' token
39 | }
| ^
|
s332122899 | p03890 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a;
b=1;
for(int i=0;i<a;i++)
b=b*2;
vector<int> c(b);
for(int i=0;i<b;i++)
cin>>c.at(i);
for(int i=0;i<b-1;i++)
if(c.at(i)>c.at(i+1)){
c.at(i)-=c.at(i+1);
c.erase(c.begin()+i+1);
}
else if(c.at(i)==c.... | a.cc: In function 'int main()':
a.cc:25:5: error: break statement not within loop or switch
25 | break;
| ^~~~~
a.cc:26:6: error: 'i' was not declared in this scope
26 | if(i==c.size()-1)
| ^
a.cc: At global scope:
a.cc:29:1: error: 'cout' does not name a type
29 | cout<<c.at(0)<<end... |
s249166944 | p03890 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a;
b=1;
for(int i=0;i<a;i++)
b=b*2;
vector<int> c(b);
for(int i=0;i<b;i++)
cin>>c.at(i);
for(int i=0;i<b-1;i++)
if(c.at(i)>c.at(i+1)){
c.at(i)-=c.at(i+1);
c.erase(c.begin()+i+1);
}
else if(c.at(i)==c.... | a.cc: In function 'int main()':
a.cc:24:8: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
24 | if(c.size==1)
| ~~^~~~
| ... |
s575875169 | p03890 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
class Main{
static void solve(){
int n = ni();
Deque<Integer> que = new ArrayDeque<>();
for(int i=0;i<(1<<n);++i)que.add(ni());
while(!que.size()==1){
int x = que.pollFirst(), y=que.pollF... | Main.java:13: error: bad operand type int for unary operator '!'
while(!que.size()==1){
^
1 error
|
s294916101 | p03890 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int N;
vector<int> stones;
int kode_festival(int depth, int position){
if(depth == N){
return stones[position];
}else{
int left = kode_festival(depth + 1, position * 2);
int right = kode_festival(depth + 1,... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s300482733 | p03890 | C++ | #include<cstdio>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<list>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<functional>
#include<queue>
using namespace std;
int segment[1 << 19];
int a;
int saiki(int b) {
if (segment[b] != -1)return seg... | a.cc: In function 'int main()':
a.cc:24:9: error: 'memset' was not declared in this scope
24 | memset(segment, -1, sizeof(segment));
| ^~~~~~
a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
12 | #include<queue>
+++ |+#incl... |
s931256182 | p03890 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner as = new Scanner(System.in);
int n = as.nexInt();
int l = n;
int[] a;
int b = 0;
int c = (int)Math.pow(2, n);
a = new int[c];
for(int i=0;i<c;i++){
a[i] = as.nextInt();
}
for(int s=0;s<n;s++){
for(i... | Main.java:5: error: cannot find symbol
int n = as.nexInt();
^
symbol: method nexInt()
location: variable as of type Scanner
1 error
|
s931312809 | p03891 | C++ | #include <bits.stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin>>A>>B>>C;
int G=A+B-C;
int F=A+G-C;
int I=B+C-G;
int go=A+C+I;
int D=go-A-B;
int E=go-C-F;
int H=go-G-I;
cout<<A<<" "<<B<<" "<<D<<endl;
cout<<E<<" "<<C<<" "<<F<<endl;
cout<<G<<" "<<H<<" "<<I<<endl;
}
| a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory
1 | #include <bits.stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s810101863 | p03891 | C++ | #include<bits.stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin>>A>>B>>C;
int G=A+B-C;
int F=A+G-C;
int I=B+C-G;
int go=A+C+I;
int D=go-A-B;
int E=go-C-F;
int H=go-G-I;
cout<<A<<" "<<B<<" "<<D<<endl;
cout<<E<<" "<<C<<" "<<F<<endl;
cout<<G<<" "<<H<<" "<<I<<endl;
} | a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory
1 | #include<bits.stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s100798062 | p03891 | C++ | {$asmmode intel}//开启汇编模式。
var a,b,c:longint;
_11,_12,_13,_21,_22,_23,_31,_32,_33:longint;
begin
readln(a,b,c);
asm
mov eax,a; //eax=a
mov _11,eax;//结果存放
mov eax,b; //eax=b
mov _12,eax;//结果存放
mov eax,c; //eax=c
mov ebx,c; //eax=c,ebx=c
add eax,ebx;//eax=2c,ebx=c
add eax,ebx;//... | a.cc:1:1: error: expected unqualified-id before '{' token
1 | {$asmmode intel}//开启汇编模式。
| ^
a.cc:2:1: error: 'var' does not name a type
2 | var a,b,c:longint;
| ^~~
a.cc:3:5: error: '_11' does not name a type
3 | _11,_12,_13,_21,_22,_23,_31,_32,_33:longint;
| ^~~
a.cc:4:1: error: '... |
s902621614 | p03891 | C++ | my $in=<STDIN>;
chomp $in;
$in=[split /[\s,]+/,$in];
$a=$in->[0];
$b=$in->[1];
$c=$in->[2];
$d=-$a-$b+3*$c;
$e=-2*$a-$b+4*$c;
$f=2*$a+$b-2*$c;
$g=$a+$b-$c;
$h=-$b+2*$c;
$i=-$a+2*$c;
print "$a $b $d\n$e $c $f\n$g $h $i";
Visul Basic Mono
Imports System
Module APlusB
Sub Main()
Dim ins As String() = Console.... | a.cc:3:14: error: stray '\' in program
3 | $in=[split /[\s,]+/,$in];
| ^
a.cc:1:1: error: 'my' does not name a type
1 | my $in=<STDIN>;
| ^~
a.cc:2:1: error: 'chomp' does not name a type
2 | chomp $in;
| ^~~~~
a.cc:3:1: error: '$in' does not name a type
3 | $in=[split /[\s... |
s018262669 | p03891 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,e,f,g;
scanf ("%d%d%d",&a,&b,&e);
c=3*e-a-b;
h=2*e-b;
f=2*a-h;
i=3*e-c-f;
d=2*e-f;
g=3*e-h-i;
printf ("%d %d %d\n",a,b,c);
printf ("%d %d %d\n",b,c,d);
printf ("%d %d %d",g,h,i);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'h' was not declared in this scope
7 | h=2*e-b;
| ^
a.cc:9:5: error: 'i' was not declared in this scope
9 | i=3*e-c-f;
| ^
|
s833574360 | p03891 | C++ | #include<bits/stdc++.h>
using namespace std ;
int main()
{
int a , b , c ;
cin >> a >> b >> c ;
cout << a <<" "<< b <<" "<< 3*c-a-b <<" "<< endl ;
cout << 4*c-2*a-b <<" "<< c <<" "<< 2*a+b-2*c <<" "<< endl ;
cout << a+b-c <<" "<< 2*c-b <<" "<< 2*c-a <<" "<< endl ;
return 0 ;
}} | a.cc:11:2: error: expected declaration before '}' token
11 | }}
| ^
|
s788548142 | p03891 | C++ | #include<iostream>
using namespace std ;
long long a,b,c
int main()
{
cin>>a>>b>>c;
cout<<a<<" "<<b<<" "<<3*c-a-b<<" "<<endl;
cout<<4*c-2*a-b<<" "<<c<<" "<<2*a+b-2*c<<" "<<endl ;
cout<<a+b-c<<" "<<2*c-b<<" "<<2*c-a<<" "<<endl ;
return 0 ;
} | a.cc:4:1: error: expected initializer before 'int'
4 | int main()
| ^~~
|
s687230185 | p03891 | C | #if 0
cat <<EOF >mistaken-paste
#endif
// thanks for @rsk0315_h4x
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define BIG 2000000007
#def... | main.c: In function 'solve':
main.c:296:13: error: redefinition of 'sum'
296 | sll sum = vc * 3;
| ^~~
main.c:288:13: note: previous definition of 'sum' with type 'sll' {aka 'long int'}
288 | sll sum = 0;
| ^~~
|
s941385422 | p03891 | C++ | //G++/Gcc
#include<bits/stdc++.h>
using namespace std;
int f[5][5],i,j,x;
int main()
{
cin>>f[1][1]>>f[1][2]>>f[2][2];
x=f[2][2]*3;
f[1][3]=a-f[1][1]-f[1][2];
f[3][1]=a-f[1][3]-f[2][2];
f[3][3]=a-f[1][1]-f[2][2];
f[2][1]=a-f[1][1]-f[3][1];
f[2][3]=a-f[2][1]-f[2][2];
... | a.cc: In function 'int main()':
a.cc:9:15: error: 'a' was not declared in this scope
9 | f[1][3]=a-f[1][1]-f[1][2];
| ^
|
s890685028 | p03891 | C++ | #include<bits/stdc++.h>
using namespace std;
int f[4][4];
int main()
{
long long a;
cin>>f[1][1]>>f[1][2]>>f[2][2];
a=f[2][2]*3;
f[1][3]=a-f[1][1]-f[1][2];
f[3][1]=a-f[1][3]-f[2][2];
f[3][3]=a-f[1][1]-f[2][2];
f[2][1]=a-f[1][1]-f[3][1];
f[2][3]=a-f[2][1]-f[2][2];
f[3][2]=a-f[1][2]-f[... | a.cc: In function 'int main()':
a.cc:18:26: error: expected ';' before 'cout'
18 | cout<<f[i][j]
| ^
| ;
19 | cout<<endl;
| ~~~~
|
s946969556 | p03891 | C++ | #include <iostream>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
using namespace std;
int a[3][3]
int main()
{
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
cin >> a[0][0] >> a[0][1] >> a[1][1];
int m = a[1][1] * 3;
a[0][2] = m - a[0][0] -... | a.cc:9:1: error: expected initializer before 'int'
9 | int main()
| ^~~
|
s860699172 | p03891 | C++ | a=input()
b=input()
c=input()
print a, b, 3*c-a-b
print 4*c-2*a-b, c, 2*a+b-2*c
print a+b-c, 2*c-b, 2*c-a | a.cc:1:1: error: 'a' does not name a type
1 | a=input()
| ^
|
s295724037 | p03892 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a[4];
for(int i=0;i<4;i++)
{
cin>>a[i];
}
if(a[i]%4==0)
{
cout<<a[i]<<endl;
return 0;
}
else
{
cout<<a[i]+4-a[i]%4<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:10: error: 'i' was not declared in this scope
10 | if(a[i]%4==0)
| ^
|
s696335780 | p03892 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int gcd(int a,int b){
if(b==0)return a;
return gcd(a,a%b);
}
int main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
int x=abs(a-c),y=abs(b-d);
cout<<((x/gcd(x,y))+(y/gcd(x,y))-1)*gcd(x,y)
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:49: error: expected ';' before 'return'
12 | cout<<((x/gcd(x,y))+(y/gcd(x,y))-1)*gcd(x,y)
| ^
| ;
13 | return 0;
| ~~~~~~ ... |
s022512710 | p03892 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
... | a.cc:249:17: error: expected unqualified-id before 'return'
249 | return 0;
| ^~~~~~
a.cc:250:17: error: expected declaration before '}' token
250 | }
| ^
|
s198405948 | p03892 | C++ | #include <cstdio>
#include <algorithm>
int a,b,c,d,x,y;
int main(){
scanf("%d%d%d%d",&a,&b,&c,&d);
printf("%d\n",a-c+b-d-__gcd(a-c,b-d));
} | a.cc: In function 'int main()':
a.cc:8:27: error: '__gcd' was not declared in this scope; did you mean 'std::__gcd'?
8 | printf("%d\n",a-c+b-d-__gcd(a-c,b-d));
| ^~~~~
| std::__gcd
In file included from /usr/include/c++/14/algorithm:61,
... |
s671542128 | p03892 | C | #include<bits/stdc++.h>
using namespace std;
int main(){
int x1,y1,x2,y2;
cin>>x1>>y1>>x2>>y2;
int X=abs(x2-x1),Y=abs(y2-y1);
if(!X||!Y){
cout<<0<<endl;
return 0;
}
int ans=X+Y-1;
ans-=(X/(X/__gcd(X,Y))-1);
cout<<ans<<endl;
return 0;
}
| main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s989690593 | p03892 | C++ | import fractions
a,b,c,d=map(int,input().split())
c=abs(c-a)
d=abs(d-b)
g=fractions.gcd(max(c,d),min(c,d))
j=int(c/g)
k=int(d/g)
print((j+k-1)*g) | a.cc:1:1: error: 'import' does not name a type
1 | import fractions
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s079455701 | p03893 | C++ | #include <iostream>
using namespace std;
int main()
{
long long n,i,a[60];
cin>>n;
a[0]=2;
for (i=1;i<=n;i++) a[i]=a[i-1]+*2+2;
cout<<a[n]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:40: error: invalid type argument of unary '*' (have 'int')
8 | for (i=1;i<=n;i++) a[i]=a[i-1]+*2+2;
| ^~
|
s420222422 | p03893 | C++ | #include <iostream>
int main()
{
std::cout<<14<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
4 | std::cout<<14<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/1... |
s433013502 | p03893 | C++ | #include<bits/stdc++.h>
using namespace std;
long long n,a[405];
int main()
{
cin>>n;
a[0]=2;
for(i=0;i<=n;i++) a[i]=a[i-1]*2+2;
cout<<a[n]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
8 | for(i=0;i<=n;i++) a[i]=a[i-1]*2+2;
| ^
|
s596031041 | p03893 | C++ | #include<bits/stdc++.h>
using namespace std;
long long a,b=2;
int main(){
cin>>a;
for(int i=0;i<a;i++)b=(b+1)*2;
cout<<b<<endl; | a.cc: In function 'int main()':
a.cc:7:19: error: expected '}' at end of input
7 | cout<<b<<endl;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s758705243 | p03893 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,x1=2.x2;
cin>>n;
for(int i=1;i<=n;++i)
{
x2=x1*2+2;
x1=x2;
}
cout<<x2;
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:18: error: unable to find numeric literal operator 'operator""x2'
4 | int n,x1=2.x2;
| ^~~~
a.cc:8:17: error: 'x2' was not declared in this scope; did you mean 'x1'?
8 | x2=x1*2+2;
| ^~
| ... |
s929636327 | p03893 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
long long a,b=2;
scanf("%d",&a);
for(int i=0;i<a;i++)
{
b=2b+2;
}
printf("%d\n",b);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:7: error: unable to find numeric literal operator 'operator""b'
9 | b=2b+2;
| ^~
|
s689687363 | p03893 | C++ | #include<iostream>
long long n,srx[101];
int i;
long long lgx(long long n)
{
if(srx[n])
return srx[n];
if(n>0)
srx[n]=lgx(n-1)*2+2;
}
int main()
{
cin>>n;
srx[0]=2;
lgx(n);
cout<<srx[n]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
13 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked t... |
s665844215 | p03893 | C++ | using namespace std;
long long n;
long long m=2;
int main()
{
int i;
cin>>n;
for(i=0;i<n;i++)
{
m=(m+1)*2;
}
cout<<m<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
7 | cin>>n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:12:5: error: 'cou... |
s591502450 | p03893 | C++ | using namespace std;
long long n;
long long m=2;
int main()
{
int i;
cin>>n;
for(i=0;i<a;i++)
{
m=(m+1)*2;
}
cout<<m<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
7 | cin>>n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:8:15: error: 'a' ... |
s684961974 | p03893 | C++ | #include<bits/stdc++.h>
#include <stdlib.h>
#include <stdio.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n));
#define Vec(a,n) vector<string> (a)((n));
#define twovec(a,n,m) vector<vector<int>> a(n,vector<... | a.cc:21:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
21 | void Debug(auto a);
| ^~~~
a.cc:22:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
22 | int nibul(auto a,auto b);
| ... |
s043650289 | p03893 | C++ | #include<cstdio>
#define ll long long
using namesapce std;
ll n,a[101];
int i;
ll f(ll n)
{
if(a[n])
{
return a[n];
}
if(n>0)
{
a[n]=f(n-1)*2+2;
}
}
int main()
{
scanf("%d",&n);
a[0]=2;
f(n);
printf("%lld\n",a[n]);
} | a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
3 | using namesapce std;
| ^~~~~~~~~
a.cc: In function 'long long int f(long long int)':
a.cc:16:1: warning: control reaches end of non-void function [-Wreturn-type]
16 | }
| ^
|
s691947225 | p03893 | C++ | #include<bits/stdc++.h>
using namespace std;
long long n;
long long srd[1000001];
void dg(long long n){
srd[n]=srd[n-1]>>1+2;
return;
}
int main(){
cin>>n;
for(int i=1;i<=n;i++)
dg(n);
cout<<f[n];
return 0;
} | a.cc: In function 'int main()':
a.cc:13:15: error: 'f' was not declared in this scope
13 | cout<<f[n];
| ^
|
s575135578 | p03893 | C++ | #include<bits/stdc++.h>
using namespace std;
int n;
int srd[100000001]={2,};
int dg(int n){
if(srd[n])
return srd[n];
if(n>0)
srd[n]=dg(n-1)*2+2;
}
int main(){
cin>>n;
dg(n);
return 0;
} | a.cc: In function 'int dg(int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
10 | }
| ^
g++: internal compiler error: File size limit exceeded signal terminated program as
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <file:///usr/share/... |
s845553083 | p03893 | C++ | #include<bits/stdc++.h>
using namespace std;
int n;
int srd[100000001]={2,};
int dg(int n){
if(srx[n])
return srd[n];
if(n>0)
srd[n]=lgx(n-1)*2+2;
}
int main(){
cin>>n;
dg(n);
return 0;
} | a.cc: In function 'int dg(int)':
a.cc:6:12: error: 'srx' was not declared in this scope; did you mean 'srd'?
6 | if(srx[n])
| ^~~
| srd
a.cc:9:16: error: 'lgx' was not declared in this scope
9 | srd[n]=lgx(n-1)*2+2;
| ^~~
a.cc:10:1: warning:... |
s989137172 | p03893 | C++ | #include<bits/stdc++.h>
using namespace std;
int n;
int srd[100000001]={2,};
int dg(int n){
if(srx[n])
return srx[n];
if(n>0)
srx[n]=lgx(n-1)*2+2;
}
int main(){
cin>>n;
dg(n);
return 0;
} | a.cc: In function 'int dg(int)':
a.cc:6:12: error: 'srx' was not declared in this scope; did you mean 'srd'?
6 | if(srx[n])
| ^~~
| srd
a.cc:9:9: error: 'srx' was not declared in this scope; did you mean 'srd'?
9 | srx[n]=lgx(n-1)*2+2;
| ^~~
... |
s455153860 | p03893 | C++ | #include<iostream>
int n,f[1000];
int main()
{
std::cin>>n;
f[0]=2;
for(register int i=1;i<=n;i++)
f[i]=f[i-1]*2+2;
std::cout<<f[n]<<endl;
} | a.cc: In function 'int main()':
a.cc:9:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
9 | for(register int i=1;i<=n;i++)
| ^
a.cc:11:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
11 | std::cout<<f[n]<<endl;
... |
s422053176 | p03893 | C++ | #include <iostream>
using namespace std;
int f[300];
int main()
{
f[0]=2;
cin>>n;
for(int i=1;i<=n;i++)
f[n]=f[n-1]*2+2;
cout<<f[n]<<endl;
return 0;
}
//f[n]=f[n-1]*2+2 | a.cc: In function 'int main()':
a.cc:7:10: error: 'n' was not declared in this scope
7 | cin>>n;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.