submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s521910897 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B;
cin>>A>>B;
cout<<(a+b)%24<<endl;
} | a.cc: In function 'int main()':
a.cc:7:10: error: 'a' was not declared in this scope
7 | cout<<(a+b)%24<<endl;
| ^
a.cc:7:12: error: 'b' was not declared in this scope
7 | cout<<(a+b)%24<<endl;
| ^
|
s555294342 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
prt((a+b)%24);
} | a.cc: In function 'int main()':
a.cc:8:3: error: 'prt' was not declared in this scope
8 | prt((a+b)%24);
| ^~~
|
s743122556 | p03773 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int A, B;
cin >> A >> B;
int ans = A + B;
if(ans < 24)
{
cout << ans << endl;
}
if(ans > 24)
{
int ans1 = ans - 24;
cout << ans1 << endl;
}
if(ans = 24)
int ans2 = 0;
cout << ans2 << endl;
}
| a.cc: In function 'int main()':
a.cc:19:13: error: 'ans2' was not declared in this scope; did you mean 'ans'?
19 | cout << ans2 << endl;
| ^~~~
| ans
|
s155865178 | p03773 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int A, B;
cin >> A >> B;
int ans = A + B - 24
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:12:2: error: expected ',' or ';' before 'cout'
12 | cout << ans << endl;
| ^~~~
|
s076370483 | p03773 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int A, B;
cin >> A >> B;
int ans = A + B - 12
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:13:2: error: expected ',' or ';' before 'cout'
13 | cout << ans << endl;
| ^~~~
|
s996816307 | p03773 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int A, B;
cin >> A >> B;
int ans = A + B + 12
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:13:2: error: expected ',' or ';' before 'cout'
13 | cout << ans << endl;
| ^~~~
|
s683180318 | p03773 | C++ | //#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <algorithm>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
const int mod= 1e+9+7;
int main(){
int a,b; cin>>a>>b;
if(a+b>=24){
cout<<a+b-24<<endl;
}
else cout<a+b<<endl;
}
| a.cc: In function 'int main()':
a.cc:16:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
16 | else cout<a+b<<endl;
| ~~~^~~~~~
|
s053577182 | p03773 | C++ | //Ø¨ÙØ³Ù’م٠ٱللَّٰه٠ٱلرَّØÙ’مَٰن٠ٱلرَّØÙيمÙ
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl "\n"
int main()
{
int a,b;
cin >> a >> b;
if ((a+b)<2= 24)
cout << a+b << endl;
else
cout << (a+b)-24 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:14: error: lvalue required as left operand of assignment
16 | if ((a+b)<2= 24)
| ~~~~~^~
|
s082083868 | p03773 | C++ | //Ø¨ÙØ³Ù’م٠ٱللَّٰه٠ٱلرَّØÙ’مَٰن٠ٱلرَّØÙيمÙ
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl "\n"
int main()
{
int a,b;
cin >> a >> b;
if ((a+b)<2= 24)
cout << a+b << endl;
else
cout << (a+b)-24 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:14: error: lvalue required as left operand of assignment
16 | if ((a+b)<2= 24)
| ~~~~~^~
|
s588981015 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[55],b[55],c[55],d[55],tc[55];
int main(){
int n,m,f=0;
pair<int,int> min;
min.first=10^8;
min.second=1;
cin>>n>>m;
for (int i=0;i<n;i++) cin>>a[i]>>b[i];
for (int i=0;i<m;i++) cin>>c[i]>>d[i];
/**/
for (int i=0;i<n;i++){
min.first=100000000;
//cout<<"MIN:"<<min.first;
min.second=1;
/**/
for (int j=0;j<m;j++){
for (int k=0;k<f;k++) {
if (j==tc[k]) {j++;k=0;}
}
if (j==m) break;
int y=abs(a[i]-c[j])+abs(b[i]-d[j]);
//cout<<i<<" "<<j<<" "<<y<<" ";
if (y<min.first)
{min.second=j+1;min.first=y;/*cout<<min.first<<" FIRST "<<min.second<<" SECOND ";*/}
//cout<<endl;
}
cout/*<<endl<<"ANS:"*/<<min.second<<endl;
tc[f]=min.second-1;
f++;
}
/**/
return 0;
} #include<bits/stdc++.h>
using namespace std;
int a[55],b[55],c[55],d[55],tc[55];
int main(){
int n,m,f=0;
pair<int,int> min;
min.first=10^8;
min.second=1;
cin>>n>>m;
for (int i=0;i<n;i++) cin>>a[i]>>b[i];
for (int i=0;i<m;i++) cin>>c[i]>>d[i];
/**/
for (int i=0;i<n;i++){
min.first=10000000000;
//cout<<"MIN:"<<min.first;
min.second=1;
/**/
for (int j=0;j<m;j++){
for (int k=0;k<f;k++) {
if (j==tc[k]) {j++;k=0;}
}
if (j==m) break;
int y=abs(a[i]-c[j])+abs(b[i]-d[j]);
//cout<<i<<" "<<j<<" "<<y<<" ";
if (y<min.first)
{min.second=j+1;min.first=y;/*cout<<min.first<<" FIRST "<<min.second<<" SECOND ";*/}
//cout<<endl;
}
cout/*<<endl<<"ANS:"*/<<min.second<<endl;
tc[f]=min.second-1;
f++;
}
/**/
return 0;
} | a.cc:36:3: error: stray '#' in program
36 | } #include<bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:7:21: warning: result of '10^8' is 2; did you mean '1e8'? [-Wxor-used-as-pow]
7 | min.first=10^8;
| ^
| ---
| 1e
a.cc:7:19: note: you can silence this warning by using a hexadecimal constant (0xa rather than 10)
7 | min.first=10^8;
| ^~
| 0xa
a.cc: At global scope:
a.cc:36:4: error: 'include' does not name a type
36 | } #include<bits/stdc++.h>
| ^~~~~~~
a.cc:38:5: error: redefinition of 'int a [55]'
38 | int a[55],b[55],c[55],d[55],tc[55];
| ^
a.cc:3:5: note: 'int a [55]' previously declared here
3 | int a[55],b[55],c[55],d[55],tc[55];
| ^
a.cc:38:11: error: redefinition of 'int b [55]'
38 | int a[55],b[55],c[55],d[55],tc[55];
| ^
a.cc:3:11: note: 'int b [55]' previously declared here
3 | int a[55],b[55],c[55],d[55],tc[55];
| ^
a.cc:38:17: error: redefinition of 'int c [55]'
38 | int a[55],b[55],c[55],d[55],tc[55];
| ^
a.cc:3:17: note: 'int c [55]' previously declared here
3 | int a[55],b[55],c[55],d[55],tc[55];
| ^
a.cc:38:23: error: redefinition of 'int d [55]'
38 | int a[55],b[55],c[55],d[55],tc[55];
| ^
a.cc:3:23: note: 'int d [55]' previously declared here
3 | int a[55],b[55],c[55],d[55],tc[55];
| ^
a.cc:38:29: error: redefinition of 'int tc [55]'
38 | int a[55],b[55],c[55],d[55],tc[55];
| ^~
a.cc:3:29: note: 'int tc [55]' previously declared here
3 | int a[55],b[55],c[55],d[55],tc[55];
| ^~
a.cc:39:6: error: redefinition of 'int main()'
39 | int main(){
| ^~~~
a.cc:4:6: note: 'int main()' previously defined here
4 | int main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:42:21: warning: result of '10^8' is 2; did you mean '1e8'? [-Wxor-used-as-pow]
42 | min.first=10^8;
| ^
| ---
| 1e
a.cc:42:19: note: you can silence this warning by using a hexadecimal constant (0xa rather than 10)
42 | min.first=10^8;
| ^~
| 0xa
a.cc:49:19: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000' to '1410065408' [-Woverflow]
49 | min.first=10000000000;
| ^~~~~~~~~~~
|
s322389332 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
if(a+B>24) cout << a+b-24 << endl;
else cout << a+b << endl;
} | a.cc: In function 'int main()':
a.cc:8:10: error: 'B' was not declared in this scope
8 | if(a+B>24) cout << a+b-24 << endl;
| ^
|
s516077015 | p03773 | C++ | a,b = gets.split.map(&:to_i); puts (a+b)%24 | a.cc:1:1: error: 'a' does not name a type
1 | a,b = gets.split.map(&:to_i); puts (a+b)%24
| ^
a.cc:1:36: error: expected constructor, destructor, or type conversion before '(' token
1 | a,b = gets.split.map(&:to_i); puts (a+b)%24
| ^
|
s149224864 | p03773 | C | #include<stdio.h>
int main(void)
{
int A,B;
scanf("%d%d",&A,&B);
if(A+B>=24) printf("%d¥n",A+B-24);
else printf("%d¥n"、A+B);
return 0;
} | main.c: In function 'main':
main.c:9:23: error: stray '\343' in program
9 | else printf("%d<U+00A5>n"<U+3001>A+B);
| ^~~~~~~~
main.c:9:23: error: expected ')' before 'A'
9 | else printf("%d¥n"、A+B);
| ~ ^ ~
| )
|
s337512980 | p03773 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
string A,B;cin>>A>>B;
cout << (A+B)%24 << endl;
} | a.cc: In function 'int main()':
a.cc:8:16: error: no match for 'operator%' (operand types are 'std::__cxx11::basic_string<char>' and 'int')
8 | cout << (A+B)%24 << endl;
| ~~~~~^~~
| | |
| | int
| std::__cxx11::basic_string<char>
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
8 | cout << (A+B)%24 << endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
8 | cout << (A+B)%24 << endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:17: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
8 | cout << (A+B)%24 << endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
8 | cout << (A+B)%24 << endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:17: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
8 | cout << (A+B)%24 << endl;
| ^~
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:8:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
8 | cout << (A+B)%24 << endl;
| ^~
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:8:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
8 | cout << (A+B)%24 << endl;
| ^~
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:8:17: note: mismatched types 'const std::valarray<_Tp>' and 'int'
8 | cout << (A+B)%24 << endl;
| ^~
|
s212847534 | p03773 | C++ | #include <bits/stdc++.h>
#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define DEC(i, a, b) for (int i = (a); i > (b); --i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define debug(x) cerr << #x << ": " << x << '\n'
using namespace std;
typedef long long ll;
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
const ll LINF = (int)1e18;
const double EPS = 1e-9;
signed main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
string a, b;
cin >> a >> b;
int sum = a + b;
int ans = sum >= 24 ? sum - 24 : sum;
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:22:15: error: cannot convert 'std::__cxx11::basic_string<char>' to 'long long int' in initialization
22 | int sum = a + b;
| ~~^~~
| |
| std::__cxx11::basic_string<char>
|
s813882047 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
if (A + B >= 24) {
cout << (A + B) % 24 << endl;
} else {
cout << A + B << endl;
} | a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s079765177 | p03773 | C++ | #include <iostream>
using namespace std;
void ABC50(void);
void ABC52(void);
void ABC53(void);
void ABC54(void);
void ABC55(void);
void ABC56(void);
void ABC57(void);
void ABC58(void);
void ABC59(void);
int main(void){
ABC57();
return 0;
}
void ABC57(void){
int a,b;
cin>>a>>b;
if(a+b<24)cout<<a+B<<endl;
else cout<<a+b-24<<endl;
} | a.cc: In function 'void ABC57()':
a.cc:21:23: error: 'B' was not declared in this scope
21 | if(a+b<24)cout<<a+B<<endl;
| ^
|
s744145269 | p03773 | C++ | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define eb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define ub(v,k) (upper_bound(all(v),k)-v.begin())
#define fi first
#define se second
#define pi M_PI
#define PQ(T) priority_queue<T>
#define SPQ(T) priority_queue<T,vector<T>,greater<T>>
using ll=long long;
using P=pair<ll,ll>;
using PP=tuple<ll,ll,ll>;
using S=multiset<ll>;
using vi=vector<ll>;
using vvi=vector<vi>;
using vvvi=vector<vvi>;
const ll inf=1001001001001001;
const int INF=1001001001;
const int mod=1000000007;
const double eps=1e-10;
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';}
template<class T> void outvp(T v){rep(i,v.size())cout<<'('<<v[i].fi<<','<<v[i].se<<')';cout<<'\n';}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);}
template<class T> bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
void decimal(int x){cout<<fixed<<setprecision(x);}
ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;}
vi calc(ll x){vi res;while(x>0){res.eb(x%10);x/=10;}reverse(all(res));return res;}
void solve() {
int a,b;
cin>>a>b;
out((a+b)%24);
}
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
solve();
}
| a.cc: In function 'void solve()':
a.cc:41:15: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
41 | cin>>a>b;
| ~~~~~~^~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:41:15: note: candidate: 'operator>(int, int)' (built-in)
41 | cin>>a>b;
| ~~~~~~^~
a.cc:41:15: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:2:
/usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1329 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1497 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1673 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
41 | cin>>a>b;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
41 | cin>>a>b;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
41 | cin>>a>b;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
41 | cin>>a>b;
| ^
/usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
41 | cin>>a>b;
| ^
/usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:41:16: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
41 | cin>>a>b;
| ^
/usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string< |
s575032172 | p03773 | C++ | using System;
class Program{
public static void Main(){
var input = Console.ReadLine().Split(' ');
int a = int.Parse(input[0]);
int b = int.Parse(input[1]);
int ans = a + b;
if(ans >= 24) ans -= 24;
Console.WriteLine(ans);
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:4:9: error: expected ':' before 'static'
4 | public static void Main(){
| ^~~~~~~
| :
a.cc:15:2: error: expected ';' after class definition
15 | }
| ^
| ;
a.cc: In static member function 'static void Program::Main()':
a.cc:6:5: error: 'var' was not declared in this scope
6 | var input = Console.ReadLine().Split(' ');
| ^~~
a.cc:7:13: error: expected primary-expression before 'int'
7 | int a = int.Parse(input[0]);
| ^~~
a.cc:8:13: error: expected primary-expression before 'int'
8 | int b = int.Parse(input[1]);
| ^~~
a.cc:13:5: error: 'Console' was not declared in this scope
13 | Console.WriteLine(ans);
| ^~~~~~~
|
s762136325 | p03773 | C++ | using System;
class Program{
public static void Main(){
var input = Console.ReadLine().Split(' ');
int a = int.Parse(input[0]);
int b = int.Parse(input[1]);
int ans = a + b;
if(ans >= 24) ans -= 24;
Console.WriteLine(ans);
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:4:9: error: expected ':' before 'static'
4 | public static void Main(){
| ^~~~~~~
| :
a.cc:15:2: error: expected ';' after class definition
15 | }
| ^
| ;
a.cc: In static member function 'static void Program::Main()':
a.cc:6:5: error: 'var' was not declared in this scope
6 | var input = Console.ReadLine().Split(' ');
| ^~~
a.cc:7:13: error: expected primary-expression before 'int'
7 | int a = int.Parse(input[0]);
| ^~~
a.cc:8:13: error: expected primary-expression before 'int'
8 | int b = int.Parse(input[1]);
| ^~~
a.cc:13:5: error: 'Console' was not declared in this scope
13 | Console.WriteLine(ans);
| ^~~~~~~
|
s383089071 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
if (a+b < 23){
cout << a+b << endl;
}else{
cout << a+b-24 << endl;
}
}#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
if (a+b < 23){
cout << a+b << endl;
}else{
cout << a+b-24 << endl;
}
} | a.cc:12:2: error: stray '#' in program
12 | }#include <bits/stdc++.h>
| ^
a.cc:12:3: error: 'include' does not name a type
12 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:15:5: error: redefinition of 'int main()'
15 | int main(){
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main(){
| ^~~~
|
s505717876 | p03773 | C++ | A, B = map(int, input().split())
T = A+B
if (T <= 24):
print(T)
else:
print(T-24)
| a.cc:1:1: error: 'A' does not name a type
1 | A, B = map(int, input().split())
| ^
|
s609349028 | p03773 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define dunk(a) cout << (a) << endl
#define rall(a) (a).rbegin(),(a).rend()
const int INF = 2e9;
using namespace std;
using Graph = vector<vector<int>>;
typedef pair<int,int> P;
typedef long long ll;
int main(){
int a, b; cin >> a >> b;
cout << (a+b) % 24 << endl;
}#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define dunk(a) cout << (a) << endl
#define rall(a) (a).rbegin(),(a).rend()
const int INF = 2e9;
using namespace std;
using Graph = vector<vector<int>>;
typedef pair<int,int> P;
typedef long long ll;
int main(){
int a, b; cin >> a >> b;
cout << (a+b) % 24 << endl;
} | a.cc:16:2: error: stray '#' in program
16 | }#include <bits/stdc++.h>
| ^
a.cc:16:3: error: 'include' does not name a type
16 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:27:5: error: redefinition of 'int main()'
27 | int main(){
| ^~~~
a.cc:12:5: note: 'int main()' previously defined here
12 | int main(){
| ^~~~
|
s761050262 | p03773 | C++ | #include<bits\stdc++.h>
using namespace std;
#define ll long long int
int main(){
int a,b;
cin>>a>>b;
int sum=a+b;
cout<<sum%24;
} | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s375837161 | p03773 | C++ | int main()
{
int A, B,M;
cin >> A >> B;
M = A + B;
if (A <= 23 && B <= 23)
{
if (M <= 24)
cout << M;
else
cout << M - 24;
}
else
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | cin >> A >> B;
| ^~~
a.cc:10:25: error: 'cout' was not declared in this scope
10 | cout << M;
| ^~~~
a.cc:12:25: error: 'cout' was not declared in this scope
12 | cout << M - 24;
| ^~~~
|
s062578770 | p03773 | C++ | #include<iostream>
using namesapce std;
int main(){
int a,b;
cin>>a>>b;
if(a+b<24) cout<<a+b;
else cout<<a+b-24;
return 0;
} | a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
2 | using namesapce std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>a>>b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | if(a+b<24) cout<<a+b;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | else cout<<a+b-24;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s243321216 | p03773 | C++ | #inlcude<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b)%24<<endl;} | a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #inlcude<iostream>
a.cc:6:3: error: 'cout' was not declared in this scope
6 | cout<<(a+b)%24<<endl;}
| ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:19: error: 'endl' was not declared in this scope
6 | cout<<(a+b)%24<<endl;}
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #inlcude<iostream>
|
s602762213 | p03773 | C++ | A,B=map(int,input().split())
print((A+B)%24)
| a.cc:1:1: error: 'A' does not name a type
1 | A,B=map(int,input().split())
| ^
|
s038640208 | p03773 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int factor(int n) {
int ret=1;
for(int i = n; i > 1; i++)
ret *= i;
return ret;
}
int main() {
int N,A,B;
cin >> N >> A >> B;
vector<int> vec(8);
for(int i = 0; i < N; i++) {
cin >> vec[i];
}
sort(vec.begin(), vec.end());
int current_dupl = 1;
int count = 0;
int choice = 1;
int sum;
for(int i = vec.size()-1; i >= 0; i--){
if(count < A || (current_dupl > 1 && count < B)) {
sum += vec[i];
if((i < (vec.size()-1)) && (vec[i] == vec[i-1])){
current_dupl++;
}
else {
choice += factor(current_dupl);
current_dupl = 1;
}
}
count++;
}
cout >> ((float)sum / count) >> "\n" >> choice >> endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:37:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'float')
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~
| | |
| | float
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:37:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = float]':
a.cc:37:30: required from here
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s923677795 | p03773 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int factor(int n) {
int ret=1;
for(int i = n; i > 1; i++)
ret *= i;
return ret;
}
int main() {
int N,A,B;
cin >> N >> A >> B;
vector<int> vec(8);
for(int i = 0; i < N; i++) {
cin >> vec[i];
}
sort(vec.begin(), vec.end());
int current_dupl = 1;
int count = 0;
int choice = 1;
int sum;
for(int i = vec.size()-1; i >= 0; i++){
if(count < A || (current_dupl > 1 && count < B)) {
sum += vec[i];
if((i < (vec.size()-1)) && (vec[i] == vec[i-1])){
current_dupl++;
}
else {
choice += factor(current_dupl);
current_dupl = 1;
}
}
count++;
}
cout >> ((float)sum / count) >> "\n" >> choice >> endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:37:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'float')
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~
| | |
| | float
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:37:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:37:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = float]':
a.cc:37:30: required from here
37 | cout >> ((float)sum / count) >> "\n" >> choice >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s383981641 | p03773 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int factor(int n) {
int ret=1;
for(int i = n; i > 1; i++)
ret *= i;
return ret;
}
int main() {
int N,A,B;
cin >> N >> A >> B;
vector<int> vec = new vector<int>(N);
for(int i = 0; i < N; i++) {
cin >> vec[i];
}
sort(vec.begin(), vec.end());
int current_dupl = 1;
int count = 0;
int choice = 1;
int sum;
for(int i = vec.size()-1; i >= 0; i++){
if(count < A || (current_dupl > 1 && count < B)) {
sum += vec[i];
if((i < (vec.size()-1)) && (vec[i] == vec[i-1])){
current_dupl++;
}
else {
choice += factor(current_dupl);
current_dupl = 1;
}
}
count++;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:15:21: error: conversion from 'std::vector<int>*' to non-scalar type 'std::vector<int>' requested
15 | vector<int> vec = new vector<int>(N);
| ^~~~~~~~~~~~~~~~~~
|
s377427648 | p03773 | C | #include <stdio.h>
int main(void){
int a,b;
scanf("%d%d",&a,&b);
if(a+b<24){
printf("%d",a+b);
}else{
printf("%d",a+b-24);
return 0;
} | main.c: In function 'main':
main.c:10:1: error: expected declaration or statement at end of input
10 | }
| ^
|
s738903458 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll A,B;
cin >> A >> B;
if(A+B==24){
cout << 0 << endl;
}
else if(A+B>=24){
cout << A+b-24 << endl;
}
else{
cout << A+B << endl;
}
}
| a.cc: In function 'int main()':
a.cc:13:17: error: 'b' was not declared in this scope
13 | cout << A+b-24 << endl;
| ^
|
s627813981 | p03773 | C++ | #include<bits/stddc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
cout<<(a+b)%24<<endl;
return 0;
} | a.cc:1:9: fatal error: bits/stddc++.h: No such file or directory
1 | #include<bits/stddc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s153198874 | p03773 | Java | import java.util.Scanner;
public class Main
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println((a+b)%24);
sc.close();
}
} | Main.java:3: error: '{' expected
public class Main
^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:12: error: class, interface, enum, or record expected
}
^
3 errors
|
s897308369 | p03773 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AtCoder.Abc
{
public class QuestionA
{
public static void Main(string[] args)
{
// 整数配列の入力
var inputLongArray = Console.ReadLine().Split(' ').Select(i => long.Parse(i)).ToArray();
var A = inputLongArray[0];
var B = inputLongArray[1];
var ANS = A + B;
if(ANS > 24) {
ANS -= 24;
}
Console.WriteLine(ANS);
}
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:7:18: error: expected '{' before '.' token
7 | namespace AtCoder.Abc
| ^
a.cc:7:18: error: expected unqualified-id before '.' token
|
s013926315 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
cout<<(a+b)%24<<Endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:26: error: 'Endl' was not declared in this scope
7 | cout<<(a+b)%24<<Endl;
| ^~~~
|
s046690920 | p03773 | C | #include <bits/stdc++.h>
#define rep(i,n) for(int64_t i=0;i < (int64_t)(n);i++)
using namespace std;
//////全探索したいときに開けよ////////
vector<vector<int>> fspattern;
vector<int> fspattern_draft;
int fspcnt = 0;
void setfspattern_core(int floor,int number,int degree){
if(floor==degree){
fspattern.at(fspcnt) = fspattern_draft;
fspcnt++;
}else{
rep(i,number){
fspattern_draft.at(floor) = i;
setfspattern_core(floor+1,number,degree);
}
}
}
void setfspattern(int number,int degree){
int64_t array_num = 1;
rep(i,degree){
array_num *= number;
}
fspattern = vector<vector<int>>(array_num,vector<int>(degree));
fspattern_draft = vector<int>(degree);
setfspattern_core(0,number,degree);
}
//////nCrのmodを求めたいときに開けよ/////////
//int64_t univMod = 1000000007;
//int64_t factnum = 100000
//vector<int64_t> modfact(factnum);
//vector<int64_t> modinvfact(factnum);
/*void setmodfact(){
for(int i=0;i<factnum;i++){
if(i == 0){
modfact.at(i) = 1;
}else{
modfact.at(i) = (modfact.at(i-1)*i)%univMod;
}
}
}
int64_t calcmodpower(int64_t a,int64_t n){
int64_t res = 1;
while(n != 0){
if(n & 1){
res = (res * a) % univMod;
}
a = (a*a) % univMod;
n = n >> 1;
}
return res;
}
int64_t calcinverse(int64_t n){
return calcmodpower(n,univMod-2);
}
void setmodinvfact(){
for(int i=0;i<factnum;i++){
if(i==0){
modinvfact.at(i) = 1;
}else{
modinvfact.at(i) = calcmodpower(modfact.at(i),univMod-2);
}
}
}
int64_t calcmodcomb(int64_t n,int64_t r){
return (((modfact.at(n)*modinvfact.at(r))%univMod)*modinvfact.at(n-r))%univMod;
}
int64_t calcmodpositive(int64_t n){
return (n + ((abs(n)+univMod-1)/univMod)*univMod)%univMod;
}
*/
/*
int64_t calcGCD(int64_t a,int64_t b){
int64_t p = a;
int64_t q = b;
int64_t c = a%b;
while(c != 0){
p = q;
q = c;
c = p%q;
}
return q;
}
*/
int main(){
int a,b;
cin >> a >> b;
cout << (a+b)%24 << endl;
}
| main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s633867755 | p03773 | Java | def coder(a,b):
ans = 0
if a + b < 24:
return a + b
else:
return a + b % 24
def main():
a , b = map(int, input().split())
print(coder(a , b))
if __name__ == '__main__':
main() | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
def coder(a,b):
^
(use --enable-preview to enable unnamed classes)
Main.java:1: error: <identifier> expected
def coder(a,b):
^
Main.java:1: error: <identifier> expected
def coder(a,b):
^
Main.java:1: error: ';' expected
def coder(a,b):
^
Main.java:3: error: class, interface, enum, or record expected
if a + b < 24:
^
Main.java:12: error: unclosed character literal
if __name__ == '__main__':
^
Main.java:12: error: unclosed character literal
if __name__ == '__main__':
^
7 errors
|
s756268799 | p03773 | C++ | #include <iostream>
#include <string>
int main() {
int a,b;
std::cin>>a>>b;
if(a+b>23){
cout >> a+b-23;
}else{
std::cout << a+b;
}
} | a.cc: In function 'int main()':
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout >> a+b-23;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s281210996 | p03773 | C++ | #include <iostream>
#include <string>
int main() {
int a,b;
std::cin>>a>>b;
if(a+b>23){
std::cout >> a+b-23;
}else{
std::cout << a+b;
}
} | a.cc: In function 'int main()':
a.cc:8:15: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | std::cout >> a+b-23;
| ~~~~~~~~~ ^~ ~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:8:15: note: candidate: 'operator>>(int, int)' (built-in)
8 | std::cout >> a+b-23;
| ~~~~~~~~~~^~~~~~~~~
a.cc:8:15: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | std::cout >> a+b-23;
| ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:8:10: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
8 | std::cout >> a+b-23;
| ~~~~~^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | std::cout >> a+b-23;
| ^~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | std::cout >> a+b-23;
| ^~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | std::cout >> a+b-23;
| ^~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | std::cout >> a+b-23;
| ^~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | std::cout >> a+b-23;
| ^~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:8:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | std::cout >> a+b-23;
| ^~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:8:22: required from here
8 | std::cout >> a+b-23;
| ^~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s686636700 | p03773 | C++ | #include <iostream>
#include <string>
int main() {
int a,b;
std::cin>>a>>b;
if(a+b>23){
cout >> a+b-23;
}else{
std::cout << a+b;
}
} | a.cc: In function 'int main()':
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout >> a+b-23;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s604417181 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
cout << (a+b)%24 << endl;
} | a.cc: In function 'int main()':
a.cc:8:22: error: no match for 'operator%' (operand types are 'std::__cxx11::basic_string<char>' and 'int')
8 | cout << (a+b)%24 << endl;
| ~~~~~^~~
| | |
| | int
| std::__cxx11::basic_string<char>
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
8 | cout << (a+b)%24 << endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
8 | cout << (a+b)%24 << endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:23: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
8 | cout << (a+b)%24 << endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
8 | cout << (a+b)%24 << endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:8:23: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
8 | cout << (a+b)%24 << endl;
| ^~
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:8:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
8 | cout << (a+b)%24 << endl;
| ^~
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:8:23: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
8 | cout << (a+b)%24 << endl;
| ^~
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:8:23: note: mismatched types 'const std::valarray<_Tp>' and 'int'
8 | cout << (a+b)%24 << endl;
| ^~
|
s859112449 | p03773 | C | #include<stdio.h>
int main() {
int a, b,s;
scanf("%d %d",&a,&b);
s = a + b;
if (s => 24) {
s = s - 24;
}
printf("%d",s);
} | main.c: In function 'main':
main.c:10:16: error: expected expression before '>' token
10 | if (s => 24) {
| ^
|
s893583357 | p03773 | C | #include<stdio.h>
int main() {
int a, b,s;
scanf("%d %d",&a,&b);
s = a + b;
if (s > =24) {
s = s - 24;
}
printf("%d",s);
} | main.c: In function 'main':
main.c:10:17: error: expected expression before '=' token
10 | if (s > =24) {
| ^
|
s529742932 | p03773 | C | #include<stdio.h>
int main() {
int a, b,s;
scanf_s("%d %d",&a,&b);
s = a + b;
if (a + b == 25) {
s =1;
}
printf("%d",s);
} | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d",&a,&b);
| ^~~~~~~
| scanf
|
s215249148 | p03773 | C++ | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int dx[4] = {-1, 0, 0, 1};
const int dy[4] = {0, -1, 1, 0};
// Self settings
// clang-format off
#define MAX_N 100000
#define REP(i, N) for (int i = 0; i < (int)(N); ++i)
#define SLN(i,N) (i == N-1 ? "\n" : " ")
ll fact(ll n) { ll res = 1; for(ll i=2;i<=n;++i) res = res * i; return res;}
ll nCr(ll n, ll r) {return (fact(n)/fact(n-r)*fact(r)) ;}
ll gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
const ll MOD = 1e9+7;
const ll INF = 1LL << 60;
const int inf = 1 << 30;
// clang-format on
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> A >> B;
cout << (A + B) % 24 << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:40:10: error: 'A' was not declared in this scope
40 | cin >> A >> B;
| ^
a.cc:40:15: error: 'B' was not declared in this scope
40 | cin >> A >> B;
| ^
|
s601069762 | p03773 | C++ | #include<iostream>
int main()
{
int a,b;
cin>>a>>b;
if(a+b>24)
{
a=a+b-24;
cout<<a<<endl;
}
else
{
a=a+b;
cout<<a<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a>>b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | cout<<a<<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:12:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
12 | cout<<a<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | cout<<a<<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:17:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
17 | cout<<a<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s649008853 | p03773 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
#include <cstdlib>
#include <cctype>
#include <ctype.h>
#include <math.h>
#define ll long long
char toupper(char c);
char toupper(char c)
{
return (c - 0x20);
}
using namespace std;
int main()
{
int a,b;
cin >> a>>b;
if(a+B<=24)
{
cout << a+b<<endl;
}
else
{
cout<< (a+b)-24 << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:23:8: error: 'B' was not declared in this scope
23 | if(a+B<=24)
| ^
|
s746017687 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a, b,;
cin >> a>>b;
cout << (a+b)%24 << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:12: error: expected unqualified-id before ';' token
4 | int a, b,;
| ^
|
s994806707 | p03773 | C | #include<stdio.h>
int main()
{
int A,B,c;
0<=A;
B<=23;
scanf("%d %d",&A,&B);
c=A+B;
if(c<=24)
printf("%d",c);
else(c>24)
printf("%d",c-24);
}
| main.c: In function 'main':
main.c:11:27: error: expected ';' before 'printf'
11 | else(c>24)
| ^
| ;
12 | printf("%d",c-24);
| ~~~~~~
|
s536647808 | p03773 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
using namespace std;
#define DEBUG 0
#define REP(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef pair<int,int> pint;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;
int main() {
ll n,m;
cin >> n >> m;
res = n + m;
res %= 24;
cout << res << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:21:5: error: 'res' was not declared in this scope
21 | res = n + m;
| ^~~
|
s275061914 | p03773 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a+b >=24) {
System.out.println(a+b-24);
} else if () {
} else {
System.out.println(a+b);
}
}
}
| Main.java:12: error: illegal start of expression
} else if () {
^
1 error
|
s678165104 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
cout << (a+B)%24 << endl;
}
| a.cc: In function 'int main()':
a.cc:7:14: error: 'B' was not declared in this scope
7 | cout << (a+B)%24 << endl;
| ^
|
s484566629 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
//input
int a,b,;
cin >> a >> b;
if(a+b > 24){
cout << a+b-24;
}else{
cout << a+b;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:13: error: expected unqualified-id before ';' token
6 | int a,b,;
| ^
|
s255239075 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout (A + B)% 24;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
9 | cout (A + B)% 24;
| ~~~~~^~~~~~~
|
s412761276 | p03773 | C++ | #include<iostream>
using namespace stdg;
int main(){
int a, b;
cin >> a >> b;
int ans;
if(a+b >= 24){
ans = (a + b) % 24;
}
else{
ans = a + b;
}
cout << ans;
return 0;
}
| a.cc:2:17: error: 'stdg' is not a namespace-name
2 | using namespace stdg;
| ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | cout << ans;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s363360011 | p03773 | C++ | #include<iostream>
using namespace stdg;
int main(){
int a, b;
cin >> a >> b;
int ans;
if(a+b > 24){
ans = (a + b) % 24;
}
else{
ans = a + b;
}
cout << ans;
return 0;
} | a.cc:2:17: error: 'stdg' is not a namespace-name
2 | using namespace stdg;
| ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | cout << ans;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s314020662 | p03773 | C | #include<stdio.h>
int day(c)
{
if(c => 24){
c -= 24;
return day(c);
}
else{
return c;
}
}
int main()
{
int a; scanf("%d", &a);
int b; scanf("%d", &b);
int c;
c = a + b;
printf("%d\n", day(c));
return 0;
} | main.c: In function 'day':
main.c:3:5: error: type of 'c' defaults to 'int' [-Wimplicit-int]
3 | int day(c)
| ^~~
main.c:5:11: error: expected expression before '>' token
5 | if(c => 24){
| ^
|
s672999144 | p03773 | C++ | A, B = map(int, input().split())
print((A+B)%24) | a.cc:1:1: error: 'A' does not name a type
1 | A, B = map(int, input().split())
| ^
|
s352313620 | p03773 | C++ | #include<bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cfloat>
using namespace std;
template<class T, class Compare = less<T> >
using MaxHeap = priority_queue<T, vector<T>, Compare>;
template<class T, class Compare = greater<T> >
using MinHeap = priority_queue<T, vector<T>, Compare>;
using llong = long long;
llong C[55][55];
void comb_table(int N){
for(int i=0;i<=N;++i){
for(int j=0;j<=i;++j){
if(j==0 || j==i){
C[i][j]=1LL;
}else{
C[i][j]=(C[i-1][j-1]+C[i-1][j]);
}
}
}
}
llong n, a, b;
llong v[55];
llong sum[55];
int main() {
comb_table(50);
cin >> n >> a >> b;
for (llong i = 1; i <= n; i++) {
cin >> v[i];
}
sort(v + 1, v + n + 1, greater<>());
for (llong i = 1; i <= n; i++) {
sum[i] = sum[i - 1] + v[i];
}
__float128 maxv = 0;
for (llong i = a; i <= b; i++) {
__float128 avg = (sum[i]) / ((__float128)i);
maxv = max(avg, maxv);
}
llong ans = 0 , last = -1;
for (llong i = a; i <= b; i++) {
__float128 avg = (__float128)sum[i] / (__float128)i;
if (maxv == avg) {
llong t = v[i];
llong N = 0;
llong K = 0;
assert(last == -1 || last == a[i]);
for (llong j = 1; j <= n; j++) {
if (v[j] == t) N++;
}
for (llong j = i; j > 0; j--) {
if (v[j] == t) K++;
}
ans += C[N][K];
}
}
printf("%.*lf\n", DBL_DIG, (double)maxv);
printf("%lld\n", ans);
return 0;
}
| In file included from /usr/include/c++/14/cassert:44,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106,
from a.cc:1:
a.cc: In function 'int main()':
a.cc:66:43: error: invalid types 'llong {aka long long int}[llong {aka long long int}]' for array subscript
66 | assert(last == -1 || last == a[i]);
| ^
|
s754070050 | p03773 | C++ | #include <vector>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << (A + B) % 24;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin >> A >> B;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <vector>
+++ |+#include <iostream>
2 |
a.cc:8:3: error: 'cout' was not declared in this scope
8 | cout << (A + B) % 24;
| ^~~~
a.cc:8:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s111833758 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<(a+b)%24<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:16: error: no match for 'operator%' (operand types are 'std::__cxx11::basic_string<char>' and 'int')
6 | cout<<(a+b)%24<<endl;
| ~~~~~^~~
| | |
| | int
| std::__cxx11::basic_string<char>
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
6 | cout<<(a+b)%24<<endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
6 | cout<<(a+b)%24<<endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
6 | cout<<(a+b)%24<<endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
6 | cout<<(a+b)%24<<endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
6 | cout<<(a+b)%24<<endl;
| ^~
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
6 | cout<<(a+b)%24<<endl;
| ^~
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
6 | cout<<(a+b)%24<<endl;
| ^~
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const std::valarray<_Tp>' and 'int'
6 | cout<<(a+b)%24<<endl;
| ^~
|
s701978669 | p03773 | C++ | a, b = map(int, input().split())
if a+b > 24:
print(a+b-24)
else:
print(a+b) | a.cc:1:1: error: 'a' does not name a type
1 | a, b = map(int, input().split())
| ^
|
s769249889 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string A, B;
cin >> A >> B;
if (A+B < 24){
cout << A+B << endl;
}
else {
cout << A+B - 24 << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:13: error: no match for 'operator<' (operand types are 'std::__cxx11::basic_string<char>' and 'int')
8 | if (A+B < 24){
| ~~~ ^ ~~
| | |
| | int
| std::__cxx11::basic_string<char>
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if (A+B < 24){
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::pair<_T1, _T2>'
8 | if (A+B < 24){
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if (A+B < 24){
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:8:15: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
8 | if (A+B < 24){
| ^~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substit |
s464015089 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;main(a){int b;cin>>a>>b;cout<<(a+b)%24<<endl;} | a.cc:2:25: error: expected constructor, destructor, or type conversion before '(' token
2 | using namespace std;main(a){int b;cin>>a>>b;cout<<(a+b)%24<<endl;}
| ^
|
s157181648 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
int C = A + B
if (C < 24) {
cout << C << endl;
}
if (C >= 24) {
cout << C - 24 << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
8 | if (C < 24) {
| ^~
|
s327529557 | p03773 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b
cin >> a >> b;
if(a+b>=24) cout << a+b-24 << endl;
else cout << a+b << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:5: error: expected initializer before 'cin'
5 | cin >> a >> b;
| ^~~
a.cc:6:10: error: 'b' was not declared in this scope
6 | if(a+b>=24) cout << a+b-24 << endl;
| ^
|
s229910924 | p03773 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<cstdlib>
#include<map>
#include<iomanip>
#include<sstream>
#include<vector>
#include<stack>
#include<math.h>
#include<queue>
#include<complex>
using namespace std;
long long int solve(long long int n){
if(n==2){return 3;}
else if(n==4||n==6||n==9||n==11){return 2;}
else{return 1;}
}
int main() {
long long int n=0,m,a,b,c,d,e;
long double z,w;
string str,str2,str3;
char ch;
long long int x[130]={};
cout << fixed << setprecision(10);
cin>>a<<b;
cout<<(a+b)%24;
cout<<endl;
}
| a.cc: In function 'int main()':
a.cc:28:15: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'long long int')
28 | cin>>a<<b;
| ~~~~~~^~~
| | |
| | long long int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:28:15: note: candidate: 'operator<<(int, long long int)' (built-in)
28 | cin>>a<<b;
| ~~~~~~^~~
a.cc:28:15: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
28 | cin>>a<<b;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:28:12: note: cannot convert 'std::cin.std::basic_istream<char>::operator>>(a)' (type 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'}) to type 'std::byte'
28 | cin>>a<<b;
| ~~~^~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
28 | cin>>a<<b;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed:
a.cc:28:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
/usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = long long int]':
a.cc:28:10: required from here
28 | cin>>a<<b;
| ^
/usr/include/c++/14/ostream:810:5: error: no type named |
s752135231 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout (a + b) % 24 << endl;
} | a.cc: In function 'int main()':
a.cc:7:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
7 | cout (a + b) % 24 << endl;
| ~~~~~^~~~~~~
|
s007514299 | p03773 | C++ | #include<bits/stdc++.h>
using namesapce std;
int main(){
int x,y; cin>>x>>y;
cout<<(x+y)%24;
}
| a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
3 | using namesapce std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | int x,y; cin>>x>>y;
| ^~~
| 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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout<<(x+y)%24;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s489402310 | p03773 | C++ | #include<biys/stdc++.h>
using namesapce std;
int main(){
int x,y; cin>>x>>y;
cout<<(x+y)%24;
}
| a.cc:1:9: fatal error: biys/stdc++.h: No such file or directory
1 | #include<biys/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s310914036 | p03773 | C++ | #include<biys/stdc++.h>
using namesapce std;
int main(){
ll x,y; cin>>x>>y;
cout<<(x+y)%24;
}
| a.cc:1:9: fatal error: biys/stdc++.h: No such file or directory
1 | #include<biys/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s663375636 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin >> a >> b;
int ans=a+b;
if(ans>24)
ana=ans-24;
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:9:5: error: 'ana' was not declared in this scope; did you mean 'ans'?
9 | ana=ans-24;
| ^~~
| ans
|
s968041837 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
int ans = a + b;
if(ans => 24) cout << ans - 24 << endl;
else cout << ans << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:11: error: expected primary-expression before '>' token
8 | if(ans => 24) cout << ans - 24 << endl;
| ^
|
s741694641 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
int ans = a + b;
if(a => 24) cout << ans - 24 << endl;
else cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before '>' token
8 | if(a => 24) cout << ans - 24 << endl;
| ^
|
s928163813 | p03773 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin A >> B;
cout << (A+B)/24 << endl;
} | a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'A'
6 | cin A >> B;
| ^~
| ;
|
s548584814 | p03773 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b)%24<<endl;å
} | a.cc: In function 'int main()':
a.cc:10:26: error: '\U000000e5' was not declared in this scope
10 | cout<<(a+b)%24<<endl;å
| ^
|
s894816295 | p03773 | C++ | #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
int A,B;
scanf("%d %d",&A,&B);
if((B<=12)&&(A<24))
{
int cnt=0;
cnt=A+B;
if(cnt>24)
cnt-=24;}
printf("%d",cnt);
} | a.cc: In function 'int main()':
a.cc:16:21: error: 'cnt' was not declared in this scope; did you mean 'int'?
16 | printf("%d",cnt);
| ^~~
| int
|
s482122342 | p03773 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
int A, B, R;
scanf("%d%d", &A, &B);
R=A+B;
if(R>=23){
R=24-24-1+B;
}
printf("%d",R );
return 0;
}
#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
int A, B, R;
scanf("%d%d", &A, &B);
R=A+B;
if(R>=23){
R=24-24-1+B;
}
printf("%d",R );
return 0;
}
| a.cc:20:5: error: redefinition of 'int main()'
20 | int main(){
| ^~~~
a.cc:5:5: note: 'int main()' previously defined here
5 | int main(){
| ^~~~
|
s524738922 | p03773 | C++ | erview
Problem
Status
Rank (263:51:38)
3 Comments
Previous12345…Next
Username
Prob
Result
Time
(ms) Mem
(MB) Lang
Submit Time
MustafaSaad
R
Wrong Answer
C++
1 hr ago
MustafaSaad
R
Wrong Answer
C++
1 hr ago
MustafaSaad
R
Wrong Answer
C++
1 hr ago
MustafaSaad
R
Wrong Answer
C++
2 hr ago
MustafaSaad
R
Wrong Answer
C++
2 hr ago
MustafaSaad
R
Wrong Answer
C++
2 hr ago
MustafaSaad
R
Wrong Answer
C++
2 hr ago
MustafaSaad
R
Compilation Error
C++
2 hr ago
MustafaSaad
L
Runtime Error
C++
3 hr ago
MustafaSaad
L
Runtime Error
C++
3 hr ago
MustafaSaad
L
Runtime Error
C++
1 days ago
MustafaSaad
F
Accepted
7 0.3
C++
1 days ago
MustafaSaad
F
Wrong Answer
C++
2 days ago
MustafaSaad
O
Accepted
1 0.3
C++
2 days ago
MustafaSaad
N
Accepted
1 0.3
C++
2 days ago
MustafaSaad
M
Accepted
1 0.3
C++
2 days ago
MustafaSaad
M
Compilation Error
C++
2 days ago
MustafaSaad
M
Wrong Answer
C++
2 days ago
MustafaSaad
J
Accepted
7 0.6
C++
2 days ago
MustafaSaad
M
Wrong Answer
C++
2 days ago
All Copyright Reserved © 2010-2019 Xu Han
Server Time: 2019-07-23 16:21:40 UTC+2
#20705576 | MustafaSaad's solution for [Problem R]
Status
Wrong Answer
Length
510
Lang
C++14 (GCC 5.3.0)
Submitted
2019-07-23 15:09:42
Shared
6.0 / 10.0
Select Code
#include<bits/stdc++.h>
using namespace std;
int main(){
int a , b;
scanf("%d %d",&a,&b);
if(0<=a&&b<=23)
{
if(a+b == 24)
{
printf("00.00") ;
}else {
int res=(a+b) -24 ;
printf("%d", res);
}
}
return 0 ;
} | a.cc:6:1: error: extended character … is not valid in an identifier
6 | Previous12345…Next
| ^
a.cc:120:24: error: extended character © is not valid in an identifier
120 | All Copyright Reserved © 2010-2019 Xu Han
| ^
a.cc:123:11: error: "|" is not a valid filename
123 | #20705576 | MustafaSaad's solution for [Problem R]
| ^
a.cc:123:24: warning: missing terminating ' character
123 | #20705576 | MustafaSaad's solution for [Problem R]
| ^
a.cc:129:12: error: too many decimal points in number
129 | C++14 (GCC 5.3.0)
| ^~~~~
a.cc:131:15: error: invalid digit "9" in octal constant
131 | 2019-07-23 15:09:42
| ^~
a.cc:1:1: error: 'erview' does not name a type
1 | erview
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:136:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/cstddef:50,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_tempbuf.h:59,
from /usr/include/c++/14/bits/stl_algo.h:69,
from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
|
s723654735 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a , b;
scanf("%d %d",&a,&b);
if(0<= a+b <=23)
{
int res=a+b;
printf("%d", res);
}else if(a+b == 24)
{
print("00.00") ;
}else{
int res=b-1;
printf("%d", res);
}
return 0 ;
} | a.cc: In function 'int main()':
a.cc:16:13: error: 'print' was not declared in this scope; did you mean 'rint'?
16 | print("00.00") ;
| ^~~~~
| rint
|
s870196169 | p03773 | C++ | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
#include <iomanip>
#include <bitset>
#include <string>
using namespace std;
//cout << << endl;
typedef long long int ll;
typedef long double ld;
int main(){
ll a,b;
cin >> a >> b;
if (a+b>=24){
a-=24;
}
out << a+b << endl;
}
| a.cc: In function 'int main()':
a.cc:22:5: error: 'out' was not declared in this scope
22 | out << a+b << endl;
| ^~~
|
s193406351 | p03773 | C | #include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int a,b,x;
cin>>a>>b;
x=a+b;
if(x>23)
cout<<x-24;
else
cout<<x;
}
| main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s473796440 | p03773 | C | #include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int a,b,x;
cin>>a>>b;
x=a+b;
if(x>24)
cout<<x-24;
else
cout<<x;
}
| main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s451045700 | p03773 | C++ | v#include <iostream>
using namespace std;
int main()
{
int a,b,rem;
cin >>a>>b;
cout<<(a+b)%24;
return 0;
}
| a.cc:1:2: error: stray '#' in program
1 | v#include <iostream>
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include <iostream>
| ^
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
8 | cin >>a>>b;
| ^~~
a.cc:10:5: error: 'cout' was not declared in this scope
10 | cout<<(a+b)%24;
| ^~~~
|
s196964791 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int main()
{
int a,b;
cin>>a>>b;
cout<<(a+b)%24<<endl;
} | a.cc: In function 'int main()':
a.cc:4:17: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
4 | int main()
| ^~
a.cc:4:17: note: remove parentheses to default-initialize a variable
4 | int main()
| ^~
| --
a.cc:4:17: note: or replace parentheses with braces to value-initialize a variable
a.cc:5:1: error: a function-definition is not allowed here before '{' token
5 | {
| ^
a.cc:9:2: error: expected '}' at end of input
9 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s756006730 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int main()
{
int a,b;
cin>>a>>b;
cout<<(a+b)%24;
} | a.cc: In function 'int main()':
a.cc:4:17: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
4 | int main()
| ^~
a.cc:4:17: note: remove parentheses to default-initialize a variable
4 | int main()
| ^~
| --
a.cc:4:17: note: or replace parentheses with braces to value-initialize a variable
a.cc:5:1: error: a function-definition is not allowed here before '{' token
5 | {
| ^
a.cc:9:2: error: expected '}' at end of input
9 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s748301412 | p03773 | C++ | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder.
In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock".
The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | a.cc:3:24: warning: missing terminating ' character
3 | The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time.
| ^
a.cc:3:24: error: missing terminating ' character
3 | The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time.
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'Dolphin' does not name a type
1 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder.
| ^~~~~~~
|
s915945033 | p03773 | C++ | include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b;
if(0<=a,b<=23){
c=a+b;
if(c>=24){
c%=24;
}
cout<<c;
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | cin>>a>>b;
| ^~~
a.cc:11:17: error: 'cout' was not declared in this scope
11 | cout<<c;
| ^~~~
|
s458644260 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A>=1&&A<=23&&B>=1&&B<=23){
cout<<A+B<<endl;
if(x>24)
cout<<B-1<<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:20: error: 'x' was not declared in this scope
8 | if(x>24)
| ^
|
s079678374 | p03773 | C++ | int main()
{;
int time;
int A,B;
cin>>A>>B;
time =A+B;
if(time>24)
{
time=time-24;
cout<<time;
}
else
if(12<time<=24)
cout <<time;
else
if(time<=12)
{
time=24-time;
cout<<time;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin>>A>>B;
| ^~~
a.cc:10:5: error: 'cout' was not declared in this scope
10 | cout<<time;
| ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope
15 | cout <<time;
| ^~~~
a.cc:21:9: error: 'cout' was not declared in this scope
21 | cout<<time;
| ^~~~
|
s429116334 | p03773 | C++ | #include<iostream>
using namespace std;
int main()
{;
int time;
int A,B
cin>>A>>B;
time =A+B;
if(time>24)
{
time-=24;
cout<<time;
}
else
if(12<time<=24)
cout <<time;
else
if(time<=12)
{
time=24-time;
cout<<time;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'cin'
7 | cin>>A>>B;
| ^~~
a.cc:8:9: error: 'B' was not declared in this scope
8 | time =A+B;
| ^
|
s530112802 | p03773 | C++ | using namespace std;
int main(){
int a,b,time;
cin>>a>>b;
if((a+b)<=24){
cout<<a+b;
}
if((a+b)>=24){
cout<<24-(48-(a+b));
}
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | cin>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:7:17: error: 'cout' was not declared in this scope
7 | cout<<a+b;
| ^~~~
a.cc:7:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:17: error: 'cout' was not declared in this scope
11 | cout<<24-(48-(a+b));
| ^~~~
a.cc:11:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s713974475 | p03773 | C++ | #include<iostream>
using namespace std;
int main(){
int x,y,z;
cin>>x>>y;
z=x+y;l
if(z>24)
cout<<z-24;
else
cout<<z;
} | a.cc: In function 'int main()':
a.cc:6:15: error: 'l' was not declared in this scope
6 | z=x+y;l
| ^
a.cc:9:9: error: 'else' without a previous 'if'
9 | else
| ^~~~
|
s156704773 | p03773 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int s, e,t;
scanf_s("%d %d", &s, &e);
t = s + e;
if (t > 24)
t = t-24;
printf_s("%d", t);
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
6 | scanf_s("%d %d", &s, &e);
| ^~~~~~~
| scanf
a.cc:11:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
11 | printf_s("%d", t);
| ^~~~~~~~
| printf
|
s769827346 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int a;
int b;
cin >> a >> b;
if (a + b > 24) {
cout << a + b - 24 << endl;
}
else if (a + b =< 24) {
cout << a + b << endl;
}
}
| a.cc: In function 'int main()':
a.cc:13:19: error: expected primary-expression before '<' token
13 | else if (a + b =< 24) {
| ^
|
s480593368 | p03773 | C++ | include<bits/stdc++.h>
using namespace std;
int main() {
int a;
int b;
cin >> a >> b;
if (a + b > 24) {
cout << a + b - 24 << endl;
}
else if (a + b < 24) {
cout << a + b << endl;
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
8 | cin >> a >> b;
| ^~~
a.cc:11:5: error: 'cout' was not declared in this scope
11 | cout << a + b - 24 << endl;
| ^~~~
a.cc:11:27: error: 'endl' was not declared in this scope
11 | cout << a + b - 24 << endl;
| ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
14 | cout << a + b << endl;
| ^~~~
a.cc:14:22: error: 'endl' was not declared in this scope
14 | cout << a + b << endl;
| ^~~~
|
s502878827 | p03773 | Java | import java.util.*;
public class At710 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int A = s.nextInt();
int B = s.nextInt();
int ans = A + B;
if (0 <= ans && ans <= 24) {
System.out.print(ans);
}
if (ans > 24) {
System.out.print(ans - 24);
}
if (ans < 0) {
ans = ans * -1;
System.out.print(ans);
}
}
} | Main.java:3: error: class At710 is public, should be declared in a file named At710.java
public class At710 {
^
1 error
|
s830425280 | p03773 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c
cin>>a>>b;
c=a+b;
if(c<24)
cout<<c<<endl;
else
cout<<c-24<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
6 | cin>>a>>b;
| ^~~
a.cc:7:3: error: 'c' was not declared in this scope
7 | c=a+b;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.