submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s744078511 | p00331 | C++ | #include <bits/stdc++.h>
using namespace std;
//#define int long long
#define FOR(i, j, k) for(int i = j; i < (int)k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF (1 << 30)
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;
const int MOD = 1e9 + 7;
const int dy[] = {0, 0, 1, -1};
const int dx[] = {1, -1, 0, 0};
template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }
template<typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
int h, r;
cin >> h >> r;
if(h < r) cout << -1 << endl;
else if(-h == r) cout << 0 << endl;
else cout << 1 << endl
return 0;
} | a.cc: In function 'int main()':
a.cc:31:27: error: expected ';' before 'return'
31 | else cout << 1 << endl
| ^
| ;
32 | return 0;
| ~~~~~~
|
s274613709 | p00331 | C++ | #include <iostream>
using namespace std;
int main(void){
int H,R;
cin >> H >>R;
if(H>=0)cout << 1 << endl;
else(H+R=0)cout << 0 << endl;
else(H<=0)cout << -1 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:11: error: lvalue required as left operand of assignment
7 | else(H+R=0)cout << 0 << endl;
| ~^~
a.cc:8:5: error: 'else' without a previous 'if'
8 | else(H<=0)cout << -1 << endl;
| ^~~~
a.cc:8:15: error: expected ';' before 'cout'
8 | else(H<=0)cout << -1 << endl;
| ^~~~
| ;
|
s898232266 | p00331 | C++ | #include<iostream>
#include<stdio.h>
#include<algoritm>
#include<string.h>
using namespace std;
int main()
{
int h,r;
cin>>h>>r;
if(h>=0)
cout<<'1'<<endl;
if(h-r<0||r-h!=0)
cout<<"-1"<<endl;
if(r-h==0)
cout<<"0"<<endl;
return 0;
}
| a.cc:3:9: fatal error: algoritm: No such file or directory
3 | #include<algoritm>
| ^~~~~~~~~~
compilation terminated.
|
s281618902 | p00331 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int H,R;
if(H>=0){
cout<<"1"<<endl;
break;}
if(H<0&&H+R==0){
cout<<"0"<<endl;
break;}
if(H<0&&H+R<0){
cout<<"-1"<<endl;
break;}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:1: error: break statement not within loop or switch
12 | break;}
| ^~~~~
a.cc:16:1: error: break statement not within loop or switch
16 | break;}
| ^~~~~
a.cc:20:1: error: break statement not within loop or switch
20 | break;}
| ^~~~~
|
s412583768 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int H, R;
cin>>H>>R;
if( H > R ) cout<<"0"<<endl;
if( H < R ) cout<<"-1"<<endl;
erturn 0;
}
| a.cc:4:1: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>H>>R;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | if( H > R ) cout<<"0"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | if( H > R ) cout<<"0"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | if( H < R ) cout<<"-1"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | if( H < R ) cout<<"-1"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:12:1: error: 'erturn' was not declared in this scope; did you mean 'extern'?
12 | erturn 0;
| ^~~~~~
| extern
|
s074814775 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int H, R;
cin>>H>>R;
if( H > R ) cout<<"0"<<endl;
if( H < R ) cout<<"-1"<<endl;
erturn 0;
}
| a.cc:4:1: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>H>>R;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | if( H > R ) cout<<"0"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | if( H > R ) cout<<"0"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | if( H < R ) cout<<"-1"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | if( H < R ) cout<<"-1"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:12:1: error: 'erturn' was not declared in this scope; did you mean 'extern'?
12 | erturn 0;
| ^~~~~~
| extern
|
s125292992 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int H, R;
cin>>H>>R;
if( H > R ) cout<<"0"<<endl;
if( H < R ) cout<<"-1"<<endl;
erturn 0;
}
| a.cc:4:1: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>H>>R;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | if( H > R ) cout<<"0"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | if( H > R ) cout<<"0"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | if( H < R ) cout<<"-1"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | if( H < R ) cout<<"-1"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:12:1: error: 'erturn' was not declared in this scope; did you mean 'extern'?
12 | erturn 0;
| ^~~~~~
| extern
|
s467744157 | p00331 | C++ | //ProblemB
#include <bits/stdc++.h>
using namespace std;
int main(){
int H, R;
cin>>H>>R;
if(H + R < 0) cout<<-1<<endl;
if(H + R = 0) cout<<0<<endl;
if(H + R > 0) cout<<1<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:9: error: lvalue required as left operand of assignment
9 | if(H + R = 0) cout<<0<<endl;
| ~~^~~
|
s523612315 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int H, R;
cin>>H>>R;
if( H < R ) cout<<"0"<<endl;
if( H > R ) cout<<"-1"<<endl;
erturn 0;
}
| a.cc:4:1: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>H>>R;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | if( H < R ) cout<<"0"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | if( H < R ) cout<<"0"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | if( H > R ) cout<<"-1"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | if( H > R ) cout<<"-1"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:12:1: error: 'erturn' was not declared in this scope; did you mean 'extern'?
12 | erturn 0;
| ^~~~~~
| extern
|
s199873876 | p00331 | C++ | //ProblemB
#include <bits/stdc++.h>
using namespace std;
int main(){
int H, R;
cin>>H>>R;
if(H + R < 0) cout<<-1<<endl;
if(H + R = 0) cout<<0<<endl;
if(H + R > 0) cout<<1<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:9: error: lvalue required as left operand of assignment
9 | if(H + R = 0) cout<<0<<endl;
| ~~^~~
|
s266112234 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int H, R;
cin>>H>>R;
if( H > R ) cout<<"0"<<endl;
if( H < R ) cout<<"-1"<<endl;
erturn 0;
}
| a.cc:4:1: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>H>>R;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | if( H > R ) cout<<"0"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | if( H > R ) cout<<"0"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | if( H < R ) cout<<"-1"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | if( H < R ) cout<<"-1"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:12:1: error: 'erturn' was not declared in this scope; did you mean 'extern'?
12 | erturn 0;
| ^~~~~~
| extern
|
s026231139 | p00331 | C++ | //ProblemB
#include <bits/stdc++.h>
using namespace std;
int main(){
int H, R;
cin>>H>>R;
int ans;
if(H + R < 0) ans = -1
if(H + R = 0) ans = 0
if(H + R > 0) ans = 1
cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before 'if'
9 | if(H + R < 0) ans = -1
| ^
| ;
10 | if(H + R = 0) ans = 0
| ~~
|
s968966780 | p00331 | C++ | //ProblemB
#include <bits/stdc++.h>
using namespace std;
int main(){
int H, R;
cin>>H>>R;
int ans;
if(H + R < 0) ans = -1;
if(H + R = 0) ans = 0;
if(H + R > 0) ans = 1;
cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:9: error: lvalue required as left operand of assignment
10 | if(H + R = 0) ans = 0;
| ~~^~~
|
s385953319 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int H, R;
cin>>H>>R;
if( H > R ){
0}else{
-1
}
erturn 0;
}
| a.cc:4:2: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>H>>R;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:6: error: expected ';' before '}' token
10 | 0}else{
| ^
| ;
a.cc:11:7: error: expected ';' before '}' token
11 | -1
| ^
| ;
12 | }
| ~
a.cc:15:1: error: 'erturn' was not declared in this scope; did you mean 'extern'?
15 | erturn 0;
| ^~~~~~
| extern
|
s560583990 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int H, R;
cin>>H>>R;
if( H < r ){
0}else{
-1
}
return 0;
}
| a.cc:4:2: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>H>>R;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:9: error: 'r' was not declared in this scope
9 | if( H < r ){
| ^
a.cc:10:6: error: expected ';' before '}' token
10 | 0}else{
| ^
| ;
a.cc:11:7: error: expected ';' before '}' token
11 | -1
| ^
| ;
12 | }
| ~
|
s925131637 | p00331 | C++ | //ProblemB
#include <bits/stdc++.h>
using namespace std;
int main(){
int H, R;
cin>>H>>R;
int opt;
opt = H + R;
int ans;
if(opt < 0) ans = "-1";
if(opt = 0) ans = "0";
if(opt > 0) ans = "1";
cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:22: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
11 | if(opt < 0) ans = "-1";
| ^~~~
| |
| const char*
a.cc:12:22: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
12 | if(opt = 0) ans = "0";
| ^~~
| |
| const char*
a.cc:13:22: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
13 | if(opt > 0) ans = "1";
| ^~~
| |
| const char*
|
s855400765 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int h,r;
cin>>h>>r;
if ( h+r<0 ){cout<<"-1"<<endl;}
if ( h+r>0 ){cout<<"0"<<endl;}
return 0;
}
| a.cc:9:5: error: extended character is not valid in an identifier
9 | if ( h+r>0 ){cout<<"0"<<endl;}
| ^
a.cc:4:2: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>h>>r;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | if ( h+r<0 ){cout<<"-1"<<endl;}
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | if ( h+r<0 ){cout<<"-1"<<endl;}
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:9:5: error: '\U000000a0h' was not declared in this scope
9 | if ( h+r>0 ){cout<<"0"<<endl;}
| ^~
a.cc:9:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | if ( h+r>0 ){cout<<"0"<<endl;}
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | if ( h+r>0 ){cout<<"0"<<endl;}
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s805707889 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int h,r;
cin>>h>>r;
if ( h+r<0 ){cout<<"-1"<<endl;}
if ( h+r>0 ){cout<<"1"<<endl;}
if (h+r=0){cout<<"0"<<endl;}
return 0;
}
| a.cc:9:5: error: extended character is not valid in an identifier
9 | if ( h+r>0 ){cout<<"1"<<endl;}
| ^
a.cc:4:2: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>h>>r;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | if ( h+r<0 ){cout<<"-1"<<endl;}
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | if ( h+r<0 ){cout<<"-1"<<endl;}
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:9:5: error: '\U000000a0h' was not declared in this scope
9 | if ( h+r>0 ){cout<<"1"<<endl;}
| ^~
a.cc:9:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | if ( h+r>0 ){cout<<"1"<<endl;}
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | if ( h+r>0 ){cout<<"1"<<endl;}
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:6: error: lvalue required as left operand of assignment
10 | if (h+r=0){cout<<"0"<<endl;}
| ~^~
a.cc:10:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | if (h+r=0){cout<<"0"<<endl;}
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | if (h+r=0){cout<<"0"<<endl;}
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s301296712 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int h,r;
cin>>h>>r;
if ( h+r<0 )cout<<"-1"<<endl;
else if ( h+r>0 )cout<<"1"<<endl;
else if (h+r==0)cout<<"0"<<endl;
return 0;
}
| a.cc:9:10: error: extended character is not valid in an identifier
9 | else if ( h+r>0 )cout<<"1"<<endl;
| ^
a.cc:4:2: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>h>>r;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | if ( h+r<0 )cout<<"-1"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | if ( h+r<0 )cout<<"-1"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:9:10: error: '\U000000a0h' was not declared in this scope
9 | else if ( h+r>0 )cout<<"1"<<endl;
| ^~
a.cc:9:18: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | else if ( h+r>0 )cout<<"1"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | else if ( h+r>0 )cout<<"1"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | else if (h+r==0)cout<<"0"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | else if (h+r==0)cout<<"0"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s883021065 | p00331 | C++ | #include <bits/stdc++.h>
using namespace
int main(){
int h,r;
cin>>h>>r;
if ( h+r < 0 )cout<<"-1"<<endl;
else if ( h+r > 0 )cout<<"1"<<endl;
else if ( h+r == 0 )cout<<"0"<<endl;
return 0;
}
| a.cc:9:10: error: extended character is not valid in an identifier
9 | else if ( h+r > 0 )cout<<"1"<<endl;
| ^
a.cc:4:2: error: expected identifier before 'int'
4 | int main(){
| ^~~
a.cc:2:16: error: expected ';' before 'int'
2 | using namespace
| ^
| ;
3 |
4 | int main(){
| ~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>h>>r;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | if ( h+r < 0 )cout<<"-1"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | if ( h+r < 0 )cout<<"-1"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:9:10: error: '\U000000a0h' was not declared in this scope
9 | else if ( h+r > 0 )cout<<"1"<<endl;
| ^~
a.cc:9:20: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | else if ( h+r > 0 )cout<<"1"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | else if ( h+r > 0 )cout<<"1"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | else if ( h+r == 0 )cout<<"0"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | else if ( h+r == 0 )cout<<"0"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s746164004 | p00331 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h,r;
cin>>h>>r;
if ( h + r < 0 )cout<<"-1"<<endl;
else if ( h + r > 0 )cout<<"1"<<endl;
else if ( h + r == 0 )cout<<"0"<<endl;
return 0;
}
| a.cc:9:10: error: extended character is not valid in an identifier
9 | else if ( h + r > 0 )cout<<"1"<<endl;
| ^
a.cc: In function 'int main()':
a.cc:9:10: error: '\U000000a0h' was not declared in this scope
9 | else if ( h + r > 0 )cout<<"1"<<endl;
| ^~
|
s352059540 | p00331 | C++ | import java.util.Scanner;
public class Main {
public static void main(String argv[]) {
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int R = sc.nextInt();
int time = 0;
if(H + R < 0) time = -1;
else if(H + R >= 2*R) time = 1;
else if(H + R == 0) time = 0;
else if(H + R >= 1) time = 1;
System.out.println(time);
}
}
| a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s330938914 | p00331 | C++ | #include <stdio.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b);
if(a+b==0)return printf(0),0;
if(a<0&&b<a)return printf(-1),0;
return printf(1),0;
}
| a.cc: In function 'int main()':
a.cc:7:31: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
7 | if(a<0&&b<a)return printf(-1),0;
| ^~
| |
| int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:8:19: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
8 | return printf(1),0;
| ^
| |
| int
/usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
s128166878 | p00331 | C++ | #include <algorithm>
#include <iostream>
#include <math.h>
#include <cstdio>
#include <string.h>
using namespace std;
int main(void){
int h,r,ans;
cin>>h>>r;
if(h+r>0)ans=1;
else if(h+w<0)ans=-1;
else ans=0;
cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:19: error: 'w' was not declared in this scope
11 | else if(h+w<0)ans=-1;
| ^
|
s121192409 | p00331 | C++ | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int h, r;
cin >> h >> r;
if(abs(h) == r) cout << 0 << endl;
else if(h >= 0) cout << 1 << endl;
else id(h < 0) {
if(abs(h) < r) cout << -1 << endl;
else cout << 1 << endl;
}
}
| a.cc: In function 'int main()':
a.cc:33:8: error: 'id' was not declared in this scope
33 | else id(h < 0) {
| ^~
|
s572923676 | p00331 | C++ | #include<iostream>
using namespace std;
int main(){
int h,r;
cinn>>h>>r;
if(h+r>0)cout<<1<<endl;
if(h+r ==0)cout<<0<<endl;
if(h+r<0)cout<<-1<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:5: error: 'cinn' was not declared in this scope
6 | cinn>>h>>r;
| ^~~~
|
s344240587 | p00331 | C++ | #include<iostream>
using namespace std;
int main(){
int h,r;
cinn>>h>>r;
if(h+r>0)cout<<1<<endl;
else if(h+r ==0)cout<<0<<endl;
else if(h+r<0)cout<<-1<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:5: error: 'cinn' was not declared in this scope
6 | cinn>>h>>r;
| ^~~~
|
s604530516 | p00332 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner s = new Scanner (System.in);
int E = s.nextInt();
int Y = s.nextInt();
if(1912 > Y && Y > 1867){
int A = Y-1867;
System.out.print("M");
System.out.println(A);
}else if(1926 > Y && Y >1911){
int B = Y-1911;
System.out.print("T");
System.out.println(B);
}else if(1989 > Y && Y > 1925){
int C = Y-1925;
System.out.print("S");
System.out.println(C);
}else if(2017 > Y && Y > 1988){
int D = Y-1988;
System.out.print("H");
System.out.println(D);
}else if(E == 1){
System.out.println(Y+1867);
}else if(E == 2){
System.out.println(Y+1911);
}else if(E == 3){
System.out.println(Y+1925);
}else if(E == 4){
System.out.println(Y+1988);
}
| Main.java:34: error: reached end of file while parsing
}
^
1 error
|
s216549238 | p00332 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int E=in.nextInt(),Y=in.nextInt();
switch(E){
case 0:
if(Y<=1911)System.out.println("M"+(Y-1867));
else if(Y<=1925)System.out.println("T"+(Y-1911));
else if(Y<=1988)System.out.println("S"+(Y-1925));
else System.out.println("H"+(Y-1988));
break;
case 1:
System.out.println(Y+1867);
break;
case 2:
System.out.println(Y+1911);
break;
case 3:
System.out.println(Y+1925);
break;
case 4:
System.out.println(Y+1988);
break;
}
}
| Main.java:33: error: reached end of file while parsing
}
^
1 error
|
s939398127 | p00332 | C | #include<stdio.h>
int main(void)
{
int a,b,c;
scanf("%d %d",&a,&b);
if(a==0){
if(b>=1868&&b<=1911){
c=b-1867;
printf("M%d\n",c);
}
else if(b>=1912&&b<=1925){
c=b-1911;
printf("T%d\n",c);
}
else if(b>=1926&&b<=1988){
c=b-1925;
printf("S%d\n",c);
}
else{
c=b-1988;
printf("H%d\n",c);
}
else if(a==1){
c=b+1867;
}
else if(a==2){
c=b+1911;
}
else if(a==3){
c=b+1925;
else{
c=b+1988;
}
if(a!=0){
printf("%d\n",c);
}
return(0);
} | main.c: In function 'main':
main.c:23:2: error: expected '}' before 'else'
23 | else if(a==1){
| ^~~~
main.c:31:2: error: expected '}' before 'else'
31 | else{
| ^~~~
|
s134127748 | p00332 | C | #include<stdio.h>
int main(void)
{
??int a,b,c;
??scanf("%d %d",&a,&b);
??if(a==0){
????if(b>=1868&&b<=1911){
??????c=b-1867;
??????printf("M%d\n",c);
????}
????else if(b>=1912&&b<=1925){
??????c=b-1911;
??????printf("T%d\n",c);
????}
????else if(b>=1926&&b<=1988){
??????c=b-1925;
??????printf("S%d\n",c);
????}
????else{
??????c=b-1988;
??????printf("H%d\n",c);
????}
}
??else if(a==1){
????c=b+1867;
??}
??else if(a==2){
????c=b+1911;
??}
??else if(a==3){
????c=b+1925;
}
??else{
????c=b+1988;
??}
??if(a!=0){
????printf("%d\n",c);
??}
??return(0);
} | main.c: In function 'main':
main.c:4:1: error: expected expression before '?' token
4 | ??int a,b,c;
| ^
main.c:5:1: error: expected expression before '?' token
5 | ??scanf("%d %d",&a,&b);
| ^
main.c:5:18: error: 'a' undeclared (first use in this function)
5 | ??scanf("%d %d",&a,&b);
| ^
main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:21: error: 'b' undeclared (first use in this function)
5 | ??scanf("%d %d",&a,&b);
| ^
main.c:6:1: error: expected expression before '?' token
6 | ??if(a==0){
| ^
|
s948381921 | p00332 | C | #include<stdio.h>
int main(void)
{
int E,Y;
scanf("%d%d",&E,&Y);
if (E==0)
{
if (Y<=1911)
printf("M%d\n",Y-1867);
else if (Y<=1925)
printf("T%d\n",Y-1911);
else if (Y<=1988)
printf("S%d\n",Y-1925);
else
printf("H%d\n",Y-1988);
}
else if (E==1)
printf("%d\n",Y+1867);
else if (E==2)
printf("%d\n",Y+1911);
else if (E==3)
printf("%d\n",Y+1925);
else
printf("%d\n",Y+1988);}
return 0;
} | main.c:25:9: error: expected identifier or '(' before 'return'
25 | return 0;
| ^~~~~~
main.c:26:1: error: expected identifier or '(' before '}' token
26 | }
| ^
|
s289099484 | p00332 | C++ | #include<iostream>
using namespace std;
int main(){
int E, Y;
cin E >> Y;
switch(E){
case 0:
if(1868<=Y && Y<=1911){
cout << 'M' << Y-1867 << endl;
}
else if(1912<=Y && Y<=1925){
cout << 'T' << Y-1911 << endl;
}
else if(1926<=Y && Y<=1988){
cout << 'S' << Y-1925 << endl;
}
else if(1989<=Y && Y<=2016){
cout << 'H' << Y-1988 << endl;
}
break;
case 1:
cout << Y+1867 << endl;
break;
case 2;
cout << Y+1911 << endl;
case 3;
cout << Y+1925 << endl;
case 4;
cout << Y+1988 << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'E'
6 | cin E >> Y;
| ^~
| ;
a.cc:26:11: error: expected ':' before ';' token
26 | case 2;
| ^
| :
a.cc:28:11: error: expected ':' before ';' token
28 | case 3;
| ^
| :
a.cc:30:11: error: expected ':' before ';' token
30 | case 4;
| ^
| :
|
s926756128 | p00332 | C++ | #include<iostream>
using namespace std;
int main(){
int E, Y;
cin >> E >> Y;
switch(E){
case 0:
if(1868<=Y && Y<=1911){
cout << 'M' << Y-1867 << endl;
}
else if(1912<=Y && Y<=1925){
cout << 'T' << Y-1911 << endl;
}
else if(1926<=Y && Y<=1988){
cout << 'S' << Y-1925 << endl;
}
else if(1989<=Y && Y<=2016){
cout << 'H' << Y-1988 << endl;
}
break;
case 1:
cout << Y+1867 << endl;
break;
case 2:
cout << Y+1911 << endl;
break;
case 3:
cout << Y+1925 << endl;]
break;
case 4:
cout << Y+1988 << endl;
break;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:30:36: error: expected primary-expression before ']' token
30 | cout << Y+1925 << endl;]
| ^
|
s174353145 | p00332 | C++ | /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
| |
s170973504 | p00332 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int E,Y;
int M=1912,T=1926,S=1989,H=2020;
cin >> E >> Y;
if(E ==0){
if(Y<M) cout << "M" << (Y-1868)+1 << endl;
if(Y<T && M<=Y) cout << "T" << Y-M+1 << endl;
if(Y<S && T<=Y) cout << "S" << Y-T+1 << endl;
if(Y<H && S<=Y) cout << "H" << Y-S=1 << endl;
}
if(E == 1) cout << 1968+Y-1 << endl;
if(E == 2) cout << M+Y-1 << endl;
if(E == 3) cout << T+Y-1 << endl;
if(E == 4) cout << S+Y-1 << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:42: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
11 | if(Y<H && S<=Y) cout << "H" << Y-S=1 << endl;
| ~~^~~~~~~
|
s797502037 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl;
}
else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl;
}
else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl;
}
else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl;
}
else if(E=1&&1868>=Y){
cout<<1868+Y-1<<endl;
}
else if(E=2&&1912>=Y){
cout<<1912+Y-1<<endl;
}
else if(E=3&&1926>=Y){
cout<<1926+Y-1<<endl;
}
else if(E=4&&1989>=Y){
cout<<1989=Y-1<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:11: error: 'M' was not declared in this scope
11 | cout<<M"1911-Y"<<endl;
| ^
a.cc:15:11: error: 'T' was not declared in this scope
15 | cout<<T"1925-Y"<<endl;
| ^
a.cc:20:11: error: 'S' was not declared in this scope
20 | cout<<S"1988-Y"<<endl;
| ^
a.cc:25:11: error: 'H' was not declared in this scope
25 | cout<<H"2016-Y"<<endl;
| ^
a.cc:38:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
38 | cout<<1989=Y-1<<endl;
| ~~~^~~~~~
|
s591976726 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl;
}
else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl;
}
else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl;
}
else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl;
}
else if(E=1&&1868>=Y){
cout<<1868+Y-1<<endl;
}
else if(E=2&&1912>=Y){
cout<<1912+Y-1<<endl;
}
else if(E=3&&1926>=Y){
cout<<1926+Y-1<<endl;
}
else if(E=4&&1989>=Y){
cout<<1989=Y-1<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before string constant
11 | cout<<M"1911-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:15:12: error: expected ';' before string constant
15 | cout<<T"1925-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:20:12: error: expected ';' before string constant
20 | cout<<S"1988-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:25:12: error: expected ';' before string constant
25 | cout<<H"2016-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:38:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
38 | cout<<1989=Y-1<<endl;
| ~~~^~~~~~
|
s549746666 | p00332 | C++ | /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
| |
s225768003 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl
}
else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl
}
else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl
}
else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl
}
else if(E=1&&1868>=Y){
cout<<1868+Y-1<<endl
}
else if(E=2&&1912>=Y){
cout<<1912+Y-1<<endl
}
else if(E=3&&1926>=Y){
cout<<1926+Y-1<<endl
}
else if(E=4&&1989>=Y){
cout<<1989=Y-1<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before string constant
11 | cout<<M"1911-Y"<<endl
| ^~~~~~~~
| ;
a.cc:15:12: error: expected ';' before string constant
15 | cout<<T"1925-Y"<<endl
| ^~~~~~~~
| ;
a.cc:20:12: error: expected ';' before string constant
20 | cout<<S"1988-Y"<<endl
| ^~~~~~~~
| ;
a.cc:25:12: error: expected ';' before string constant
25 | cout<<H"2016-Y"<<endl
| ^~~~~~~~
| ;
a.cc:29:25: error: expected ';' before '}' token
29 | cout<<1868+Y-1<<endl
| ^
| ;
30 | }
| ~
a.cc:32:25: error: expected ';' before '}' token
32 | cout<<1912+Y-1<<endl
| ^
| ;
33 | }
| ~
a.cc:35:25: error: expected ';' before '}' token
35 | cout<<1926+Y-1<<endl
| ^
| ;
36 | }
| ~
a.cc:38:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
38 | cout<<1989=Y-1<<endl
| ~~~^~~~~~
|
s284362034 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl
else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl
else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl
else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl
else if(E=1&&1868>=Y){
cout<<1868+Y-1<<endl
else if(E=2&&1912>=Y){
cout<<1912+Y-1<<endl
else if(E=3&&1926>=Y){
cout<<1926+Y-1<<endl
else if(E=4&&1989>=Y){
cout<<1989=Y-1<<endl
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before string constant
11 | cout<<M"1911-Y"<<endl
| ^~~~~~~~
| ;
a.cc:42:2: error: expected '}' at end of input
42 | }
| ^
a.cc:9:21: note: to match this '{'
9 | if(E=0&&1911-Y>=0){
| ^
a.cc:42:2: error: expected '}' at end of input
42 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s920469219 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl
else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl
else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl
else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl
else if(E=1&&1868>=Y){
cout<<1868+Y-1<<endl
else if(E=2&&1912>=Y){
cout<<1912+Y-1<<endl
else if(E=3&&1926>=Y){
cout<<1926+Y-1<<endl
else if(E=4&&1989>=Y){
cout<<1989=Y-1<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before string constant
11 | cout<<M"1911-Y"<<endl
| ^~~~~~~~
| ;
a.cc:42:2: error: expected '}' at end of input
42 | }
| ^
a.cc:9:21: note: to match this '{'
9 | if(E=0&&1911-Y>=0){
| ^
a.cc:42:2: error: expected '}' at end of input
42 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s738621834 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl
}
else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl
}
else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl
}
else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl
}
else if(E=1&&1868>=Y){
cout<<1868+Y-1<<endl
}
else if(E=2&&1912>=Y){
cout<<1912+Y-1<<endl
}
else if(E=3&&1926>=Y){
cout<<1926+Y-1<<endl
}
else if(E=4&&1989>=Y){
cout<<1989=Y-1<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before string constant
11 | cout<<M"1911-Y"<<endl
| ^~~~~~~~
| ;
a.cc:15:12: error: expected ';' before string constant
15 | cout<<T"1925-Y"<<endl
| ^~~~~~~~
| ;
a.cc:20:12: error: expected ';' before string constant
20 | cout<<S"1988-Y"<<endl
| ^~~~~~~~
| ;
a.cc:25:12: error: expected ';' before string constant
25 | cout<<H"2016-Y"<<endl
| ^~~~~~~~
| ;
a.cc:29:25: error: expected ';' before '}' token
29 | cout<<1868+Y-1<<endl
| ^
| ;
30 | }
| ~
a.cc:32:25: error: expected ';' before '}' token
32 | cout<<1912+Y-1<<endl
| ^
| ;
33 | }
| ~
a.cc:35:25: error: expected ';' before '}' token
35 | cout<<1926+Y-1<<endl
| ^
| ;
36 | }
| ~
a.cc:38:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
38 | cout<<1989=Y-1<<endl
| ~~~^~~~~~
|
s509241901 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl
}
else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl
} else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl
} else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl
} else if(E=1&&1868>=Y){
cout<<1868+Y-1<<endl
} else if(E=2&&1912>=Y){
cout<<1912+Y-1<<endl
} else if(E=3&&1926>=Y){
cout<<1926+Y-1<<endl
} else if(E=4&&1989>=Y){
cout<<1989=Y-1<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before string constant
11 | cout<<M"1911-Y"<<endl
| ^~~~~~~~
| ;
a.cc:15:12: error: expected ';' before string constant
15 | cout<<T"1925-Y"<<endl
| ^~~~~~~~
| ;
a.cc:18:12: error: expected ';' before string constant
18 | cout<<S"1988-Y"<<endl
| ^~~~~~~~
| ;
a.cc:22:12: error: expected ';' before string constant
22 | cout<<H"2016-Y"<<endl
| ^~~~~~~~
| ;
a.cc:24:25: error: expected ';' before '}' token
24 | cout<<1868+Y-1<<endl
| ^
| ;
25 | } else if(E=2&&1912>=Y){
| ~
a.cc:26:25: error: expected ';' before '}' token
26 | cout<<1912+Y-1<<endl
| ^
| ;
27 | } else if(E=3&&1926>=Y){
| ~
a.cc:28:25: error: expected ';' before '}' token
28 | cout<<1926+Y-1<<endl
| ^
| ;
29 | } else if(E=4&&1989>=Y){
| ~
a.cc:30:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
30 | cout<<1989=Y-1<<endl
| ~~~^~~~~~
|
s556856737 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl
} else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl
} else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl
} else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl
} else if(E=1&&1868>=Y){
cout<<1868+Y-1<<endl
} else if(E=2&&1912>=Y){
cout<<1912+Y-1<<endl
} else if(E=3&&1926>=Y){
cout<<1926+Y-1<<endl
} else if(E=4&&1989>=Y){
cout<<1989=Y-1<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1911-Y"<<endl
| ^~~~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1925-Y"<<endl
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1988-Y"<<endl
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2016-Y"<<endl
| ^~~~~~~~
| ;
a.cc:18:25: error: expected ';' before '}' token
18 | cout<<1868+Y-1<<endl
| ^
| ;
19 | } else if(E=2&&1912>=Y){
| ~
a.cc:20:25: error: expected ';' before '}' token
20 | cout<<1912+Y-1<<endl
| ^
| ;
21 | } else if(E=3&&1926>=Y){
| ~
a.cc:22:25: error: expected ';' before '}' token
22 | cout<<1926+Y-1<<endl
| ^
| ;
23 | } else if(E=4&&1989>=Y){
| ~
a.cc:24:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
24 | cout<<1989=Y-1<<endl
| ~~~^~~~~~
|
s304518806 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl
} else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl
} else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl
} else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl
} else if(E=1&&1868>=Y){
cout<<1867+Y<<endl
} else if(E=2&&1912>=Y){
cout<<1911+Y<<endl
} else if(E=3&&1926>=Y){
cout<<1925+Y<<endl
} else if(E=4&&1989>=Y){
cout<<1988+Y<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1911-Y"<<endl
| ^~~~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1925-Y"<<endl
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1988-Y"<<endl
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2016-Y"<<endl
| ^~~~~~~~
| ;
a.cc:18:23: error: expected ';' before '}' token
18 | cout<<1867+Y<<endl
| ^
| ;
19 | } else if(E=2&&1912>=Y){
| ~
a.cc:20:23: error: expected ';' before '}' token
20 | cout<<1911+Y<<endl
| ^
| ;
21 | } else if(E=3&&1926>=Y){
| ~
a.cc:22:23: error: expected ';' before '}' token
22 | cout<<1925+Y<<endl
| ^
| ;
23 | } else if(E=4&&1989>=Y){
| ~
a.cc:24:23: error: expected ';' before '}' token
24 | cout<<1988+Y<<endl
| ^
| ;
25 | }
| ~
|
s186879616 | p00332 | C++ | /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
| |
s878822169 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M1911-Y<<endl
} else if(E=0&&1925-Y>=0){
cout<<T1925-Y<<endl
} else if(E=0&&1988-Y>=0){
cout<<S1988-Y<<endl
} else if(E=0&&2016-Y>=0){
cout<<H2016-Y<<endl
} else if(E=1&&1868>=Y){
cout<<1867+Y<<endl
} else if(E=2&&1912>=Y){
cout<<1911+Y<<endl
} else if(E=3&&1926>=Y){
cout<<1925+Y<<endl
} else if(E=4&&1989>=Y){
cout<<1988+Y<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:11: error: 'M1911' was not declared in this scope
10 | cout<<M1911-Y<<endl
| ^~~~~
a.cc:12:11: error: 'T1925' was not declared in this scope
12 | cout<<T1925-Y<<endl
| ^~~~~
a.cc:14:11: error: 'S1988' was not declared in this scope
14 | cout<<S1988-Y<<endl
| ^~~~~
a.cc:16:11: error: 'H2016' was not declared in this scope
16 | cout<<H2016-Y<<endl
| ^~~~~
a.cc:18:23: error: expected ';' before '}' token
18 | cout<<1867+Y<<endl
| ^
| ;
19 | } else if(E=2&&1912>=Y){
| ~
a.cc:20:23: error: expected ';' before '}' token
20 | cout<<1911+Y<<endl
| ^
| ;
21 | } else if(E=3&&1926>=Y){
| ~
a.cc:22:23: error: expected ';' before '}' token
22 | cout<<1925+Y<<endl
| ^
| ;
23 | } else if(E=4&&1989>=Y){
| ~
a.cc:24:23: error: expected ';' before '}' token
24 | cout<<1988+Y<<endl
| ^
| ;
25 | }
| ~
|
s625494013 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M1911-Y<<endl
} else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl
} else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl
} else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl
} else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:11: error: 'M1911' was not declared in this scope
10 | cout<<M1911-Y<<endl
| ^~~~~
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1925-Y"<<endl
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1988-Y"<<endl
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2016-Y"<<endl
| ^~~~~~~~
| ;
a.cc:18:25: error: expected ';' before '}' token
18 | cout<<"1867+Y"<<endl
| ^
| ;
19 | } else if(E=2&&1912>=Y){
| ~
a.cc:20:25: error: expected ';' before '}' token
20 | cout<<"1911+Y"<<endl
| ^
| ;
21 | } else if(E=3&&1926>=Y){
| ~
a.cc:22:25: error: expected ';' before '}' token
22 | cout<<"1925+Y"<<endl
| ^
| ;
23 | } else if(E=4&&1989>=Y){
| ~
a.cc:24:25: error: expected ';' before '}' token
24 | cout<<"1988+Y"<<endl
| ^
| ;
25 | }
| ~
|
s673523173 | p00332 | C++ | /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
| |
s447338115 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
if(1912 <= Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
if(1926 <= Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
if(1988 <= Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 - 1<<endl;
if(E = 2) cout<<Y + 1912 - 1<<endl;
if(E = 3) cout<<Y + 1926 - 1<<endl;
if(E = 4) cout<<Y + 1988 - 1<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: 'M' was not declared in this scope
11 | if(1868 <= Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:12:30: error: 'T' was not declared in this scope
12 | if(1912 <= Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
| ^
a.cc:13:30: error: 'S' was not declared in this scope
13 | if(1926 <= Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
| ^
a.cc:14:30: error: 'H' was not declared in this scope
14 | if(1988 <= Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
| ^
|
s631906168 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
if(1912 <= Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
if(1926 <= Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
if(1988 <= Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 - 1<<endl;
if(E = 2) cout<<Y + 1912 - 1<<endl;
if(E = 3) cout<<Y + 1926 - 1<<endl;
if(E = 4) cout<<Y + 1988 - 1<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: 'M' was not declared in this scope
11 | if(1868 <= Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:12:30: error: 'T' was not declared in this scope
12 | if(1912 <= Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
| ^
a.cc:13:30: error: 'S' was not declared in this scope
13 | if(1926 <= Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
| ^
a.cc:14:30: error: 'H' was not declared in this scope
14 | if(1988 <= Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
| ^
|
s140748646 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y <= 1912) cout<<M<<" "<<(Y - 1) - 1868<<endl;
if(1912 <= Y <= 1926) cout<<T<<" "<<(Y - 1) - 1912<<endl;
if(1926 <= Y <= 1988) cout<<S<<" "<<(Y - 1) - 1926<<endl;
if(1988 <= Y <= 2016) cout<<H<<" "<<(Y - 1) - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 - 1<<endl;
if(E = 2) cout<<Y + 1912 - 1<<endl;
if(E = 3) cout<<Y + 1926 - 1<<endl;
if(E = 4) cout<<Y + 1988 - 1<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: 'M' was not declared in this scope
11 | if(1868 <= Y <= 1912) cout<<M<<" "<<(Y - 1) - 1868<<endl;
| ^
a.cc:12:30: error: 'T' was not declared in this scope
12 | if(1912 <= Y <= 1926) cout<<T<<" "<<(Y - 1) - 1912<<endl;
| ^
a.cc:13:30: error: 'S' was not declared in this scope
13 | if(1926 <= Y <= 1988) cout<<S<<" "<<(Y - 1) - 1926<<endl;
| ^
a.cc:14:30: error: 'H' was not declared in this scope
14 | if(1988 <= Y <= 2016) cout<<H<<" "<<(Y - 1) - 1988<<endl;
| ^
|
s571352019 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
if(1912 <= Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
if(1926 <= Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
if(1988 <= Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 - 1<<endl;
if(E = 2) cout<<Y + 1912 - 1<<endl;
if(E = 3) cout<<Y + 1926 - 1<<endl;
if(E = 4) cout<<Y + 1988 - 1<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: 'M' was not declared in this scope
11 | if(1868 <= Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:12:30: error: 'T' was not declared in this scope
12 | if(1912 <= Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
| ^
a.cc:13:30: error: 'S' was not declared in this scope
13 | if(1926 <= Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
| ^
a.cc:14:30: error: 'H' was not declared in this scope
14 | if(1988 <= Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
| ^
|
s786539685 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
if(1912 <= Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
if(1926 <= Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
if(1988 <= Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 <<endl;
if(E = 2) cout<<Y + 1912 <<endl;
if(E = 3) cout<<Y + 1926 <<endl;
if(E = 4) cout<<Y + 1988 <<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: 'M' was not declared in this scope
11 | if(1868 <= Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:12:30: error: 'T' was not declared in this scope
12 | if(1912 <= Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
| ^
a.cc:13:30: error: 'S' was not declared in this scope
13 | if(1926 <= Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
| ^
a.cc:14:30: error: 'H' was not declared in this scope
14 | if(1988 <= Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
| ^
|
s259384083 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y <= 1912) cout<<M<<" "<< Y - 1868<<endl;
if(1912 <= Y <= 1926) cout<<T<<" "<< Y - 1912<<endl;
if(1926 <= Y <= 1988) cout<<S<<" "<< Y - 1926<<endl;
if(1988 <= Y <= 2016) cout<<H<<" "<< Y - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 <<endl;
if(E = 2) cout<<Y + 1912 <<endl;
if(E = 3) cout<<Y + 1926 <<endl;
if(E = 4) cout<<Y + 1988 <<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: 'M' was not declared in this scope
11 | if(1868 <= Y <= 1912) cout<<M<<" "<< Y - 1868<<endl;
| ^
a.cc:12:30: error: 'T' was not declared in this scope
12 | if(1912 <= Y <= 1926) cout<<T<<" "<< Y - 1912<<endl;
| ^
a.cc:13:30: error: 'S' was not declared in this scope
13 | if(1926 <= Y <= 1988) cout<<S<<" "<< Y - 1926<<endl;
| ^
a.cc:14:30: error: 'H' was not declared in this scope
14 | if(1988 <= Y <= 2016) cout<<H<<" "<< Y - 1988<<endl;
| ^
|
s706330355 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y <= 1912) cout<<M<<" "<<Y - 1868<<endl;
if(1912 <= Y <= 1926) cout<<T<<" "<<Y - 1912<<endl;
if(1926 <= Y <= 1988) cout<<S<<" "<<Y - 1926<<endl;
if(1988 <= Y <= 2016) cout<<H<<" "<<Y - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 <<endl;
if(E = 2) cout<<Y + 1912 <<endl;
if(E = 3) cout<<Y + 1926 <<endl;
if(E = 4) cout<<Y + 1988 <<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: 'M' was not declared in this scope
11 | if(1868 <= Y <= 1912) cout<<M<<" "<<Y - 1868<<endl;
| ^
a.cc:12:30: error: 'T' was not declared in this scope
12 | if(1912 <= Y <= 1926) cout<<T<<" "<<Y - 1912<<endl;
| ^
a.cc:13:30: error: 'S' was not declared in this scope
13 | if(1926 <= Y <= 1988) cout<<S<<" "<<Y - 1926<<endl;
| ^
a.cc:14:30: error: 'H' was not declared in this scope
14 | if(1988 <= Y <= 2016) cout<<H<<" "<<Y - 1988<<endl;
| ^
|
s165886292 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y <= 1912) cout<<M<<" "<<Y - 1868<<endl;
if(1912 <= Y <= 1926) cout<<T<<" "<<Y - 1912<<endl;
if(1926 <= Y <= 1988) cout<<S<<" "<<Y - 1926<<endl;
if(1988 <= Y <= 2016) cout<<H<<" "<<Y - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 <<endl;
if(E = 2) cout<<Y + 1912 <<endl;
if(E = 3) cout<<Y + 1926 <<endl;
if(E = 4) cout<<Y + 1988 <<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:30: error: 'M' was not declared in this scope
11 | if(1868 <= Y <= 1912) cout<<M<<" "<<Y - 1868<<endl;
| ^
a.cc:12:30: error: 'T' was not declared in this scope
12 | if(1912 <= Y <= 1926) cout<<T<<" "<<Y - 1912<<endl;
| ^
a.cc:13:30: error: 'S' was not declared in this scope
13 | if(1926 <= Y <= 1988) cout<<S<<" "<<Y - 1926<<endl;
| ^
a.cc:14:30: error: 'H' was not declared in this scope
14 | if(1988 <= Y <= 2016) cout<<H<<" "<<Y - 1988<<endl;
| ^
|
s155368155 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M1911-Y<<endl
} else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl
} else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl
} else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl
} else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:11: error: 'M1911' was not declared in this scope
10 | cout<<M1911-Y<<endl
| ^~~~~
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1925-Y"<<endl
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1988-Y"<<endl
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2016-Y"<<endl
| ^~~~~~~~
| ;
a.cc:18:25: error: expected ';' before '}' token
18 | cout<<"1867+Y"<<endl
| ^
| ;
19 | } else if(E=2&&1912>=Y){
| ~
a.cc:20:25: error: expected ';' before '}' token
20 | cout<<"1911+Y"<<endl
| ^
| ;
21 | } else if(E=3&&1926>=Y){
| ~
a.cc:22:25: error: expected ';' before '}' token
22 | cout<<"1925+Y"<<endl
| ^
| ;
23 | } else if(E=4&&1989>=Y){
| ~
a.cc:24:25: error: expected ';' before '}' token
24 | cout<<"1988+Y"<<endl
| ^
| ;
25 | }
| ~
|
s655744119 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M1911-Y<<endl;
} else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl;
} else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl;
} else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl;
} else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl;
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl;
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl;
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:11: error: 'M1911' was not declared in this scope
10 | cout<<M1911-Y<<endl;
| ^~~~~
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1925-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1988-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2016-Y"<<endl;
| ^~~~~~~~
| ;
|
s922351320 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<"M1911-Y"<<endl;
} else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl;
} else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl;
} else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl;
}
else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl;
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl;
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl;
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1925-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1988-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2016-Y"<<endl;
| ^~~~~~~~
| ;
|
s472189290 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
if(1926 <= Y && Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
if(1988 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 <<endl;
if(E = 2) cout<<Y + 1912 <<endl;
if(E = 3) cout<<Y + 1926 <<endl;
if(E = 4) cout<<Y + 1988 <<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:35: error: 'M' was not declared in this scope
11 | if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:12:35: error: 'T' was not declared in this scope
12 | if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
| ^
a.cc:13:35: error: 'S' was not declared in this scope
13 | if(1926 <= Y && Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
| ^
a.cc:14:35: error: 'H' was not declared in this scope
14 | if(1988 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
| ^
|
s111335045 | p00332 | C++ | #include <iostream>
using namespace std;
int main(){
int e,y,a,b,c;
cin>>e>>y;
if(e=0){
a=y-1868;
if(a<=44){
cout<<"M"<<a<<cout;
}else if(45<=a && a<=58){
b=a-44;
cout<<"T"<<a<<endl;
}else if(59<=a && a<=121){
b=a-58;
cout<<"S"<<a<<endl;
}else{
b=a-121;
cout<<"H"<<a<<endl;
}
}else if(e=1){
c=y+1868;
cout<<c<<endl;
}else if(e=2){
c=y+1912;
cout<<c<<endl;
}else if(e=3){
c=y+1926;
cout<<c<<endl;
}else if(e=3){
c=y+1989;
cout<<c<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:19: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'})
10 | cout<<"M"<<a<<cout;
| ~~~~~~~~~~~~^~~~~~
| | |
| | basic_ostream<[...]>
| basic_ostream<[...]>
a.cc:10:19: note: candidate: 'operator<<(int, int)' (built-in)
10 | cout<<"M"<<a<<cout;
| ~~~~~~~~~~~~^~~~~~
a.cc:10:19: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: can |
s111550846 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911-Y"<<endl;
} else if(E=0&&1925-Y>=0){
cout<<T"1925-Y"<<endl;
} else if(E=0&&1988-Y>=0){
cout<<S"1988-Y"<<endl;
} else if(E=0&&2016-Y>=0){
cout<<H"2016-Y"<<endl;
}
else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl;
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl;
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl;
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1911-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1925-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1988-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2016-Y"<<endl;
| ^~~~~~~~
| ;
|
s896889137 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M1911-Y<<endl;
} else if(E=0&&1925-Y>=0){
cout<<T1925-Y<<endl;
} else if(E=0&&1988-Y>=0){
cout<<S1988-Y<<endl;
} else if(E=0&&2016-Y>=0){
cout<<H2016-Y<<endl;
}
else if(E=1&&1868>=Y){
cout<<1867+Y<<endl;
} else if(E=2&&1912>=Y){
cout<<1911+Y<<endl;
} else if(E=3&&1926>=Y){
cout<<1925+Y<<endl;
} else if(E=4&&1989>=Y){
cout<<1988+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:11: error: 'M1911' was not declared in this scope
10 | cout<<M1911-Y<<endl;
| ^~~~~
a.cc:12:11: error: 'T1925' was not declared in this scope
12 | cout<<T1925-Y<<endl;
| ^~~~~
a.cc:14:11: error: 'S1988' was not declared in this scope
14 | cout<<S1988-Y<<endl;
| ^~~~~
a.cc:16:11: error: 'H2016' was not declared in this scope
16 | cout<<H2016-Y<<endl;
| ^~~~~
|
s388158223 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1911"-Y<<endl;
} else if(E=0&&1925-Y>=0){
cout<<T"1925"-Y<<endl;
} else if(E=0&&1988-Y>=0){
cout<<S"1988"-Y<<endl;
} else if(E=0&&2016-Y>=0){
cout<<H"2016"-Y<<endl;
}
else if(E=1&&1868>=Y){
cout<<"1867"+Y<<endl;
} else if(E=2&&1912>=Y){
cout<<"1911"+Y<<endl;
} else if(E=3&&1926>=Y){
cout<<"1925"+Y<<endl;
} else if(E=4&&1989>=Y){
cout<<"1988"+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1911"-Y<<endl;
| ^~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1925"-Y<<endl;
| ^~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1988"-Y<<endl;
| ^~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2016"-Y<<endl;
| ^~~~~~
| ;
|
s743479389 | p00332 | C++ | #include <iostream>
using namespace std;
int main(){
int e,y,a,b,c;
cin>>e>>y;
char m='M';
char t='T';
char s='S';
char h='H';
if(e=0){
a=y-1868;
if(a<=44){
cout<<m<<a<<cout;
}else if(45<=a && a<=58){
b=a-44;
cout<<t<<a<<endl;
}else if(59<=a && a<=121){
b=a-58;
cout<<s<<a<<endl;
}else{
b=a-121;
cout<<h<<a<<endl;
}
}else if(e=1){
c=y+1868;
cout<<c<<endl;
}else if(e=2){
c=y+1912;
cout<<c<<endl;
}else if(e=3){
c=y+1926;
cout<<c<<endl;
}else if(e=3){
c=y+1989;
cout<<c<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:14:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'})
14 | cout<<m<<a<<cout;
| ~~~~~~~~~~^~~~~~
| | |
| | basic_ostream<[...]>
| basic_ostream<[...]>
a.cc:14:17: note: candidate: 'operator<<(int, int)' (built-in)
14 | cout<<m<<a<<cout;
| ~~~~~~~~~~^~~~~~
a.cc:14:17: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std:: |
s177217097 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int e,y,a,b,c;
cin>>e>>y;
char m='M';
char t='T';
char s='S';
char h='H';
if(e=0){
a=y-1868;
if(a<=44){
cout<<m<<a<<cout;
}else if(45<=a && a<=58){
b=a-44;
cout<<t<<a<<endl;
}else if(59<=a && a<=121){
b=a-58;
cout<<s<<a<<endl;
}else{
b=a-121;
cout<<h<<a<<endl;
}
}else if(e=1){
c=y+1868;
cout<<c<<endl;
}else if(e=2){
c=y+1912;
cout<<c<<endl;
}else if(e=3){
c=y+1926;
cout<<c<<endl;
}else if(e=3){
c=y+1989;
cout<<c<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:14:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'})
14 | cout<<m<<a<<cout;
| ~~~~~~~~~~^~~~~~
| | |
| | basic_ostream<[...]>
| basic_ostream<[...]>
a.cc:14:17: note: candidate: 'operator<<(int, int)' (built-in)
14 | cout<<m<<a<<cout;
| ~~~~~~~~~~^~~~~~
a.cc:14:17: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no kno |
s249132615 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
if(1926 <= Y && Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
if(1988 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
}
if(E = 1) cout<<Y + 1868 <<endl;
if(E = 2) cout<<Y + 1912 <<endl;
if(E = 3) cout<<Y + 1926 <<endl;
if(E = 4) cout<<Y + 1988 <<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:35: error: 'M' was not declared in this scope
11 | if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:12:35: error: 'T' was not declared in this scope
12 | if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
| ^
a.cc:13:35: error: 'S' was not declared in this scope
13 | if(1926 <= Y && Y <= 1988) cout<<S<<" "<<(Y + 1) - 1926<<endl;
| ^
a.cc:14:35: error: 'H' was not declared in this scope
14 | if(1988 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1988<<endl;
| ^
|
s480883249 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
}
if(E = 1) cout<<Y + 1868 <<endl;
if(E = 2) cout<<Y + 1912 <<endl;
if(E = 3) cout<<Y + 1926 <<endl;
if(E = 4) cout<<Y + 1988 <<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:35: error: 'M' was not declared in this scope
11 | if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:12:40: error: 'T' was not declared in this scope
12 | else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
| ^
a.cc:13:40: error: 'S' was not declared in this scope
13 | else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
| ^
a.cc:14:40: error: 'H' was not declared in this scope
14 | else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
| ^
|
s363540840 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1912-Y"<<endl;
} else if(E=0&&1925-Y>=0){
cout<<T"1926-Y"<<endl;
} else if(E=0&&1988-Y>=0){
cout<<S"1989-Y"<<endl;
} else if(E=0&&2016-Y>=0){
cout<<H"2017-Y"<<endl;
}
else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl;
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl;
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl;
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1912-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1926-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1989-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2017-Y"<<endl;
| ^~~~~~~~
| ;
|
s126370498 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1912-Y"<<endl
} else if(E=0&&1925-Y>=0){
cout<<T"1926-Y"<<endl
} else if(E=0&&1988-Y>=0){
cout<<S"1989-Y"<<endl
} else if(E=0&&2016-Y>=0){
cout<<H"2017-Y"<<endl
}
else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1912-Y"<<endl
| ^~~~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1926-Y"<<endl
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1989-Y"<<endl
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2017-Y"<<endl
| ^~~~~~~~
| ;
a.cc:20:25: error: expected ';' before '}' token
20 | cout<<"1867+Y"<<endl
| ^
| ;
21 | } else if(E=2&&1912>=Y){
| ~
a.cc:22:25: error: expected ';' before '}' token
22 | cout<<"1911+Y"<<endl
| ^
| ;
23 | } else if(E=3&&1926>=Y){
| ~
a.cc:24:25: error: expected ';' before '}' token
24 | cout<<"1925+Y"<<endl
| ^
| ;
25 | } else if(E=4&&1989>=Y){
| ~
a.cc:26:25: error: expected ';' before '}' token
26 | cout<<"1988+Y"<<endl
| ^
| ;
27 | }
| ~
|
s730962639 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1912-Y"<<endl;
} else if(E=0&&1925-Y>=0){
cout<<T"1926-Y"<<endl;
} else if(E=0&&1988-Y>=0){
cout<<S"1989-Y"<<endl;
} else if(E=0&&2016-Y>=0){
cout<<H"2017-Y"<<endl;
}
else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl;
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl;
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl;
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1912-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1926-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1989-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2017-Y"<<endl;
| ^~~~~~~~
| ;
|
s036393098 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
}
if(E = 1) cout<<Y + 1868<<endl;
else if(E = 2) cout<<Y + 1912<<endl;
else if(E = 3) cout<<Y + 1926<<endl;
else if(E = 4) cout<<Y + 1989<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:35: error: 'M' was not declared in this scope
11 | if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:12:40: error: 'T' was not declared in this scope
12 | else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
| ^
a.cc:13:40: error: 'S' was not declared in this scope
13 | else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
| ^
a.cc:14:40: error: 'H' was not declared in this scope
14 | else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
| ^
|
s327515163 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int e,y,a,b,c;
cin>>e>>y;
char m='M';
char t='T';
char s='S';
char h='H';
if(e=0){
a=y-1868;
if(a<=44){
cout<<m<<a<<cout;
}else if(45<=a && a<=58){
b=a-44;
cout<<t<<a<<endl;
}else if(59<=a && a<=121){
b=a-58;
cout<<s<<a<<endl;
}else{
b=a-121;
cout<<h<<a<<endl;
}
}else if(e=1){
c=y+1868;
cout<<c<<endl;
}else if(e=2){
c=y+1912;
cout<<c<<endl;
}else if(e=3){
c=y+1926;
cout<<c<<endl;
}else{
c=y+1989;
cout<<c<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:14:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'})
14 | cout<<m<<a<<cout;
| ~~~~~~~~~~^~~~~~
| | |
| | basic_ostream<[...]>
| basic_ostream<[...]>
a.cc:14:17: note: candidate: 'operator<<(int, int)' (built-in)
14 | cout<<m<<a<<cout;
| ~~~~~~~~~~^~~~~~
a.cc:14:17: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no kno |
s872539282 | p00332 | C++ | /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
| |
s417549863 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int e,y,a,b,c;
char m='M';
char t='T';
char s='S';
char h='H';
cin>>e>>y;
if(e=0){
a=y-1868;
if(a<=44){
cout<<m<<a<<cout;
}else if(45<=a && a<=58){
b=a-44;
cout<<t<<a<<endl;
}else if(59<=a && a<=121){
b=a-58;
cout<<s<<a<<endl;
}else{
b=a-121;
cout<<h<<a<<endl;
}
}else if(e=1){
c=y+1868;
cout<<c<<endl;
}else if(e=2){
c=y+1912;
cout<<c<<endl;
}else if(e=3){
c=y+1926;
cout<<c<<endl;
}else{
c=y+1989;
cout<<c<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:14:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'})
14 | cout<<m<<a<<cout;
| ~~~~~~~~~~^~~~~~
| | |
| | basic_ostream<[...]>
| basic_ostream<[...]>
a.cc:14:17: note: candidate: 'operator<<(int, int)' (built-in)
14 | cout<<m<<a<<cout;
| ~~~~~~~~~~^~~~~~
a.cc:14:17: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no kno |
s965823226 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
}
if(E = 1) cout<<Y + 1867<<endl;
else if(E = 2) cout<<Y + 1911<<endl;
else if(E = 3) cout<<Y + 1925<<endl;
else if(E = 4) cout<<Y + 1988<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:35: error: 'M' was not declared in this scope
11 | if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:12:40: error: 'T' was not declared in this scope
12 | else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
| ^
a.cc:13:40: error: 'S' was not declared in this scope
13 | else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
| ^
a.cc:14:40: error: 'H' was not declared in this scope
14 | else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
| ^
|
s419257895 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M1912-Y<<endl;
} else if(E=0&&1925-Y>=0){
cout<<T1926-Y<<endl;
} else if(E=0&&1988-Y>=0){
cout<<S1989-Y<<endl;
} else if(E=0&&2016-Y>=0){
cout<<H2017-Y<<endl;
}
else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl;
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl;
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl;
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:11: error: 'M1912' was not declared in this scope
10 | cout<<M1912-Y<<endl;
| ^~~~~
a.cc:12:11: error: 'T1926' was not declared in this scope
12 | cout<<T1926-Y<<endl;
| ^~~~~
a.cc:14:11: error: 'S1989' was not declared in this scope
14 | cout<<S1989-Y<<endl;
| ^~~~~
a.cc:16:11: error: 'H2017' was not declared in this scope
16 | cout<<H2017-Y<<endl;
| ^~~~~
|
s356604271 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1911-Y>=0){
cout<<M"1912"-Y<<endl;
} else if(E=0&&1925-Y>=0){
cout<<T"1926"-Y<<endl;
} else if(E=0&&1988-Y>=0){
cout<<S"1989"-Y<<endl;
} else if(E=0&&2016-Y>=0){
cout<<H"2017"-Y<<endl;
}
else if(E=1&&1868>=Y){
cout<<"1867+Y"<<endl;
} else if(E=2&&1912>=Y){
cout<<"1911+Y"<<endl;
} else if(E=3&&1926>=Y){
cout<<"1925+Y"<<endl;
} else if(E=4&&1989>=Y){
cout<<"1988+Y"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1912"-Y<<endl;
| ^~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1926"-Y<<endl;
| ^~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1989"-Y<<endl;
| ^~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2017"-Y<<endl;
| ^~~~~~
| ;
|
s742065408 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E, Y;
cin>>E>>Y;
if(E = 0){
if(1868 <= Y && Y <= 1912) cout<<"M<<" "<<(Y + 1) - 1868<<endl;
else if(1912 <= Y && Y <= 1926) cout<<"T"<<" "<<(Y + 1) - 1912<<endl;
else if(1926 <= Y && Y <= 1989) cout<<"S"<<" "<<(Y + 1) - 1926<<endl;
else if(1989 <= Y && Y <= 2016) cout<<"H"<<" "<<(Y + 1) - 1989<<endl;
}
if(E = 1) cout<<Y + 1867<<endl;
else if(E = 2) cout<<Y + 1911<<endl;
else if(E = 3) cout<<Y + 1925<<endl;
else if(E = 4) cout<<Y + 1988<<endl;
return 0;
}
| a.cc:11:41: warning: missing terminating " character
11 | if(1868 <= Y && Y <= 1912) cout<<"M<<" "<<(Y + 1) - 1868<<endl;
| ^
a.cc:11:41: error: missing terminating " character
11 | if(1868 <= Y && Y <= 1912) cout<<"M<<" "<<(Y + 1) - 1868<<endl;
| ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:40: error: expected ';' before 'else'
11 | if(1868 <= Y && Y <= 1912) cout<<"M<<" "<<(Y + 1) - 1868<<endl;
| ^
| ;
12 | else if(1912 <= Y && Y <= 1926) cout<<"T"<<" "<<(Y + 1) - 1912<<endl;
| ~~~~
|
s792304537 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int Y,E;
cin>> Y,E;
if ( E = 0 && 1868 <= Y <= 1911 )
cout << M << Y - 1868 + 1 << endl;
else if ( E = 0 && 1912 <= Y <= 1925 )
cout << T << Y - 1912 + 1 << endl;
else if ( E = 0 && 1926 <= Y <= 1988 )
cout << S << Y - 1926 + 1 << endl;
else if ( E = 0 && 1989 <= Y <= 2016 )
cout << H << Y - 1989 + 1 << endl;
else if ( E = 1 )
cout << 1868 + Y - 1 <<endl;
else if ( E = 2 )
cout << 1912 + Y - 1 <<endl;
else if ( E = 3 )
cout << 1926 + Y - 1 <<endl;
else cout << 1989 + Y - 1 << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:13: error: 'M' was not declared in this scope
10 | cout << M << Y - 1868 + 1 << endl;
| ^
a.cc:13:13: error: 'T' was not declared in this scope
13 | cout << T << Y - 1912 + 1 << endl;
| ^
a.cc:16:13: error: 'S' was not declared in this scope
16 | cout << S << Y - 1926 + 1 << endl;
| ^
a.cc:19:13: error: 'H' was not declared in this scope
19 | cout << H << Y - 1989 + 1 << endl;
| ^
|
s226544292 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1912-Y>=0){
cout<<M"1912"-Y<<endl;
} else if(E=0&&1926-Y>=0){
cout<<T"1926"-Y<<endl;
} else if(E=0&&1989-Y>=0){
cout<<S"1989"-Y<<endl;
} else if(E=0&&2017-Y>=0){
cout<<H"2017"-Y<<endl;
}
else if(E=1&&1867>=Y){
cout<<"1867+Y"<<endl;
} else if(E=2&&1911>=Y){
cout<<"1911+Y"<<endl;
} else if(E=3&&1925>=Y){
cout<<"1925+Y"<<endl;
} else if(E=4&&1988>=Y){
cout<<"1988+Y"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1912"-Y<<endl;
| ^~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1926"-Y<<endl;
| ^~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1989"-Y<<endl;
| ^~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2017"-Y<<endl;
| ^~~~~~
| ;
|
s055199685 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&1912-Y>=0){
cout<<M"1912-Y"<<endl;
} else if(E=0&&1926-Y>=0){
cout<<T"1926-Y"<<endl;
} else if(E=0&&1989-Y>=0){
cout<<S"1989-Y"<<endl;
} else if(E=0&&2017-Y>=0){
cout<<H"2017-Y"<<endl;
}
else if(E=1&&1867>=Y){
cout<<"1867+Y"<<endl;
} else if(E=2&&1911>=Y){
cout<<"1911+Y"<<endl;
} else if(E=3&&1925>=Y){
cout<<"1925+Y"<<endl;
} else if(E=4&&1988>=Y){
cout<<"1988+Y"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
10 | cout<<M"1912-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:12:12: error: expected ';' before string constant
12 | cout<<T"1926-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:14:12: error: expected ';' before string constant
14 | cout<<S"1989-Y"<<endl;
| ^~~~~~~~
| ;
a.cc:16:12: error: expected ';' before string constant
16 | cout<<H"2017-Y"<<endl;
| ^~~~~~~~
| ;
|
s932761871 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y,M,T,S,H;
cin>>E>>Y;
if(E=0&&Y<=1911){
cout<<M<<Y-1867<<endl;
} else if(E==0&&Y<=1925){
cout<<T<<Y-1911<<endl;
} else if(E==0&&Y>=1988){
cout<<S<<Y-1925<<endl;
} else (E==0&&Y<=2016){
cout<<H<<Y-1988<<endl;
}
else if(E==1){
cout<<1867+Y<<endl;
} else if(E==2){
cout<<1911+Y<<endl;
} else if(E==3){
cout<<1925+Y<<endl;
} else (E==4){
cout<<1988+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:15:29: error: expected ';' before '{' token
15 | } else (E==0&&Y<=2016){
| ^
| ;
a.cc:19:3: error: 'else' without a previous 'if'
19 | else if(E==1){
| ^~~~
a.cc:25:20: error: expected ';' before '{' token
25 | } else (E==4){
| ^
| ;
|
s359718188 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
if(E==0){
1868<=Y&&Y<=1911){
cout<<"M"<<Y-1867<<endl;
} else if(1912<=Y&&Y<=1925){
cout<<"T"<<Y-1911<<endl;
} else if(1926<=Y&&Y>=1988){
cout<<"S"<<Y-1925<<endl;
} else if(1989<=Y&&Y<=2016){
cout<<"H"<<Y-1988<<endl;
}
else if(E==1){
cout<<1867+Y<<endl;
} else if(E==2){
cout<<1911+Y<<endl;
} else if(E==3){
cout<<1925+Y<<endl;
} else if(E==4){
cout<<1988+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before ')' token
10 | 1868<=Y&&Y<=1911){
| ^
| ;
a.cc:12:9: error: expected '}' before 'else'
12 | } else if(1912<=Y&&Y<=1925){
| ^~~~
a.cc:9:11: note: to match this '{'
9 | if(E==0){
| ^
|
s538675999 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
if(E==0){
1868<=Y && Y<=1911){
cout<<"M"<<Y-1867<<endl;
} else if(1912<=Y && Y<=1925){
cout<<"T"<<Y-1911<<endl;
} else if(1926<=Y && Y>=1988){
cout<<"S"<<Y-1925<<endl;
} else if(1989<=Y && Y<=2016){
cout<<"H"<<Y-1988<<endl;
}
else if(E==1){
cout<<1867+Y<<endl;
} else if(E==2){
cout<<1911+Y<<endl;
} else if(E==3){
cout<<1925+Y<<endl;
} else if(E==4){
cout<<1988+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before ')' token
10 | 1868<=Y && Y<=1911){
| ^
| ;
a.cc:12:9: error: expected '}' before 'else'
12 | } else if(1912<=Y && Y<=1925){
| ^~~~
a.cc:9:11: note: to match this '{'
9 | if(E==0){
| ^
|
s194573283 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
if(E==0){
1868<=Y && Y<=1911){
cout<<"M"<<Y-1867<<endl;
} else if(1912<=Y && Y<=1925){
cout<<"T"<<Y-1911<<endl;
} else if(1926<=Y && Y>=1988){
cout<<"S"<<Y-1925<<endl;
} else if(1989<=Y && Y<=2016){
cout<<"H"<<Y-1988<<endl;
}
else if(E==1){
cout<<1867+Y<<endl;
} else if(E==2){
cout<<1911+Y<<endl;
} else if(E==3){
cout<<1925+Y<<endl;
} else if(E==4){
cout<<1988+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before ')' token
10 | 1868<=Y && Y<=1911){
| ^
| ;
a.cc:12:5: error: expected '}' before 'else'
12 | } else if(1912<=Y && Y<=1925){
| ^~~~
a.cc:9:11: note: to match this '{'
9 | if(E==0){
| ^
|
s441421477 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
if(E==0){
if (1868<=Y && Y<=1911){
cout<<"M"<<Y-1867<<endl;
} else if(1912<=Y && Y<=1925){
cout<<"T"<<Y-1911<<endl;
} else if(1926<=Y && Y>=1988){
cout<<"S"<<Y-1925<<endl;
} else if(1989<=Y && Y<=2016){
cout<<"H"<<Y-1988<<endl;
}
else if(E==1){
cout<<1867+Y<<endl;
} else if(E==2){
cout<<1911+Y<<endl;
} else if(E==3){
cout<<1925+Y<<endl;
} else if(E==4){
cout<<1988+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:31:2: error: expected '}' at end of input
31 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s381661645 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
if(E==0){
if (1868<=Y && Y<=1911){
cout<<"M"<<Y-1867<<endl;
} else if(1912<=Y && Y<=1925){
cout<<"T"<<Y-1911<<endl;
} else if(1926<=Y && Y>=1988){
cout<<"S"<<Y-1925<<endl;
} else (1989<=Y && Y<=2016){
cout<<"H"<<Y-1988<<endl;
}
else if(E==1){
cout<<1867+Y<<endl;
} else if(E==2){
cout<<1911+Y<<endl;
} else if(E==3){
cout<<1925+Y<<endl;
} else if(E==4){
cout<<1988+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:16:30: error: expected ';' before '{' token
16 | } else (1989<=Y && Y<=2016){
| ^
| ;
a.cc:20:3: error: expected '}' before 'else'
20 | else if(E==1){
| ^~~~
a.cc:9:11: note: to match this '{'
9 | if(E==0){
| ^
|
s934952277 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
if(E==0){
if (1868<=Y && Y<=1911){
cout<<"M"<<Y-1867<<endl;
} else if(1912<=Y && Y<=1925){
cout<<"T"<<Y-1911<<endl;
} else if(1926<=Y && Y<=1988){
cout<<"S"<<Y-1925<<endl;
} else if(1989<=Y && Y<=2016){
cout<<"H"<<Y-1988<<endl;
}
else if(E==1){
cout<<1867+Y<<endl;
} else if(E==2){
cout<<1911+Y<<endl;
} else if(E==3){
cout<<1925+Y<<endl;
} else if(E==4){
cout<<1988+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:31:2: error: expected '}' at end of input
31 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s777355035 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
if(E==0){
if (1868<=Y && Y<=1911){
cout<<"M"<<Y-1867<<endl;
} else if(1912<=Y && Y<=1925){
cout<<"T"<<Y-1911<<endl;
} else if(1926<=Y && Y<=1988){
cout<<"S"<<Y-1925<<endl;
} else {
cout<<"H"<<Y-1988<<endl;
}
else if(E==1){
cout<<1867+Y<<endl;
} else if(E==2){
cout<<1911+Y<<endl;
} else if(E==3){
cout<<1925+Y<<endl;
} else if(E==4){
cout<<1988+Y<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:20:3: error: expected '}' before 'else'
20 | else if(E==1){
| ^~~~
a.cc:9:11: note: to match this '{'
9 | if(E==0){
| ^
|
s826146360 | p00332 | C++ | #include<iostream>
using namespace std;
int main(){
int e,r;
cin>>e>>r;
if(!e){
if(y<1912)cout<<'M'<<y-1867<<endl;
else if(y<1926)cout<<'T'<<y-1911<<endl;
else if(y<1989)cout<<'S'<<y-1925<<endl;
else cout<<'H'<<y-1988<<endl;
}
if(e==1)cout<<y+1867<<endl;
if(e==2)cout<<y+1911<<endl;
if(e==3)cout<<y+1925<<endl;
if(e==4)cout<<y+1988<<endl;
} | a.cc: In function 'int main()':
a.cc:7:8: error: 'y' was not declared in this scope
7 | if(y<1912)cout<<'M'<<y-1867<<endl;
| ^
a.cc:12:17: error: 'y' was not declared in this scope
12 | if(e==1)cout<<y+1867<<endl;
| ^
a.cc:13:17: error: 'y' was not declared in this scope
13 | if(e==2)cout<<y+1911<<endl;
| ^
a.cc:14:17: error: 'y' was not declared in this scope
14 | if(e==3)cout<<y+1925<<endl;
| ^
a.cc:15:17: error: 'y' was not declared in this scope
15 | if(e==4)cout<<y+1988<<endl;
| ^
|
s163445473 | p00332 | C++ | #include<iostream>
using namespace std;
int main(){
int E, Y;
cin >> E >> Y;
switch(E){
case 0:
if(1868<=Y&&Y<=1911) cout << 'M' << Y-1867 << endl;
if(1912<=Y&&Y<=1925) cout << 'T' << Y-1911 << endl;
if(1926<=Y&&Y<=1988) cout << 'S' << Y-1925 << endl;
if(1989<=Y&&Y<=2016) cout << 'H' << Y-1988 << endl;
break;
case 1:
cout << 1867 + Y << endl;
break;
case 2:
cout << 1911 + Y << endl;
break;
case 3:
cout << 1925 + Y << endl;
break;
case 4:
cout << 1988 + Y << endl;
break;
}
return 0;
}
~ | a.cc:31:2: error: expected class-name at end of input
31 | ~
| ^
|
s699674419 | p00332 | C++ | #include<iosteram>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
switch(E){
case 0:
int X=Y-1867;
if(X<=44){
cout<<"M"<<X<<endl;
}else if(x>131){
cout<<"H"<<X-131<<endl;
}else{
if(X<59){
cout<<"T"<<X-44<<endl;
}else{
cout<<"S"<<X-59<<endl;
}
}
break;
case 1:
cout<<1867+Y<<endl;
break:
case 2:
cout<<1911+Y<<endl;
break;
case 3:
cout<<1925+Y<<endl;
break;
case 4:
cout<<1988+Y<<endl;
break;
}
} | a.cc:1:9: fatal error: iosteram: No such file or directory
1 | #include<iosteram>
| ^~~~~~~~~~
compilation terminated.
|
s932593169 | p00332 | C++ | #include<iostream>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
switch(E){
case 0:
int X=Y-1867;
if(X<=44){
cout<<"M"<<X<<endl;
}else if(x>131){
cout<<"H"<<X-131<<endl;
}else{
if(X<59){
cout<<"T"<<X-44<<endl;
}else{
cout<<"S"<<X-59<<endl;
}
}
break;
case 1:
cout<<1867+Y<<endl;
break:
case 2:
cout<<1911+Y<<endl;
break;
case 3:
cout<<1925+Y<<endl;
break;
case 4:
cout<<1988+Y<<endl;
break;
}
} | a.cc: In function 'int main()':
a.cc:12:42: error: 'x' was not declared in this scope
12 | }else if(x>131){
| ^
a.cc:22:22: error: jump to case label
22 | case 1:
| ^
a.cc:9:37: note: crosses initialization of 'int X'
9 | int X=Y-1867;
| ^
a.cc:24:38: error: expected ';' before ':' token
24 | break:
| ^
| ;
a.cc:24:38: error: expected primary-expression before ':' token
a.cc:28:22: error: jump to case label
28 | case 3:
| ^
a.cc:9:37: note: crosses initialization of 'int X'
9 | int X=Y-1867;
| ^
a.cc:31:22: error: jump to case label
31 | case 4:
| ^
a.cc:9:37: note: crosses initialization of 'int X'
9 | int X=Y-1867;
| ^
|
s315383357 | p00332 | C++ | #include<iostream>
using namespace std;
int main(){
int E,Y;
cin>>E>>Y;
if(E==0){
if(Y<=1868&&Y>=1911){
y=Y-1867;
cout<<'M'<<y<<endl;
}else if(Y<=1912&&Y>=1925){
y=Y-1911;
cout<<'T'<<y<<endl;
}else if(Y<=1926&&Y>=1988){
y=Y-1925;
cout<<'S'<<y<<endl;
}else if(Y<=1989&&Y>=2016){
y=Y-1988;
cout<<'H'<<y<<endl;
}
}else if(E==1){
cout<<1867+Y<<endl;
}else if(E==2){
cout<<1911+Y<<endl;
}else if(E==3){
cout<<1925+Y<<endl;
}else if(E==4){
cout<<1988+Y<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:25: error: 'y' was not declared in this scope
9 | y=Y-1867;
| ^
a.cc:12:25: error: 'y' was not declared in this scope
12 | y=Y-1911;
| ^
a.cc:15:25: error: 'y' was not declared in this scope
15 | y=Y-1925;
| ^
a.cc:18:25: error: 'y' was not declared in this scope
18 | y=Y-1988;
| ^
|
s172140104 | p00332 | C++ | #include<stdio.h>
int main(void)
{
int e,y;
char a[4]="MTSH";
scanf("%d %d",&e,&y);
if(e==0){
y=y-1867;
if(y<45) e=0;
else if(y<59){
e=1; y=y-44;
}
else if(y<122){
e=2; y=y-58;
}
else{
e=3; y=y-121;
}
printf("%c%d\n",a[e],y);
}
else{
if(e==1) y=1867+y;
else if(e==2) y=1911+y;
else if(e==3) y=1925+y;
else y=1988+y;
printf("%d\n",y);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:19: error: initializer-string for 'char [4]' is too long [-fpermissive]
5 | char a[4]="MTSH";
| ^~~~~~
|
s775228836 | p00332 | C++ | #include<stdio.h>
int main(void)
{
int e,y;
char a[4]="MTSH";
scanf("%d %d",&e,&y);
if(e==0){
y=y-1867;
if(y<45) e=0;
else if(y<59){
e=1; y=y-44;
}
else if(y<122){
e=2; y=y-58;
}
else{
e=3; y=y-121;
}
printf("%c%d\n",a[e],y);
}
else{
if(e==1) y=1867+y;
else if(e==2) y=1911+y;
else if(e==3) y=1925+y;
else y=1988+y;
printf("%d\n",y);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:19: error: initializer-string for 'char [4]' is too long [-fpermissive]
5 | char a[4]="MTSH";
| ^~~~~~
|
s312827758 | p00332 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod 1e9+7
__attribute__((constructor))
void initial() {
cin.tie(0);
ios::sync_with_stdio(false);
}
int gcd(int a, int b ) {
if(a == 0) return b;
return gcd(b % a, a);
}
bool isPrime(int a) {
if(a == 2) return true;
if(a < 2 || !(a % 2)) return false;
double sq = sqrt(a);
for(int i = 3; i <= sq; i += 2) {
if(a % i == 0) return false;
}
return true;
}
int main() {
int e, y;
cin >> e >> y;
if(!e) {
y -= 1867;
if(y <= 44) cout << "M" << y << endl;
else if(y <= 58) cout << "T" << y - 44 << endl;;
else if(y <= 121) cout << "S" << y - 58 << endl;;
else cout << "H" << y - 121;
}
else if(e == 1) cout << 1867 + y << endl;
else if(e == 2) cout << 1911 + y << endl;
else if(e == 3) cout << 1925 + y << endl;
else cout << 1988 + y << endl;
} | a.cc: In function 'int main()':
a.cc:42:5: error: expected '}' before 'else'
42 | else if(y <= 121) cout << "S" << y - 58 << endl;;
| ^~~~
a.cc:38:10: note: to match this '{'
38 | if(!e) {
| ^
a.cc:43:5: error: 'else' without a previous 'if'
43 | else cout << "H" << y - 121;
| ^~~~
a.cc: At global scope:
a.cc:45:3: error: expected unqualified-id before 'else'
45 | else if(e == 1) cout << 1867 + y << endl;
| ^~~~
a.cc:46:3: error: expected unqualified-id before 'else'
46 | else if(e == 2) cout << 1911 + y << endl;
| ^~~~
a.cc:47:3: error: expected unqualified-id before 'else'
47 | else if(e == 3) cout << 1925 + y << endl;
| ^~~~
a.cc:48:3: error: expected unqualified-id before 'else'
48 | else cout << 1988 + y << endl;
| ^~~~
a.cc:49:1: error: expected declaration before '}' token
49 | }
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.