submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s724681342
p03657
C
#include<stdio.h> int main() { int C,A,B; scanf("%d%d",&A,&B); C=A+B; if(C%3==0){ printf("Possible\n"); } else{ pritnf("Impossible\n"); } return 0; }
main.c: In function 'main': main.c:11:9: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration] 11 | pritnf("Impossible\n"); | ^~~~~~ | printf
s165571067
p03657
C
#include<stdio.h> int main() { int C,A,B; scanf("%d%d",&A,&B); C=(A+B); if(C%3==0){ printf("Possible\n"); } else{ pritnf("Impossible\n"); } return 0; }
main.c: In function 'main': main.c:11:9: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration] 11 | pritnf("Impossible\n"); | ^~~~~~ | printf
s987222694
p03657
C++
A, B = map(int, input().split()) if A%3 == 0 or B%3 == 0 or (A+B)%3 == 0: print("Possible") else: print("Impossible")
a.cc:1:1: error: 'A' does not name a type 1 | A, B = map(int, input().split()) | ^
s446623694
p03657
C++
#include<iostream> using namespace std; int main(){ int a, b; cin >> a >> b; if(a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0){ cout << "Possible" }else{ cout << "Impossible" } return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: expected ';' before '}' token 8 | cout << "Possible" | ^ | ; 9 | }else{ | ~ a.cc:10:29: error: expected ';' before '}' token 10 | cout << "Impossible" | ^ | ; 11 | } | ~
s194322009
p03657
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; if(!(a%3==0 || b%3==0 || (a+b)%3==0)) cout<<"Imp" else cout<<"P"; cout<<"ossible"; }
a.cc: In function 'int main()': a.cc:6:58: error: expected ';' before 'else' 6 | if(!(a%3==0 || b%3==0 || (a+b)%3==0)) cout<<"Imp" | ^ | ; 7 | else cout<<"P"; | ~~~~
s087973699
p03657
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); System.out.println("ABC" + N); }
Main.java:10: error: reached end of file while parsing } ^ 1 error
s194483649
p03657
C++
#include <bits/stdc++.h> #define rep(i,m,n) for(int i=m; i<n; i++) #define co(n) cout << n << endl using namespace std; int main(){ int a,b; cin>>a>>b; if(a%3==0 || b%3==0 || (a+b)%3==0) co("possible"); else coO("impossible"); return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: 'coO' was not declared in this scope; did you mean 'cos'? 9 | else coO("impossible"); | ^~~ | cos
s389146462
p03657
C++
#include <bits/stdc++.h> #define rep(i,m,n) for(int i=m; i<n; i++) #define co(n) cout << n << endl using namespace std; int main(){ int a,b; cin>>a>>b; if(a%3=0 || b%3==0 || (a+b)%3==0) co("possible"); else co("impossible"); return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: lvalue required as left operand of assignment 8 | if(a%3=0 || b%3==0 || (a+b)%3==0) co("possible"); | ~^~
s576652543
p03657
C++
#include <bits/stdc++.h> #define rep(i,m,n) for(int i=m; i<n; i++) #define co(n) cout << n << endl using namespace std; int main(){ int a,b; cin>>a>>b; if(a%3=0 || b%3==0 || (a+b)%3==0) co("possible"); else coO("impossible"); return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: lvalue required as left operand of assignment 8 | if(a%3=0 || b%3==0 || (a+b)%3==0) co("possible"); | ~^~ a.cc:9:8: error: 'coO' was not declared in this scope; did you mean 'cos'? 9 | else coO("impossible"); | ^~~ | cos
s590357661
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; if(A+B == 2) { cout << "Impossible"; return 0; } else if(A%3 == 0) { cout << "Possible"; return 0; } else if(B%3 == 0) { cout << "Possible"; return 0; } else if((A+B)%3 == 0) { cout << "Possible"; return 0; } else { cout << "Impossible"; return 0; }
a.cc: In function 'int main()': a.cc:27:2: error: expected '}' at end of input 27 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s227905362
p03657
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a > b; if(a%3==0 || b%3==0 || (a+b)%3==0) cout << "Possible" << endl; else cout << "Impossible" << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:12: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 5 | cin >> a > b; | ~~~~~~~~ ^ ~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:5:12: note: candidate: 'operator>(int, int)' (built-in) 5 | cin >> a > b; | ~~~~~~~~~^~~ a.cc:5:12: 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:1: /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:5:14: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | 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:5:14: 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>' 5 | 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:5:14: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | 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:5:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 5 | 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:5:14: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | 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:5:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 5 | 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:5:14: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | 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:5:14: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 5 | 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:5:14: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 5 | 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:5:14: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 5 | 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:5:14: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 5 | 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:5:14: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 5 | 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:5:14: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 5 | 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:5:14: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 5 | 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:5:14: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 5 | 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<_CharT, _Traits, _Allocator>&)' 3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>
s103271310
p03657
C++
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() using namespace std; typedef long long ll; typedef long double ld; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int a,b; cin >> a >> b; if(a%3==0 || b%3==0 || (a+b)%3==0) put("Possible"); else puts("Impossible"); return 0; }
a.cc: In function 'int main()': a.cc:16:38: error: 'put' was not declared in this scope; did you mean 'putw'? 16 | if(a%3==0 || b%3==0 || (a+b)%3==0) put("Possible"); | ^~~ | putw
s675633989
p03657
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ int a,b; cin >> a >> b;[ if(a%3==0||b%3==0||(a+b)%3==0)cout<<"Possible"<<endl; else{cout<<"Impossible"<<endl;} return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: expected identifier before 'if' 8 | if(a%3==0||b%3==0||(a+b)%3==0)cout<<"Possible"<<endl; | ^~ a.cc:8:55: error: expected ']' before ';' token 8 | if(a%3==0||b%3==0||(a+b)%3==0)cout<<"Possible"<<endl; | ^ | ] a.cc: In lambda function: a.cc:8:55: error: expected '{' before ';' token a.cc: In function 'int main()': a.cc:9:5: error: 'else' without a previous 'if' 9 | else{cout<<"Impossible"<<endl;} | ^~~~
s142369066
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; string k = "Impossible"; if(a % 3 == 0||b % 3 == 0||(a + b) % == 0) { k = "Possible"; } cout << k << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:46: error: expected primary-expression before '==' token 8 | if(a % 3 == 0||b % 3 == 0||(a + b) % == 0) | ^~
s148401435
p03657
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); int c=1/(a+b); System.out.println(((a>2)?"Possible":"Impossible"); } }
Main.java:8: error: ')' or ',' expected System.out.println(((a>2)?"Possible":"Impossible"); ^ 1 error
s108172618
p03657
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); System.out.println((sc.nextInt()+sc.nextInt()>2?"Possible":"Impossible"); } }
Main.java:5: error: ')' or ',' expected System.out.println((sc.nextInt()+sc.nextInt()>2?"Possible":"Impossible"); ^ 1 error
s834912958
p03657
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() #define pb push_back #define pf push_front #define lb lower_bound #define ub upper_bound typedef long long ll; const int INF = 100000000; const long INF64 = 1000000000000000ll; const ll MOD = 1000000007ll; int main(){ int a,b; std::cin >> a>>b; if(a%3==0||b%3==0||a+b)%3==0)std::cout << "Possible" << std::endl; else std::cout << "Impossible" << std::endl; }
a.cc: In function 'int main()': a.cc:16:32: error: expected primary-expression before '%' token 16 | if(a%3==0||b%3==0||a+b)%3==0)std::cout << "Possible" << std::endl; | ^
s782159310
p03657
C++
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <iomanip> #include <map> #include <cstdlib> using namespace std; int main() { int a, b; cin >> a >> b; cout <<(a%3==0||b%3==0||(a+b)==0?"Possible ":"Impossible" ) << endl; return 0; }
a.cc:13:38: warning: missing terminating " character 13 | cout <<(a%3==0||b%3==0||(a+b)==0?"Possible | ^ a.cc:13:38: error: missing terminating " character 13 | cout <<(a%3==0||b%3==0||(a+b)==0?"Possible | ^~~~~~~~~ a.cc:14:14: warning: missing terminating " character 14 | ":"Impossible" | ^ a.cc:14:14: error: missing terminating " character a.cc: In function 'int main()': a.cc:14:1: error: unable to find string literal operator 'operator""Impossible' with 'const char [2]', 'long unsigned int' arguments 14 | ":"Impossible" | ^~~~~~~~~~~~~ a.cc:14:14: error: expected ':' before ')' token 14 | ":"Impossible" | ^ | : 15 | ) << endl; | ~ a.cc:15:1: error: expected primary-expression before ')' token 15 | ) << endl; | ^
s864146713
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; string c = "Impossible" cin >> a >> b; if(a%3==0||b%3==0||(a+b)%3==0) c = "Possible"; cout << c << endl; }
a.cc: In function 'int main()': a.cc:7:3: error: expected ',' or ';' before 'cin' 7 | cin >> a >> b; | ^~~
s549284675
p03657
C++
#include <bits/stdc++.h> using namespace std; int main (){ int a,b,ab; cin >> a >> b; ab = a+b; if(a%3 == 0|| b % 3 == 0 || ab % 3 == 0 && ab =! 0){ cout << "Possible" << endl; } else cout << "Impossible" << endl; }
a.cc: In function 'int main()': a.cc:9:26: error: lvalue required as left operand of assignment 9 | if(a%3 == 0|| b % 3 == 0 || ab % 3 == 0 && ab =! 0){ | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
s621742252
p03657
C++
#include <bits/stdc++.h> using namespace std; int main (){ int a,b,ab; cin >> a >> b; ab == a+b; if(a%3 == 0|| b % 3 == 0 || ab % 3 == 0 && ab =! 0){ cout << "Possible" << endl; } else cout << "Impossible" << endl; }
a.cc: In function 'int main()': a.cc:9:26: error: lvalue required as left operand of assignment 9 | if(a%3 == 0|| b % 3 == 0 || ab % 3 == 0 && ab =! 0){ | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
s285165776
p03657
C++
#include <algorithm> #include <bitset> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> #define ff first #define ss second #define ll long long #define vi vector<int> #define vii vector<vi> #define vs vector<string> #define vss vector<vs> #define pii pair<int, int> #define all(x) x.begin(), x.end() #define rep(i, a, n) for (int i = (a); i < (n); ++i) #define repr(i, a, n) for (int i = (n); i >= (a); --i) using namespace std; const int INF(1 << 30); const ll LLINF(1LL << 55LL); const int pi = 3.1415926536; const int MOD = 1000000007; const int MAX = 510000; void Main() { int a, b; cin>>a>>b; if ((a + b) / 3 0) puts("Possible"); else puts("Inpossible"); } int main() { std::cin.tie(nullptr); // 標準入出力高速化 std::ios_base::sync_with_stdio(false); // SとS++の入出力出力を非同期 std::cout << std::fixed << std::setprecision(15); // 小数を10進数表示 Main(); }
a.cc: In function 'void Main()': a.cc:34:18: error: expected ')' before numeric constant 34 | if ((a + b) / 3 0) | ~ ^ ~ | )
s202849623
p03657
C
include <stdio.h> int main(void){ int a,b; scanf("%d %d",&a,&b); if((a+b)%3==0||a%3==0||b%3==0){ printf("Possible"); } else{ printf("Impossible"); } return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s512904612
p03657
C
nclude <stdio.h> int main(void){ int a,b; scanf("%d %d",&a,&b); if((a+b)%3==0||a%3==0||b%3==0){printf("Possible");} else{printf("Impossible");} }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | nclude <stdio.h> | ^
s256094588
p03657
C
#include <stdio.h> int main(void){ int a,b; scanf("%d %d",&a,&b); if((a+b)%3==0){ printf("Possible"); } else{ printf("Impossible"); } retuern 0; }
main.c: In function 'main': main.c:13:2: error: 'retuern' undeclared (first use in this function) 13 | retuern 0; | ^~~~~~~ main.c:13:2: note: each undeclared identifier is reported only once for each function it appears in main.c:13:9: error: expected ';' before numeric constant 13 | retuern 0; | ^~ | ;
s054547402
p03657
C
#include <stdio.h> int main(void){ int a,b; scanf("%d %d",&a,&b); if((a+b)%3==0){ printf("Possible"); } else{ printf("Impossible"); } retuern 0; }
main.c: In function 'main': main.c:13:2: error: 'retuern' undeclared (first use in this function) 13 | retuern 0; | ^~~~~~~ main.c:13:2: note: each undeclared identifier is reported only once for each function it appears in main.c:13:9: error: expected ';' before numeric constant 13 | retuern 0; | ^~ | ;
s236289583
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if(a%3!=0&&b%3!=&&(a+b)%3!=0){ cout<<"Impossible"<<endl; } else{ cout<<"Possible"<<endl; } }
a.cc: In function 'int main()': a.cc:9:21: error: expected identifier before '(' token 9 | if(a%3!=0&&b%3!=&&(a+b)%3!=0){ | ^ a.cc:9:21: error: expected ')' before '(' token 9 | if(a%3!=0&&b%3!=&&(a+b)%3!=0){ | ~ ^ | )
s379671274
p03657
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(); int c=a+b; if(a%3==0 || b%3==0 ||c%3==0){ System.out.println("Possible"); }else{ System.out.println("Impossible"); } 4 sc.close(); } }
Main.java:15: error: not a statement 4 ^ Main.java:15: error: ';' expected 4 ^ 2 errors
s393399800
p03657
C++
#include <cstdio> int main() { int a, b; scanf("%d %d", &a, &b); puts(a % 3 == 0 || b % 3 == 0 || (a + b) % == 0 ? "Possible" : "Impossible"); return 0; }
a.cc: In function 'int main()': a.cc:7:46: error: expected primary-expression before '==' token 7 | puts(a % 3 == 0 || b % 3 == 0 || (a + b) % == 0 ? "Possible" : "Impossible"); | ^~
s317150507
p03657
C
#include <stdio.h> int main (void) { int a,b,flag=0; fgets(str,sizeof(str),stdin); sscanf(str,"%d %d",&a,&b); if(a%3 == 0) { flag++; } if(b%3 == 0) { flag++; } if((a+b)%3 == 0) { flag++; } if(flag > 0) { puts("Possible"); }else { puts("Impossible"); } return 0; }
main.c: In function 'main': main.c:8:15: error: 'str' undeclared (first use in this function) 8 | fgets(str,sizeof(str),stdin); | ^~~ main.c:8:15: note: each undeclared identifier is reported only once for each function it appears in
s525554390
p03657
C
#include <iostream> #include <fstream> using namespace std; int main(void) { int a,b; cin>>a>>b; if(a%3==0||b%3==0||(a+b)%3==0) cout<<"Possible"; else cout<<"Impossible"; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s419400594
p03657
C++
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = (int)(a); i <= (int)(n); ++i) #define rrep(i, a, n) for (int i = (int)(a); i >= (int)(n); --i) #define debug(x) cerr << #x << " = " << x << "\n" #define debugv(x) \ rep(f, 0, (x.size() - 1)) cerr << x[f] << (f == (x.size() - 1) ? "\n" : " ") #define all(x) x.begin(), x.end() #define int long long using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; const int MX = 1e5 + 5, INF = 5 << 28, MOD = 1e9 + 7; int N, M, K; vi A, B; string S, T; void input() { int x, y, z; cin >> N >> M; ; } void solve() { int s = A + B; if (s % 3 == 0) cout << "Possible"; else cout << "Impossible"; ; ; } signed main() { input(); solve(); return 0; }
a.cc: In function 'void solve()': a.cc:24:13: error: no match for 'operator+' (operand types are 'vi' {aka 'std::vector<long long int>'} and 'vi' {aka 'std::vector<long long int>'}) 24 | int s = A + B; | ~ ^ ~ | | | | | vector<[...]> | vector<[...]> In file included from /usr/include/c++/14/bits/stl_algobase.h:67, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)' 627 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:627:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'const std::reverse_iterator<_Iterator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)' 1798 | operator+(typename move_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1798:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'const std::move_iterator<_IteratorL>' 24 | int s = A + B; | ^ In file included 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/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3598 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3598:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3616 | operator+(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3616:5: note: template argument deduction/substitution failed: a.cc:24:15: note: mismatched types 'const _CharT*' and 'std::vector<long long int>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3635 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3635:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3652 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3652:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)' 3670 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3670:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3682 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3682:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)' 3689 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3689:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)' 3696 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3696:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)' 3719 | operator+(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3719:5: note: template argument deduction/substitution failed: a.cc:24:15: note: mismatched types 'const _CharT*' and 'std::vector<long long int>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)' 3726 | operator+(_CharT __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3726:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3733:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)' 3733 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3733:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ /usr/include/c++/14/bits/basic_string.h:3740:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)' 3740 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3740:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | int s = A + B; | ^ In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/complex:340:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator+(const complex<_Tp>&, const complex<_Tp>&)' 340 | operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:340:5: note: template argument deduction/substitution failed: a.cc:24:15: note: 'vi' {aka 'std::vector<long long int>'} is
s769480781
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; if(a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0){ cout << "Possible"; } else{ cout << "Impossible" } return 0; }
a.cc: In function 'int main()': a.cc:12:29: error: expected ';' before '}' token 12 | cout << "Impossible" | ^ | ; 13 | } | ~
s239819161
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; if ( (A + B) % 0){ cout << "Possible" << endl; } else { cout << "Inpossible" << endl; } }
a.cc:10:4: error: extended character   is not valid in an identifier 10 | else { | ^ a.cc: In function 'int main()': a.cc:7:17: warning: division by zero [-Wdiv-by-zero] 7 | if ( (A + B) % 0){ | ~~~~~~~~^~~ a.cc:10:4: error: 'else\U00003000' was not declared in this scope 10 | else { | ^~~~~~
s594798382
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; if ( (A + B) % 0){ cout << "Possible" << endl; } else if{ cout << "Inpossible" << endl; } }
a.cc: In function 'int main()': a.cc:7:17: warning: division by zero [-Wdiv-by-zero] 7 | if ( (A + B) % 0){ | ~~~~~~~~^~~ a.cc:10:11: error: expected '(' before '{' token 10 | else if{ | ^ | (
s199499347
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int A; cin >> A; int B; cin >> B; if((A+B)%3==0) cout << "Possible" << endl; else if(A%3==0) cout << "Possible" << endl; else if(B%3==0) cout << "Possible" << endl; else if cout<<"Impossible" << endl; }
a.cc: In function 'int main()': a.cc:15:13: error: expected '(' before 'cout' 15 | else if cout<<"Impossible" << endl; | ^~~~ | (
s672994760
p03657
C
#include<stdio.h> int main(void){ int a,b,c; scanf("%d",&a); scanf("%d",&b); if((a+b)/3 %= 0){ c = (a+b)/3 }else{ printf("Impossible"); } return 0; }
main.c: In function 'main': main.c:6:16: error: lvalue required as left operand of assignment 6 | if((a+b)/3 %= 0){ | ^~ main.c:7:20: error: expected ';' before '}' token 7 | c = (a+b)/3 | ^ | ; 8 | }else{ | ~
s477795417
p03657
C++
#include<iostream> using namespace std; int main(void){ int a,b; if((a%3==0)||(b%3==0)||((a+b)%3==0)cout << "Possible" << endl; else cout << "Impossible" << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:40: error: expected ';' before 'cout' 7 | if((a%3==0)||(b%3==0)||((a+b)%3==0)cout << "Possible" << endl; | ^~~~ | ; a.cc:8:5: error: expected primary-expression before 'else' 8 | else cout << "Impossible" << endl; | ^~~~ a.cc:7:67: error: expected ')' before 'else' 7 | if((a%3==0)||(b%3==0)||((a+b)%3==0)cout << "Possible" << endl; | ~ ^ | ) 8 | else cout << "Impossible" << endl; | ~~~~
s440534878
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A, B; cin >> A >> B; if ( A % 3 == 0 || B % 3 == 0 || (A + B) % == 0){ cout << "Possible" << endl; } else { cout << "Impossible" << endl; } }
a.cc: In function 'int main()': a.cc:8:48: error: expected primary-expression before '==' token 8 | if ( A % 3 == 0 || B % 3 == 0 || (A + B) % == 0){ | ^~
s028499590
p03657
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int a,b,c; cin >> a >> b ; cout << ((((a+b) % 3)==0 || A%3 == 0 || B%3 == 0)? "Possible" : "Impossible") << endl; }
a.cc: In function 'int main()': a.cc:7:33: error: 'A' was not declared in this scope 7 | cout << ((((a+b) % 3)==0 || A%3 == 0 || B%3 == 0)? "Possible" : "Impossible") << endl; | ^ a.cc:7:45: error: 'B' was not declared in this scope 7 | cout << ((((a+b) % 3)==0 || A%3 == 0 || B%3 == 0)? "Possible" : "Impossible") << endl; | ^
s129191101
p03657
C++
#include <iostream> #include <cstdlib> #include <algorithm> #include <vector> #include <string> #include <cmath> #include <cassert> #include <functional> #include <string> using namespace std; int main(){ int A, B; cin >> A, B; if(A%3==0||B%3==0||(A+B)%3==0) cout << "Possible" << endl; else cout << "Impossible" < endl; }
a.cc: In function 'int main()': a.cc:16:29: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 16 | else cout << "Impossible" < endl; | ~~~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, 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/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:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 16 | else cout << "Impossible" < endl; | ^~~~ /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:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 16 | else cout << "Impossible" < endl; | ^~~~ /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:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 16 | else cout << "Impossible" < endl; | ^~~~ /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:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 16 | else cout << "Impossible" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string: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:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 16 | else cout << "Impossible" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /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:16:31: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 16 | else cout << "Impossible" < endl; | ^~~~ /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:16:31: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 16 | else cout << "Impossible" < endl; | ^~~~ /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:16:31: note: couldn't deduce template parameter '_CharT' 16 | else cout << "Impossible" < endl; | ^~~~ /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:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 16 | else cout << "Impossible" < endl; | ^~~~ /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/substitution failed: a.cc:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 16 | else cout << "Impossible" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:16:31: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 16 | else cout << "Impossible" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 16 | else cout << "Impossible" < endl; | ^~~~ In file included from /usr/include/c++/14/vector:66, from a.cc:4: /usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed: a.cc:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>' 16 | else cout << "Impossible" < endl; | ^~~~ In file included from /usr/include/c++/14/functional:65, from a.cc:8: /usr/include/c++/14/array:339:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> bool std::operator<(const array<_Tp, _Nm>&, const array<_Tp, _Nm>&)' 339 | operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) | ^~~~~~~~ /usr/include/c++/14/array:339:5: note: template argument deduction/substitution failed: a.cc:16:31: note: 'std::basic_ostream<char>' is not derived from 'const std::array<_Tp, _Nm>' 16 | else cout << "Impossible" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, |
s487940897
p03657
C++
#include<bits/stdc++/h> using namespace std; int main(){ int a,b,c=0; cin>>a>>b; if(a%3==0||b%3==0||(a+b)%3==0){ cout<<"Possible\n"; } else{ cout<<"Impossible\n"; } }
a.cc:1:9: fatal error: bits/stdc++/h: No such file or directory 1 | #include<bits/stdc++/h> | ^~~~~~~~~~~~~~~ compilation terminated.
s490737318
p03657
C++
#include<bits/stdc++/h> using namespace std; int main(){ int a,b,c=0; cin>>a>>b; if(a%3==0||b%3==0||(a+b)%3==0){ cout<<"Possible\n"; } else{ cout<<"Impossible\n"; } }
a.cc:1:9: fatal error: bits/stdc++/h: No such file or directory 1 | #include<bits/stdc++/h> | ^~~~~~~~~~~~~~~ compilation terminated.
s697653641
p03657
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if((a+b)%3==0||a%3==0||b%3==0; cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: expected ')' before ';' token 8 | cout<<"Possible"<<endl; | ^ | ) a.cc:7:7: note: to match this '(' 7 | if((a+b)%3==0||a%3==0||b%3==0; | ^
s413140979
p03657
C++
#include <isotream> using namespace std; int main(){ int A, B; cin >> A >> B; if(A%3 == 0 || B % 3 == 0 || (A+B)%3 == 0) cout << "Possible"; else cout << "Impossible"; }
a.cc:1:10: fatal error: isotream: No such file or directory 1 | #include <isotream> | ^~~~~~~~~~ compilation terminated.
s876928468
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; if(a % 3 != 0 && b % 3 != 0 && c % 3 != 0) cout << "Impossible" << endl; else cout << "Possible" << endl; }
a.cc: In function 'int main()': a.cc:7:34: error: 'c' was not declared in this scope 7 | if(a % 3 != 0 && b % 3 != 0 && c % 3 != 0) | ^
s331327728
p03657
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%3==0 || b%3==0 (a+b)%3==0){ System.out.println("Possible"); }else{ System.out.println("Impossible"); } } }
Main.java:8: error: ')' expected if(a%3==0 || b%3==0 (a+b)%3==0){ ^ Main.java:8: error: not a statement if(a%3==0 || b%3==0 (a+b)%3==0){ ^ Main.java:8: error: ';' expected if(a%3==0 || b%3==0 (a+b)%3==0){ ^ Main.java:10: error: 'else' without 'if' }else{ ^ 4 errors
s097864366
p03657
Java
import java.util.Scanner; 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) % 3 == 0){ System.out.println("Possible"); } else ((A + B) % 3 != 0){ System.out.println("Impossible") ; } } }
Main.java:17: error: not a statement else ((A + B) % 3 != 0){ ^ Main.java:17: error: ';' expected else ((A + B) % 3 != 0){ ^ 2 errors
s538990002
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a >> b; if(a%3==0 || b%3==0 || (A+B)%3==0){ cout << "Possible" << endl; } else cout << "Impossible" << endl; }
a.cc: In function 'int main()': a.cc:6:27: error: 'A' was not declared in this scope 6 | if(a%3==0 || b%3==0 || (A+B)%3==0){ | ^ a.cc:6:29: error: 'B' was not declared in this scope 6 | if(a%3==0 || b%3==0 || (A+B)%3==0){ | ^
s557995710
p03657
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if(a+b)%3==0||a%3==0||b%3==0)cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:8: error: expected primary-expression before '%' token 7 | if(a+b)%3==0||a%3==0||b%3==0)cout<<"Possible"<<endl; | ^
s007549271
p03657
C++
#include<stdio.h> int main(void) { int n,s; scanf("%d",&n); if(n%90==1 || n%9==1){ printf("Yes\n"); } if(!(n%90==1 || n%9==1) { printf("No\n"); } return 0; }
a.cc: In function 'int main()': a.cc:9:32: error: expected ';' before '{' token 9 | if(!(n%90==1 || n%9==1) { | ^~ | ; a.cc:12:9: error: expected primary-expression before 'return' 12 | return 0; | ^~~~~~ a.cc:11:10: error: expected ')' before 'return' 11 | } | ^ | ) 12 | return 0; | ~~~~~~ a.cc:9:11: note: to match this '(' 9 | if(!(n%90==1 || n%9==1) { | ^
s296928420
p03657
C++
#include<bits/stdc++.h> using namespace std; int a,b; int main() { cin>>a>>b; if((a+b)%3==0||a%3==0||b%3==0||){ cout<<"Possible"<<endl; } else{ cout<<"Impossible"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:40: error: expected primary-expression before ')' token 7 | if((a+b)%3==0||a%3==0||b%3==0||){ | ^
s532192467
p03657
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A, B; cin << A << B; if((A + B) % 3 == 0){ cout << "Possible" << endl; } else{ cout << "Impossible" << endl; } }
a.cc: In function 'int main()': a.cc:6:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin << A << B; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:9: note: candidate: 'operator<<(int, int)' (built-in) 6 | cin << A << B; | ~~~~^~~~ a.cc:6:9: note: no known conversion for argument 1 from 'std::istream' {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:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /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:6:5: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 6 | 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: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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | 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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | cin << A << B; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream: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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | 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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | 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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | 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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | 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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | 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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | 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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | 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:6:12: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | cin << A << B; | ^ /usr/include/c++/14/ostream
s795654821
p03657
C++
#include <iostream> using namespace std; int main(){ int A; //Aを定義 int B; //Bを定義 cin >> A >> B; //A,Bの順で標準入力 if (A % 3 == 0){ cout << "Possible" << endl; //Aが3で割り切れる場合はPossibleと出力 } else if(B % 3 == 0){ cout << "Possible" << endl; //Bが3で割り切れる場合はPossibleと出力 } else if((A + B) % == 0){ cout << "Possible" << endl; //()が3で割り切れる場合はPossibleと出力 } else{ cout << "Impossible" << endl; //それ以外の場合はImpossibleと出力 } }
a.cc: In function 'int main()': a.cc:18:25: error: expected primary-expression before '==' token 18 | } else if((A + B) % == 0){ | ^~
s785360691
p03657
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,N) for(int i=0,i##_max=(N);i<i##_max;++i) #define repp(i,l,r) for(int i=(l),i##_max=(r);i<i##_max;++i) #define per(i,N) for(int i=(N)-1;i>=0;--i) #define perr(i,l,r) for(int i=r-1,i##_min(l);i>=i##_min;--i) #define all(arr) (arr).begin(), (arr).end() #define SP << " " << #define SPF << " " #define SPEEDUP cin.tie(0);ios::sync_with_stdio(false); #define MAX_I INT_MAX //1e9 #define MIN_I INT_MIN //-1e9 #define MAX_UI UINT_MAX //1e9 #define MAX_LL LLONG_MAX //1e18 #define MIN_LL LLONG_MIN //-1e18 #define MAX_ULL ULLONG_MAX //1e19 typedef long long ll; typedef pair<int,int> PII; typedef pair<char,char> PCC; typedef pair<ll,ll> PLL; typedef pair<char,int> PCI; typedef pair<int,char> PIC; typedef pair<ll,int> PLI; typedef pair<int,ll> PIL; typedef pair<ll,char> PLC; typedef pair<char,ll> PCL; inline void YesNo(bool b){ cout << (b?"Yes" : "No") << endl;} inline void YESNO(bool b){ cout << (b?"YES" : "NO") << endl;} inline void Yay(bool b){ cout << (b?"Yay!" : ":(") << endl;} int main(void){ SPEEDUP cout << setprecision(15); int A,B;cin >> A >> B; cout << (A%3==0 || B%3==0 || (A+B)%3 == 0) ? "Possible" : "Impossible" << endl; return 0; }
a.cc: In function 'int main()': a.cc:36:74: error: invalid operands of types 'const char [11]' and '<unresolved overloaded function type>' to binary 'operator<<' 36 | cout << (A%3==0 || B%3==0 || (A+B)%3 == 0) ? "Possible" : "Impossible" << endl; | ~~~~~~~~~~~~~^~~~~~~
s157317310
p03657
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); i++) #define rep1(i,n) for (int i = 1; i <= (n); i++) #define repi(i,a,b) for (int i = (a); i < (b); i++) #define all(x) (x).begin(),(x).end() using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using pii = pair<int, int>; using vc = vector<char>; using vvc = vector<vc>; using vs = vector<string>; int main() { int A, B; cin >> A >> B; cout << (A%3==0 || B%3==0 || (A+B)%3==0 ? "Possible" : "Impossible" ) }
a.cc: In function 'int main()': a.cc:21:72: error: expected ';' before '}' token 21 | cout << (A%3==0 || B%3==0 || (A+B)%3==0 ? "Possible" : "Impossible" ) | ^ | ; 22 | } | ~
s479104039
p03657
C++
#include <iostream> #include <string> #include <vector> int main() { unsigned int N, K; std::cin >> N >> K; std::vector<unsigned int> l(N); for (unsigned int i = 0; i < N; ++i) std::cin >> l[i]; std::sort(l.begin(), l.end()); std::reverse(l.begin(), l.end()); unsigned int res = 0; for (unsigned int i = 0; i < K; ++i) res += l[i]; std::cout << res << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:12:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 12 | std::sort(l.begin(), l.end()); | ^~~~ | qsort a.cc:13:8: error: 'reverse' is not a member of 'std' 13 | std::reverse(l.begin(), l.end()); | ^~~~~~~
s666742632
p03657
C++
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; if ( a%3==0 or b%3==0 (a+b)%3==0 ) { cout << "Possible" << endl; } else { cout << "Impossible" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:25: error: expression cannot be used as a function 5 | if ( a%3==0 or b%3==0 (a+b)%3==0 ) { | ~~^~~~~
s769256878
p03657
C++
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; if ( a%3==0 or b%3==0 (a+b)%3==0 ) { cout << "Possible" << endl; } else { cout << "Impossible" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:25: error: expression cannot be used as a function 5 | if ( a%3==0 or b%3==0 (a+b)%3==0 ) { | ~~^~~~~
s156154814
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B ; } if (A % 3 ==0 || B % 3 == 0 || (A+B) % 3 ==0 ){ cout << "Possible" << endl; } else { cout << "Impossible" << endl; } }
a.cc:11:3: error: expected unqualified-id before 'if' 11 | if (A % 3 ==0 || B % 3 == 0 || (A+B) % 3 ==0 ){ | ^~ a.cc:15:3: error: expected unqualified-id before 'else' 15 | else { | ^~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s691550730
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B ; } if (A % 3 ==0 || B % 3 == 0 || (A+B) % 3 ==0 ){ cout << "Possible" << endl; } else { cout << "Impossible" << endl; } }
a.cc:11:1: error: expected unqualified-id before 'if' 11 | if (A % 3 ==0 || B % 3 == 0 || (A+B) % 3 ==0 ){ | ^~ a.cc:15:1: error: expected unqualified-id before 'else' 15 | else { | ^~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s872740810
p03657
C++
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; cout << (a % 3 == 0 || b % 3 == 0 || (a+b)%3==0 ? "Possible" : "Impossible); return 0; }
a.cc:7:66: warning: missing terminating " character 7 | cout << (a % 3 == 0 || b % 3 == 0 || (a+b)%3==0 ? "Possible" : "Impossible); | ^ a.cc:7:66: error: missing terminating " character 7 | cout << (a % 3 == 0 || b % 3 == 0 || (a+b)%3==0 ? "Possible" : "Impossible); | ^~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:8:12: error: expected primary-expression before 'return' 8 | return 0; | ^~~~~~ a.cc:7:65: error: expected ')' before 'return' 7 | cout << (a % 3 == 0 || b % 3 == 0 || (a+b)%3==0 ? "Possible" : "Impossible); | ~ ^ | ) 8 | return 0; | ~~~~~~
s208022028
p03657
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> using namespace std; int main(){ int a,b; cin >> a >> b; cout << ((a+b)%3 == 0 ? "Possible" : "Impossible") << endl; }#include<iostream> #include<algorithm> #include<string> #include<vector> using namespace std; int main(){ int a,b; cin >> a >> b; cout << ((a+b)%3 == 0 || a%3 == 0 || b%3 == 0 ? "Possible" : "Impossible") << endl; }
a.cc:10:2: error: stray '#' in program 10 | }#include<iostream> | ^ a.cc:10:3: error: 'include' does not name a type 10 | }#include<iostream> | ^~~~~~~ a.cc:15:5: error: redefinition of 'int main()' 15 | int main(){ | ^~~~ a.cc:6:5: note: 'int main()' previously defined here 6 | int main(){ | ^~~~
s894700421
p03657
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> using namespace std; int main(){ int a,b; cin >> a >> b; cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; }
a.cc: In function 'int main()': a.cc:9:21: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int') 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ~~~~~~~~~~~~~~~ ^~ ~ | | | | | int | std::basic_ostream<char> a.cc:9:21: note: candidate: 'operator==(int, int)' (built-in) 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ~~~~~~~~~~~~~~~~^~~~ a.cc:9:21: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ In file included from /usr/include/c++/14/string:43, 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: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629: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> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ /usr/include/c++/14/string_view:644: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>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:9:24: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3755: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>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:9:24: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:9:24: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 9 | cout << (a+b)%3 == 0 ? "Possible" : "Impossible") << endl; | ^ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_
s366183915
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; if (A%3 == 0) { cout << "Possible" << endl; } else if (B%# == 0) { cout << "Possible" << endl; } else if ((A + B)%3 == 0) { cout << "Possible" << endl; } else { cout << "Impossible" << endl; } return 0; }
a.cc:10:16: error: stray '#' in program 10 | } else if (B%# == 0) { | ^ a.cc: In function 'int main()': a.cc:10:18: error: expected primary-expression before '==' token 10 | } else if (B%# == 0) { | ^~
s815436745
p03657
C++
#include <bits/stdc++.h> using namespace std; const long long int MOD=1e9+7; int main() { int a,b; cin>>a>>b; if(a%3==0 or b%3==0 or (a+b)%3==0) cout<<"Possible"; else cout<<"Impossible" }
a.cc: In function 'int main()': a.cc:8:32: error: expected ';' before '}' token 8 | else cout<<"Impossible" | ^ | ; 9 | } | ~
s468965441
p03657
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++) #define rFOR(i,a,b) for(ll i=(a);i>(ll)(b);i--) #define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2) #define bgn begin() #define en end() #define SORT(a) sort((a).bgn,(a).en) #define REV(a) reverse((a).bgn,(a).en) #define M(a,b) max(a,b) #define rM(a,b) min(a,b) #define fi first #define se second #define sz size() #define gcd(a,b) __gcd(a,b) #define co(a) cout<<a<<endl; #define ci(a) cin>>a; ll sum(ll n) { ll m=0; FOR(i,0,20){ m+=n%10; n/=10; if(n==0){ break; } } return m; } ll combi(ll n,ll m) { ll ans=1; rFOR(i,n,n-m){ ans*=i; } FOR(i,1,m+1){ ans/=i; } return ans; } ll lcm(ll a,ll b){ ll n; n=a/gcd(a,b)*b; return n; } /****************************************\ | Thank you for viewing my code:) | | Written by RedSpica a.k.a. RanseMirage | | Twitter:@asakaakasaka | \****************************************/ signed main() { ll n,m; ci(n>>m); if(a%3==0||b%3==0||(a+b)%3==0) co("Possible") else co("Impossible") }
a.cc: In function 'int main()': a.cc:78:6: error: 'a' was not declared in this scope 78 | if(a%3==0||b%3==0||(a+b)%3==0) co("Possible") | ^ a.cc:78:14: error: 'b' was not declared in this scope 78 | if(a%3==0||b%3==0||(a+b)%3==0) co("Possible") | ^
s852248847
p03657
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int a,b; cin>>a>>b; cout<<(a%3==0||b%3==0||(a+b)%3==0?"Possible":Impossible); }
a.cc: In function 'int main()': a.cc:8:48: error: 'Impossible' was not declared in this scope 8 | cout<<(a%3==0||b%3==0||(a+b)%3==0?"Possible":Impossible); | ^~~~~~~~~~
s774938321
p03657
C++
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) //for文マクロ using namespace std; typedef unsigned long ul; typedef long long ll; typedef pair<ul, ul> P; //ペア タイプでふ int main() { int a, b; cin >> a >> b; if (a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0) { cout << "Possible "; } else { cout << "Impossible "; } }
a.cc:14:17: warning: missing terminating " character 14 | cout << "Possible | ^ a.cc:14:17: error: missing terminating " character 14 | cout << "Possible | ^~~~~~~~~ a.cc:15:1: warning: missing terminating " character 15 | "; | ^ a.cc:15:1: error: missing terminating " character 15 | "; | ^~ a.cc:19:17: warning: missing terminating " character 19 | cout << "Impossible | ^ a.cc:19:17: error: missing terminating " character 19 | cout << "Impossible | ^~~~~~~~~~~ a.cc:20:1: warning: missing terminating " character 20 | "; | ^ a.cc:20:1: error: missing terminating " character 20 | "; | ^~ a.cc: In function 'int main()': a.cc:16:5: error: expected primary-expression before '}' token 16 | } | ^ a.cc:21:5: error: expected primary-expression before '}' token 21 | } | ^
s500317713
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); int A,B; cin>>A>>B; if(A+B%3=0)cout<<"Possible"; else cout<<"Impossible"; return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: lvalue required as left operand of assignment 8 | if(A+B%3=0)cout<<"Possible"; | ~^~~~
s373611030
p03657
C++
#include <iostream> #include <string> #include <algorithm> #include <map> #include <vector> using namespace std; int main() { int A, B; cin >> A >> B; if((A+B)%3==0){ cout << "Possible" << endl; } else if(A%3==0 && b%3==0){ cout << "Possible" << endl; } else{ cout << "Impossible" << endl; } }
a.cc: In function 'int main()': a.cc:16:23: error: 'b' was not declared in this scope 16 | else if(A%3==0 && b%3==0){ | ^
s601741909
p03657
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; string ans = "Impossible"; if(a % 3 == 0 || b % 3 == 0 a+b%3 == 0) ans = "Possible"; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:8:32: error: expected ')' before 'a' 8 | if(a % 3 == 0 || b % 3 == 0 a+b%3 == 0) ans = "Possible"; | ~ ^~ | )
s569597485
p03657
C++
<?php $N = intval(trim(fgets(STDIN))); $tmp = trim(fgets(STDIN)); $a = array_map("intval", explode(" ", $tmp)); $l = 0; $left = []; $left[0] = 0; foreach($a as $value){ $l += $value; array_push($left, $l); } $r = 0; $right = []; $right[0] = 0; $r_a = array_reverse($a); foreach($r_a as $value){ $r += $value; array_push($right, $r); } $right = array_reverse($right); $ans = abs($right[1] - $left[1]); for($i = 2;$i<count($right)-1;$i++){ if($ans > abs($right[$i] - $left[$i])){ $ans = abs($right[$i] - $left[$i]); } } echo $ans . PHP_EOL;
a.cc:1:1: error: expected unqualified-id before '<' token 1 | <?php | ^ a.cc:3:1: error: '$tmp' does not name a type 3 | $tmp = trim(fgets(STDIN)); | ^~~~ a.cc:4:1: error: '$a' does not name a type 4 | $a = array_map("intval", explode(" ", $tmp)); | ^~ a.cc:6:1: error: '$l' does not name a type 6 | $l = 0; | ^~ a.cc:7:1: error: '$left' does not name a type 7 | $left = []; | ^~~~~ a.cc:8:1: error: '$left' does not name a type 8 | $left[0] = 0; | ^~~~~ a.cc:9:8: error: expected constructor, destructor, or type conversion before '(' token 9 | foreach($a as $value){ | ^ a.cc:14:1: error: '$r' does not name a type 14 | $r = 0; | ^~ a.cc:15:1: error: '$right' does not name a type 15 | $right = []; | ^~~~~~ a.cc:16:1: error: '$right' does not name a type 16 | $right[0] = 0; | ^~~~~~ a.cc:17:1: error: '$r_a' does not name a type 17 | $r_a = array_reverse($a); | ^~~~ a.cc:18:8: error: expected constructor, destructor, or type conversion before '(' token 18 | foreach($r_a as $value){ | ^ a.cc:22:1: error: '$right' does not name a type 22 | $right = array_reverse($right); | ^~~~~~ a.cc:24:1: error: '$ans' does not name a type 24 | $ans = abs($right[1] - $left[1]); | ^~~~ a.cc:25:1: error: expected unqualified-id before 'for' 25 | for($i = 2;$i<count($right)-1;$i++){ | ^~~ a.cc:25:12: error: '$i' does not name a type 25 | for($i = 2;$i<count($right)-1;$i++){ | ^~ a.cc:25:31: error: '$i' does not name a type 25 | for($i = 2;$i<count($right)-1;$i++){ | ^~ a.cc:31:1: error: 'echo' does not name a type 31 | echo $ans . PHP_EOL; | ^~~~
s198233526
p03657
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main ( ) { ll A,B; cin>>A>>B; if(A%3==0||B%3==0||(A+B)%3==0) cout<<"Possible"<<endl; else cour<<"Impossible"<<endl; }
a.cc: In function 'int main()': a.cc:9:8: error: 'cour' was not declared in this scope 9 | else cour<<"Impossible"<<endl; | ^~~~
s308903419
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int a, b; cin >> a >> b; cout << (a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0 ? "Possible" ? "Impossible") << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:10:84: error: expected ':' before ')' token 10 | cout << (a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0 ? "Possible" ? "Impossible") << '\n'; | ^ | : a.cc:10:84: error: expected primary-expression before ')' token a.cc:10:84: error: expected ':' before ')' token 10 | cout << (a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0 ? "Possible" ? "Impossible") << '\n'; | ^ | : a.cc:10:84: error: expected primary-expression before ')' token
s056209966
p03657
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B; if((A%3)==0) cout<<"Possible"<<endl; else if((B%3)==0) cout<<"Possible"<<endl; else if(((A+B)%)==0) cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; }
a.cc: In function 'int main()': a.cc:10:18: error: expected primary-expression before ')' token 10 | else if(((A+B)%)==0) | ^
s770341445
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B; cin >> A >> B; A %= 3; B %= 3; if(A+B == 0 || A+B == 3 || A == 0 || B == 0){ cout >> "Possible"; } else{ cout >> "Impossible"; } }
a.cc: In function 'int main()': a.cc:10:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [9]') 10 | cout >> "Possible"; | ~~~~ ^~ ~~~~~~~~~~ | | | | | const char [9] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41, from a.cc:1: /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:10:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 10 | cout >> "Possible"; | ^~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /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:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/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:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /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:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /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:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /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:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /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:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /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:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /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 = const char (&)[9]]': a.cc:10:13: required from here 10 | cout >> "Possible"; | ^~~~~~~~~~ /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) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 10 | cout >> "Possible"; | ^~~~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)' 207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed: a.cc:10:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std
s675277717
p03657
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pii pair<int,int> #define vpii vector<pii> #define vll vector<ll> #define vi vector<int> #define pb push_back #define f first #define s second int main() { int a,b; cin>>a>>b; if((a+b)%3==0) cout<<"Possible"; else cout<<"Impossible" return 0; }
a.cc: In function 'int main()': a.cc:19:27: error: expected ';' before 'return' 19 | cout<<"Impossible" | ^ | ; ...... 24 | return 0; | ~~~~~~
s555935061
p03657
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pii pair<int,int> #define vpii vector<pii> #define vll vector<ll> #define vi vector<int> #define pb push_back #define f first #define s second int main() { int a,b; cin>>a>>b; if((a+b)%3==0) cout<<"Possible"; else cout<<"Impossible" return 0; }
a.cc: In function 'int main()': a.cc:19:27: error: expected ';' before 'return' 19 | cout<<"Impossible" | ^ | ; ...... 24 | return 0; | ~~~~~~
s124599809
p03657
C++
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; cout << (a+b)>=3?"Possible":"Impossible" << endl; }
a.cc: In function 'int main()': a.cc:6:18: error: no match for 'operator>=' (operand types are 'std::basic_ostream<char>' and 'int') 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ~~~~~~~~~~~~~^~~ | | | | | int | std::basic_ostream<char> a.cc:6:18: note: candidate: 'operator>=(int, int)' (built-in) 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ~~~~~~~~~~~~~^~~ a.cc:6:18: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/string:48, 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/stl_iterator.h:476:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 476 | operator>=(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:476:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:520:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 520 | operator>=(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:520:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1724:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1724 | operator>=(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1724:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1781:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1781 | operator>=(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1781:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1070:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1070 | operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1070:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:739:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 739 | operator>=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:739:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ /usr/include/c++/14/string_view:746: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> >)' 746 | operator>=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:746:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ /usr/include/c++/14/string_view:754: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>)' 754 | operator>=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:754:5: note: template argument deduction/substitution failed: a.cc:6:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3997: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>&)' 3997 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3997:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:4011:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 4011 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4011:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:4024:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4024 | operator>=(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4024:5: note: template argument deduction/substitution failed: a.cc:6:20: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2631:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>=(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2631 | operator>=(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2631:5: note: template argument deduction/substitution failed: a.cc:6:20: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ^ a.cc:6:46: error: invalid operands of types 'const char [11]' and '<unresolved overloaded function type>' to binary 'operator<<' 6 | cout << (a+b)>=3?"Possible":"Impossible" << endl; | ~~~~~~~~~~~~~^~~~~~~
s985139734
p03657
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #if __cplusplus >= 201103L #include <ccomplex> #include <cfenv> #include <cinttypes> #include <cstdalign> #include <cstdbool> #include <cstdint> #include <ctgmath> #include <cwchar> #include <cwctype> #endif #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #if __cplusplus >= 201103L #include <array> #include <atomic> #include <chrono> #include <condition_variable> #include <forward_list> #include <future> #include <initializer_list> #include <mutex> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <system_error> #include <thread> #include <tuple> #include <typeindex> #include <type_traits> #include <unordered_map> #include <unordered_set> #endif #define y0 qvya13579 #define y1 qvyb24680 #define j0 qvja13579 #define j1 qvjb24680 #define next qvne13579xt #define prev qvpr13579ev #define INF 1000000007 #define MOD 1000000007 #define PI acos(-1.0) #define endl "\n" #define IOS cin.tie(0);ios::sync_with_stdio(false) #define M_P make_pair #define PU_B push_back #define PU_F push_front #define PO_B pop_back #define PO_F pop_front #define U_B upper_bound #define L_B lower_bound #define B_S binary_search #define PR_Q priority_queue #define FIR first #define SEC second #if __cplusplus < 201103L #define stoi(argument_string) atoi((argument_string).c_str()) #endif #define REP(i,n) for(int i=0;i<(int)(n);++i) #define REP_R(i,n) for(int i=((int)(n)-1);i>=0;--i) #define FOR(i,m,n) for(int i=((int)(m));i<(int)(n);++i) #define FOR_R(i,m,n) for(int i=((int)(m)-1);i>=(int)(n);--i) #define ALL(v) (v).begin(),(v).end() #define RALL(v) (v).rbegin(),(v).rend() #define SIZ(x) ((int)(x).size()) #define COUT(x) cout<<(x)<<endl #define CIN(x) cin>>(x) #define CIN2(x,y) cin>>(x)>>(y) #define CIN3(x,y,z) cin>>(x)>>(y)>>(z) #define CIN4(x,y,z,w) cin>>(x)>>(y)>>(z)>>(w) #define SCAND(x) scanf("%d",&(x)) #define SCAND2(x,y) scanf("%d%d",&(x),&(y)) #define SCAND3(x,y,z) scanf("%d%d%d",&(x),&(y),&(z)) #define SCAND4(x,y,z,w) scanf("%d%d%d%d",&(x),&(y),&(z),&(w)) #define SCANLLD(x) scanf("%lld",&(x)) #define SCANLLD2(x,y) scanf("%lld%lld",&(x),&(y)) #define SCANLLD3(x,y,z) scanf("%lld%lld%lld",&(x),&(y),&(z)) #define SCANLLD4(x,y,z,w) scanf("%lld%lld%lld%lld",&(x),&(y),&(z),&(w)) #define PRINTD(x) printf("%d\n",(x)) #define PRINTLLD(x) printf("%lld\n",(x)) typedef long long int lli; using namespace std; bool compare_by_2nd(pair<int,int> a, pair<int,int> b) { if( a.second != b.second ) { return a.second < b.second; } else { return a.first < b.first; } } int ctoi(char c) { if( c >= '0' and c <= '9' ) { return (int)(c-'0'); } return -1; } int alphabet_pos(char c) { if( c >= 'a' and c <= 'z' ) { return (int)(c-'a'); } return -1; } int alphabet_pos_capital(char c) { if( c >= 'A' and c <= 'Z' ) { return (int)(c-'A'); } return -1; } vector<string> split(string str, char ch) { int first = 0; int last = str.find_first_of(ch); if(last == string::npos) { last = SIZ(str); } vector<string> result; while( first < SIZ(str) ) { string Ssubstr(str, first, last - first); result.push_back(Ssubstr); first = last + 1; last = str.find_first_of(ch, first); if(last == string::npos) { last = SIZ(str); } } return result; } int gcd( int a , int b ) // assuming a,b >= 1 { if( a < b ) { return gcd( b , a ); } if( a % b == 0 ) { return b; } return gcd( b , a % b ); } int lcm( int a , int b ) // assuming a,b >= 1 { return a * b / gcd( a , b ); } /*------------------ the end of the template -----------------------*/ int main() { //IOS; /* making cin faster */ int A,B; SCAND2(A,B); if( min( A%3 , B%3 ,(A+B)%3 ) == 0 ) { printf("Possible\n"); } else { printf("Impossible\n"); } }
In file included from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, from a.cc:10: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:250:10: required from here 250 | if( min( A%3 , B%3 ,(A+B)%3 ) == 0 ) | ~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function 284 | if (__comp(__b, __a)) | ~~~~~~^~~~~~~~~~
s401205267
p03657
C++
#include <iostream> #include <vector> #include <string> #include <cstdlib> #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <math.h> #include <map> #define Z class #define ln cout<<'\n' #define ll long long #define rep(i, n) for(int i = 0; i < (n); ++i) //ASCII a=97, A=65 // int H[N]; rep(i,N) scanf("%d", &H[i]); // int max_x = *std::max_element(x.begin(), x.end()); // int min_y = *std::min_element(y.begin(), y.end()); using namespace std; template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;} template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;} template<Z A>void pr(A a){cout<<a;ln;} template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);} template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);} template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);} template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;} int GCD(int a, int b) { return b ? GCD(b, a%b) : a; } const long long INF = 1LL << 60; int main(){ int A,B; cin >> A >> B; if(A%3==0 || B%3==0 || (A+B)%3==0) pr("Possible") else pr("Impossible") }
a.cc: In function 'int main()': a.cc:33:54: error: expected ';' before 'else' 33 | if(A%3==0 || B%3==0 || (A+B)%3==0) pr("Possible") | ^ | ; 34 | else pr("Impossible") | ~~~~
s744427821
p03657
C++
#include <iostream> using namespace std; int main(){ int N, K; cin >> N >> K; int l[N]; for(int i; i < N; i++){ cin >> l[i]; } int sum; sort(l, l + N, greater<int>()); for(int i=0; i < K; i++){ sum += l[i]; } cout << sum << endl; }
a.cc: In function 'int main()': a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(l, l + N, greater<int>()); | ^~~~ | short
s410639874
p03657
C++
#include "bits/stdc++.h" using namespace std; int main(void){ int A,B,C; string ans; cin >> A >> B; C = A + B; if (A%3==0) ans = "Possible"; else if (B%3==0) ans = "Possible"; else if (C%3==0) ans = "Possible"; else ans = "Impossible" cout << ans << endl; }
a.cc: In function 'int main()': a.cc:15:23: error: expected ';' before 'cout' 15 | ans = "Impossible" | ^ | ; 16 | cout << ans << endl; | ~~~~
s446623314
p03657
C++
#include <bits/stdc++.h> #define REP(i, n) for(long long i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); #define ll long long #define pb(a) push_back(a) #define INF 999999999 using namespace std; int main(){ int a,b; cin << a << b; if (a % 3 == 0 || b % 3 == 0 || (a+b) % 3 == 0){ cout << "Possible"; } else { cout << "Impossible"; } }
a.cc: In function 'int main()': a.cc:15:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 15 | cin << a << b; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:15:7: note: candidate: 'operator<<(int, int)' (built-in) 15 | cin << a << b; | ~~~~^~~~ a.cc:15:7: note: no known conversion for argument 1 from 'std::istream' {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:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | cin << a << b; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /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:15:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 15 | 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: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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | 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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | cin << a << b; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | cin << a << b; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | cin << a << b; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | cin << a << b; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream: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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | 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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | 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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 15 | 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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 15 | 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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 15 | 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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | 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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 15 | 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:15:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 15 | cin << a << b; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::b
s476307996
p03657
C++
#include <iostream> using namespace std; // 各桁の和を計算する関数 int main() { int N,K; cin >> N>>K; vector<int>vec(N); for (int i = 0; i < N; ++i) cin>>vec[i]; sort(vec.begin(),vec.end()) reverse(vec.begin(),vec.end) int sum=0; for(int i=0;i<K;i++) sum+=vec[i]; cout << sum << endl; }
a.cc: In function 'int main()': a.cc:10:3: error: 'vector' was not declared in this scope 10 | vector<int>vec(N); | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> 2 | using namespace std; a.cc:10:10: error: expected primary-expression before 'int' 10 | vector<int>vec(N); | ^~~ a.cc:12:10: error: 'vec' was not declared in this scope 12 | cin>>vec[i]; | ^~~ a.cc:13:8: error: 'vec' was not declared in this scope 13 | sort(vec.begin(),vec.end()) | ^~~ a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(vec.begin(),vec.end()) | ^~~~ | short a.cc:17:5: error: 'sum' was not declared in this scope 17 | sum+=vec[i]; | ^~~ a.cc:19:11: error: 'sum' was not declared in this scope 19 | cout << sum << endl; | ^~~
s523495666
p03657
C++
#include<bits/stdc++.h> int main(){ int a,b; cin>>a>>b; if(a%3==0||b%3==0||(a+b)%3==0)cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; }
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin>>a>>b; | ^~~ | 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:5:33: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 5 | if(a%3==0||b%3==0||(a+b)%3==0)cout<<"Possible"<<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:5:51: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 5 | if(a%3==0||b%3==0||(a+b)%3==0)cout<<"Possible"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:6:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | else cout<<"Impossible"<<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:6:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | else cout<<"Impossible"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s850460493
p03657
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,c,d; cin>>a>>c; if(a%3==0||c%3==0||(a+c)%3==0){ cout<<"Possible"<<endl; else{ cout<<"Impossible"<<endl; } }
a.cc: In function 'int main()': a.cc:10:3: error: expected '}' before 'else' 10 | else{ | ^~~~ a.cc:7:36: note: to match this '{' 7 | if(a%3==0||c%3==0||(a+c)%3==0){ | ^
s769460525
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { a,b; cin>>a>>b; if ((a+b)%3==0) { cout<<"Possible"<<endl; } else { cout<<"Impossible"<<endl; } }
a.cc: In function 'int main()': a.cc:5:3: error: 'a' was not declared in this scope 5 | a,b; | ^ a.cc:5:5: error: 'b' was not declared in this scope 5 | a,b; | ^
s179474451
p03657
C++
#include <bits/stdc++.h> using namespace std; // 変数ダンプ先。coutかcerr #define DUMPOUT cerr // 提出時はコメントアウト #define DEBUG_ // #define int long long // intで書いたけど心配なときにlong longに変換する struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast; /* cpp template {{{ */ /* short */ #define pb push_back #define eb emplace_back #define mp make_pair #define Fi first #define Se second #define ALL(v) begin(v), end(v) #define RALL(v) rbegin(v), rend(v) /* REPmacro */ #define REPS(i, a, n) for (ll i = (a); i < (ll)(n); ++i) #define REP(i, n) REPS(i, 0, n) #define RREP(i, n) REPS(i, 1, n + 1) #define DEPS(i, a, n) for (ll i = (a); i >= (ll)(n); --i) #define DEP(i, n) DEPS(i, n, 0) #define EACH(i, n) for (auto&& i : n) /* debug */ #define debug(x) cerr << x << " " << "(L:" << __LINE__ << ")" << '\n'; /* alias */ using ll = long long; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using pii = pair<int, int>; using D = double; using P = complex<D>; using vs = vector<string>; template <typename T> using PQ = priority_queue<T>; template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>; /* const */ const int INF = 1001001001; const ll LINF = 1001001001001001001ll; const int MOD = 1e9 + 7; const D EPS = 1e-9; const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1}, dy[] = {1, 0, -1, 0, 1, -1, -1, 1}; /* func */ inline bool inside(int y, int x, int H, int W) {return y >= 0 && x >= 0 && y < H && x < W;} inline int in() {int x; cin >> x; return x;} inline ll IN() {ll x; cin >> x; return x;} inline vs split(const string& t, char c) {vs v; stringstream s(t); string b; while(getline(s, b, c)) v.eb(b); return v;} template <typename T> inline bool chmin(T& a, const T& b) {if (a > b) a = b; return a > b;} template <typename T> inline bool chmax(T& a, const T& b) {if (a < b) a = b; return a < b;} template <typename T, typename S> inline void print(const pair<T, S>& p) {cout << p.first << " " << p.second << endl;} template <typename T> inline void print(const T& x) {cout << x << '\n';} template <typename T, typename S> inline void print(const vector<pair<T, S>>& v) {for (auto&& p : v) print(p);} template <typename T> inline void print(const vector<T>& v, string s = " ") {REP(i, v.size()) cout << v[i] << (i != (ll)v.size() - 1 ? s : "\n");} // clang-format on /* }}} */ #ifdef DEBUG_ #define DEB #else // DEB と打つとデバッグ時以外はコメントアウトになる #define DEB /##/ #endif // 変数ダンプ用マクロ。デバッグ時以外は消滅する // 引数はいくつでもどんな型でも可(ストリーム出力演算子があればOK) #define dump(...) DEB DUMPOUT<<" "; \ DUMPOUT<<#__VA_ARGS__<<" :["<<__LINE__<<":"<<__FUNCTION__<<"]"<<endl; \ DUMPOUT<<" "; \ dump_func(__VA_ARGS__) // デバッグ用変数ダンプ関数 void dump_func() { DUMPOUT << endl; } template <class Head, class... Tail> void dump_func(Head&& head, Tail&&... tail) { DUMPOUT << head; if (sizeof...(Tail) == 0) { DUMPOUT << " "; } else { DUMPOUT << ", "; } dump_func(std::move(tail)...); } // vector出力 template<typename T> ostream& operator << (ostream& os, vector<T>& vec) { os << "{"; for (int i = 0; i<vec.size(); i++) { os << vec[i] << (i + 1 == vec.size() ? "" : ", "); } os << "}"; return os; } signed main() { int A, b; cin >> A >> B; if (A % 3 == 0 || B % 3 == 0 || (A + B) % 3 == 0) { print("Possible"); } else { print("Impossible"); } return 0; } // https://github.com/kurokoji/.cpp-Template/wiki テンプレートについて // http://www.creativ.xyz/dump-cpp-652 dump()について // https://gist.github.com/rigibun/7905920 色々
a.cc: In function 'int main()': a.cc:112:27: error: 'B' was not declared in this scope 112 | int A, b; cin >> A >> B; | ^
s152670733
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a&3==0||b%3==0||(a+b)%3==0)?"Yes":"No"<<endl; }
a.cc: In function 'int main()': a.cc:6:54: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 6 | cout<<(a&3==0||b%3==0||(a+b)%3==0)?"Yes":"No"<<endl; | ~~~~^~~~~~
s715329658
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a&3==0||b%3==0||(a+b)%3==0)?"Yes":"No")<<endl; }
a.cc: In function 'int main()': a.cc:6:54: error: expected ';' before ')' token 6 | cout<<(a&3==0||b%3==0||(a+b)%3==0)?"Yes":"No")<<endl; | ^ | ;
s128237399
p03657
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int A,B; cin>>A>>B; if(A%3==0||B%3=0||(A+B)%3==0) cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: lvalue required as left operand of assignment 7 | if(A%3==0||B%3=0||(A+B)%3==0) | ~~~~~~^~~~~
s633997401
p03657
C++
#include<bits/stdc++.h> using namespace std; int main(void){{ int A,B; cin>>A>>B; if(A%3==0||B%3=0||(A+B)%3==0) cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: lvalue required as left operand of assignment 7 | if(A%3==0||B%3=0||(A+B)%3==0) | ~~~~~~^~~~~ a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){{ | ^
s605486475
p03657
C++
#include<bits/stdc++.h> using namespace std; int a,b int main() { cin>>a>>b; if ((((a+b)%3)==0)||(b%3==0)||(a%3==0)) cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; return 0; }
a.cc:4:1: error: expected initializer before 'int' 4 | int main() | ^~~
s788956893
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { string A, B; cin >> A, B; string ans = "Impossible"; if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:10:9: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ~ ^ ~ | | | | | int | std::string {aka 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:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:11: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:11: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:11: note: mismatched types 'const std::valarray<_Tp>' and 'int' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ a.cc:10:18: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ~ ^ ~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} /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:10:20: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:20: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:20: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /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:10:20: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 10 | if (A % 3 || B % 3 || A + B % 3) ans = "Possible"; | ^ /usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'templa
s739819084
p03657
C++
#define _USE_MATH_DEFINES #include <iostream> #include <cstdio> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <numeric> #include <cctype> #include <stack> #include <queue> #include <map> #include <set> #include <functional> #include <cstdlib> #include <iomanip>#define _USE_MATH_DEFINES #include <iostream>#define _USE_MATH_DEFINES #include <iostream> #include <cstdio> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <numeric> #include <cctype> #include <stack> #include <queue> #include <map> #include <set> #include <functional> #include <cstdlib> #include <iomanip> #include <list> #include <regex> using namespace std; #define rep(i, n) for (lli i = 0; i < (n); i++) #define all(obj) (obj).begin(), (obj).end() #define m_p make_pair #define rond(a, b) ((a) + (b) - 1) / (b) using lli = long long; using vect = vector<lli>; using vecvec = vector<vect>; using ipair = pair<lli, lli>; using p_q = priority_queue<lli>; constexpr lli inf = 1e15; constexpr lli mod = 1e9 + 7; int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; class unionfind { public: int size; unionfind(int n) { size = n; for (int i = 0; i < n; i++) { par.push_back(i); rank.push_back(0); len.push_back(1); } }; int find(int n) { if (par[n] == n) return n; else return par[n] = find(par[n]); }; void unite(int n, int m) { n = find(n); m = find(m); if (n == m) return; size--; if (rank[n] < rank[m]) { par[n] = m; len[m] += len[n]; } else { par[m] = n; len[n] += len[m]; } if (rank[n] == rank[m]) rank[n]++; }; bool same(int n, int m) { return find(n) == find(m); }; int length(int n) { return len[find(n)]; } private: vect par; vect rank; vect len; }; class seg_tree { public: seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = node[2 * i + 1] + node[2 * i + 2]; }; void update(int x, lli val) { x += n - 1; node[x] = val; while (x > 0) { x = (x - 1) / 2; node[x] = node[2 * x + 1] + node[2 * x + 2]; } }; lli getsum(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return 0; if (a <= l && r <= b) return node[k]; return getsum(a, b, 2 * k + 1, l, (l + r) / 2) + getsum(a, b, 2 * k + 2, (l + r) / 2, r); }; private: int n; vect node; }; class lazy_seg_tree { public: lazy_seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1, inf); lazy.resize(n * 2 - 1, inf); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = min(node[2 * i + 1], node[2 * i + 2]); }; void eval(int k, int l, int r) { if (lazy[k] != inf) { node[k] = min(node[k], lazy[k]); if (r - l > 1) { lazy[2 * k + 1] = min(lazy[2 * k + 1], lazy[k]); lazy[2 * k + 2] = min(lazy[2 * k + 1], lazy[k]); } lazy[k] = inf; } }; void update(int a, int b, lli x, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; eval(k, l, r); if (b <= l || r <= a) return; if (a <= l && r <= b) { lazy[k] = min(lazy[k], x); eval(k, l, r); } else { update(a, b, x, 2 * k + 1, l, (l + r) / 2); update(a, b, x, 2 * k + 2, (l + r) / 2, r); node[k] = min(node[2 * k + 1], node[2 * k + 2]); } }; lli getmin(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return inf; eval(k, l, r); if (a <= l && r <= b) return node[k]; return min(getmin(a, b, 2 * k + 1, l, (l + r) / 2), getmin(a, b, 2 * k + 2, (l + r) / 2, r)); }; private: int n; vect node, lazy; }; template<class T> vector<pair<T, int>> rle(vector<T> vec) { vector<pair<T, int>> ans; ans.emplace_back(vec.front(), 1); for (int i = 1; i < vec.size(); i++) { if (vec[i] == ans.back().first) ans.back().second++; else ans.emplace_back(vec[i], 1); } return ans; } vect cum_sum(vect v) { vect ans(v.size() + 1); rep(i, v.size()) ans[i + 1] = ans[i] + v[i]; return ans; } vecvec cum_sum_2d(vecvec v) { vecvec ans(v.size() + 1, vect(v[0].size() + 1)); rep(i, v.size()) rep(j, v[0].size()) ans[i + 1][j + 1] = ans[i + 1][j] + ans[i][j + 1] - ans[i][j] + v[i][j]; return ans; } vector<bool> eratosthenes(int n) { vector<bool> ans(n + 1, 1); ans[1] = 0; for (int i = 2; i * i <= n; i++) { if (ans[i] == 0) continue; for (int j = i; i * j <= n; j++) ans[i * j] = 0; } return ans; } bool prime(int n) { for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; } vector<ipair> fact(int n) { vector<ipair> ans; auto era = eratosthenes(floor(sqrt(n))); for (int i = 2; i * i <= n; i++) { if (era[i] == 0) continue; if (n % i == 0) { ans.emplace_back(i, 1); n /= i; } while (n % i == 0) { ans.back().second++; n /= i; } } if (n != 1) ans.emplace_back(n, 1); return ans; } lli gcd(lli a, lli b) { if (a < b) swap(a, b); if (b == 0) return a; return gcd(b, a % b); } #define lcm(a, b) (a) / gcd((a), (b)) * (b) lli s[100000], t[100000]; int main() { int a, b; cin >> a >> b; cout << (a * b % 3 == 1 ? "Impossible" : "Possible") << endl; } #include <cstdio> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <numeric> #include <cctype> #include <stack> #include <queue> #include <map> #include <set> #include <functional> #include <cstdlib> #include <iomanip> #include <list> #include <regex> using namespace std; #define rep(i, n) for (lli i = 0; i < (n); i++) #define all(obj) (obj).begin(), (obj).end() #define m_p make_pair #define rond(a, b) ((a) + (b) - 1) / (b) using lli = long long; using vect = vector<lli>; using vecvec = vector<vect>; using ipair = pair<lli, lli>; using p_q = priority_queue<lli>; constexpr lli inf = 1e15; constexpr lli mod = 1e9 + 7; int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; class unionfind { public: int size; unionfind(int n) { size = n; for (int i = 0; i < n; i++) { par.push_back(i); rank.push_back(0); len.push_back(1); } }; int find(int n) { if (par[n] == n) return n; else return par[n] = find(par[n]); }; void unite(int n, int m) { n = find(n); m = find(m); if (n == m) return; size--; if (rank[n] < rank[m]) { par[n] = m; len[m] += len[n]; } else { par[m] = n; len[n] += len[m]; } if (rank[n] == rank[m]) rank[n]++; }; bool same(int n, int m) { return find(n) == find(m); }; int length(int n) { return len[find(n)]; } private: vect par; vect rank; vect len; }; class seg_tree { public: seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = node[2 * i + 1] + node[2 * i + 2]; }; void update(int x, lli val) { x += n - 1; node[x] = val; while (x > 0) { x = (x - 1) / 2; node[x] = node[2 * x + 1] + node[2 * x + 2]; } }; lli getsum(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return 0; if (a <= l && r <= b) return node[k]; return getsum(a, b, 2 * k + 1, l, (l + r) / 2) + getsum(a, b, 2 * k + 2, (l + r) / 2, r); }; private: int n; vect node; }; class lazy_seg_tree { public: lazy_seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1, inf); lazy.resize(n * 2 - 1, inf); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = min(node[2 * i + 1], node[2 * i + 2]); }; void eval(int k, int l, int r) { if (lazy[k] != inf) { node[k] = min(node[k], lazy[k]); if (r - l > 1) { lazy[2 * k + 1] = min(lazy[2 * k + 1], lazy[k]); lazy[2 * k + 2] = min(lazy[2 * k + 1], lazy[k]); } lazy[k] = inf; } }; void update(int a, int b, lli x, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; eval(k, l, r); if (b <= l || r <= a) return; if (a <= l && r <= b) { lazy[k] = min(lazy[k], x); eval(k, l, r); } else { update(a, b, x, 2 * k + 1, l, (l + r) / 2); update(a, b, x, 2 * k + 2, (l + r) / 2, r); node[k] = min(node[2 * k + 1], node[2 * k + 2]); } }; lli getmin(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return inf; eval(k, l, r); if (a <= l && r <= b) return node[k]; return min(getmin(a, b, 2 * k + 1, l, (l + r) / 2), getmin(a, b, 2 * k + 2, (l + r) / 2, r)); }; private: int n; vect node, lazy; }; template<class T> vector<pair<T, int>> rle(vector<T> vec) { vector<pair<T, int>> ans; ans.emplace_back(vec.front(), 1); for (int i = 1; i < vec.size(); i++) { if (vec[i] == ans.back().first) ans.back().second++; else ans.emplace_back(vec[i], 1); } return ans; } vect cum_sum(vect v) { vect ans(v.size() + 1); rep(i, v.size()) ans[i + 1] = ans[i] + v[i]; return ans; } vecvec cum_sum_2d(vecvec v) { vecvec ans(v.size() + 1, vect(v[0].size() + 1)); rep(i, v.size()) rep(j, v[0].size()) ans[i + 1][j + 1] = ans[i + 1][j] + ans[i][j + 1] - ans[i][j] + v[i][j]; return ans; } vector<bool> eratosthenes(int n) { vector<bool> ans(n + 1, 1); ans[1] = 0; for (int i = 2; i * i <= n; i++) { if (ans[i] == 0) continue; for (int j = i; i * j <= n; j++) ans[i * j] = 0; } return ans; } bool prime(int n) { for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; } vector<ipair> fact(int n) { vector<ipair> ans; auto era = eratosthenes(floor(sqrt(n))); for (int i = 2; i * i <= n; i++) { if (era[i] == 0) continue; if (n % i == 0) { ans.emplace_back(i, 1); n /= i; } while (n % i == 0) { ans.back().second++; n /= i; } } if (n != 1) ans.emplace_back(n, 1); return ans; } lli gcd(lli a, lli b) { if (a < b) swap(a, b); if (b == 0) return a; return gcd(b, a % b); } #define lcm(a, b) (a) / gcd((a), (b)) * (b) lli s[100000], t[100000]; int main() { int a, b; cin >> a >> b; cout << (a * b % 3 == 1 ? "Impossible" : "Possible") << endl; } #include <list> #include <regex> using namespace std; #define rep(i, n) for (lli i = 0; i < (n); i++) #define all(obj) (obj).begin(), (obj).end() #define m_p make_pair #define rond(a, b) ((a) + (b) - 1) / (b) using lli = long long; using vect = vector<lli>; using vecvec = vector<vect>; using ipair = pair<lli, lli>; using p_q = priority_queue<lli>; constexpr lli inf = 1e15; constexpr lli mod = 1e9 + 7; int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; class unionfind { public: int size; unionfind(int n) { size = n; for (int i = 0; i < n; i++) { par.push_back(i); rank.push_back(0); len.push_back(1); } }; int find(int n) { if (par[n] == n) return n; else return par[n] = find(par[n]); }; void unite(int n, int m) { n = find(n); m = find(m); if (n == m) return; size--; if (rank[n] < rank[m]) { par[n] = m; len[m] += len[n]; } else { par[m] = n; len[n] += len[m]; } if (rank[n] == rank[m]) rank[n]++; }; bool same(int n, int m) { return find(n) == find(m); }; int length(int n) { return len[find(n)]; } private: vect par; vect rank; vect len; }; class seg_tree { public: seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = node[2 * i + 1] + node[2 * i + 2]; }; void update(int x, lli val) { x += n - 1; node[x] = val; while (x > 0) { x = (x - 1) / 2; node[x] = node[2 * x + 1] + node[2 * x + 2]; } }; lli getsum(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return 0; if (a <= l && r <= b) return node[k]; return getsum(a, b, 2 * k + 1, l, (l + r) / 2) + getsum(a, b, 2 * k + 2, (l + r) / 2, r); }; private: int n; vect node; }; class lazy_seg_tree { public: lazy_seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1, inf); lazy.resize(n * 2 - 1, inf); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = min(node[2 * i + 1], node[2 * i + 2]); }; void eval(int k, int l, int r) { if (lazy[k] != inf) { node[k] = min(node[k], lazy[k]); if (r - l > 1) { lazy[2 * k + 1] = min(lazy[2 * k + 1], lazy[k]); lazy[2 * k + 2] = min(lazy[2 * k + 1], lazy[k]); } lazy[k] = inf; } }; void update(int a, int b, lli x, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; eval(k, l, r); if (b <= l || r <= a) return; if (a <= l && r <= b) { lazy[k] = min(lazy[k], x); eval(k, l, r); } else { update(a, b, x, 2 * k + 1, l, (l + r) / 2); update(a, b, x, 2 * k + 2, (l + r) / 2, r); node[k] = min(node[2 * k + 1], node[2 * k + 2]); } }; lli getmin(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return inf; eval(k, l, r); if (a <= l && r <= b) return node[k]; return min(getmin(a, b, 2 * k + 1, l, (l + r) / 2), getmin(a, b, 2 * k + 2, (l + r) / 2, r)); }; private: int n; vect node, lazy; }; template<class T> vector<pair<T, int>> rle(vector<T> vec) { vector<pair<T, int>> ans; ans.emplace_back(vec.front(), 1); for (int i = 1; i < vec.size(); i++) { if (vec[i] == ans.back().first) ans.back().second++; else ans.emplace_back(vec[i], 1); } return ans; } vect cum_sum(vect v) { vect ans(v.size() + 1); rep(i, v.size()) ans[i + 1] = ans[i] + v[i]; return ans; } vecvec cum_sum_2d(vecvec v) { vecvec ans(v.size() + 1, vect(v[0].size() + 1)); rep(i, v.size()) rep(j, v[0].size()) ans[i + 1][j + 1] = ans[i + 1][j] + ans[i][j + 1] - ans[i][j] + v[i][j]; return ans; } vector<bool> eratosthenes(int n) { vector<bool> ans(n + 1, 1); ans[1] = 0; for (int i = 2; i * i <= n; i++) { if (ans[i] == 0) continue; for (int j = i; i * j <= n; j++) ans[i * j] = 0; } return ans; } bool prime(int n) { for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; } vector<ipair> fact(int n) { vector<ipair> ans; auto era = eratosthenes(floor(sqrt(n))); for (int i = 2; i * i <= n; i++) { if (era[i] == 0) continue; if (n % i == 0) { ans.emplace_back(i, 1); n /= i; } while (n % i == 0) { ans.back().second++; n /= i; } } if (n != 1) ans.emplace_back(n, 1); return ans; } lli gcd(lli a, lli b) { if (a < b) swap(a, b); if (b == 0) return a; return gcd(b, a % b); } #define lcm(a, b) (a) / gcd((a), (b)) * (b) lli s[100000], t[100000]; int main() { int a, b; cin >> a >> b; cout << (a * b % 3 == 2 ? "Impossible" : "Possible") << endl; }
a.cc:16:19: warning: extra tokens at end of #include directive 16 | #include <iomanip>#define _USE_MATH_DEFINES | ^ a.cc:17:20: warning: extra tokens at end of #include directive 17 | #include <iostream>#define _USE_MATH_DEFINES | ^ a.cc:279:15: error: redefinition of 'constexpr const lli inf' 279 | constexpr lli inf = 1e15; | ^~~ a.cc:45:15: note: 'constexpr const lli inf' previously defined here 45 | constexpr lli inf = 1e15; | ^~~ a.cc:280:15: error: redefinition of 'constexpr const lli mod' 280 | constexpr lli mod = 1e9 + 7; | ^~~ a.cc:46:15: note: 'constexpr const lli mod' previously defined here 46 | constexpr lli mod = 1e9 + 7; | ^~~ a.cc:281:5: error: redefinition of 'int dx [4]' 281 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:47:5: note: 'int dx [4]' previously defined here 47 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:281:27: error: redefinition of 'int dy [4]' 281 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:47:27: note: 'int dy [4]' previously defined here 47 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:283:7: error: redefinition of 'class unionfind' 283 | class unionfind | ^~~~~~~~~ a.cc:49:7: note: previous definition of 'class unionfind' 49 | class unionfind | ^~~~~~~~~ a.cc:330:7: error: redefinition of 'class seg_tree' 330 | class seg_tree | ^~~~~~~~ a.cc:96:7: note: previous definition of 'class seg_tree' 96 | class seg_tree | ^~~~~~~~ a.cc:359:7: error: redefinition of 'class lazy_seg_tree' 359 | class lazy_seg_tree | ^~~~~~~~~~~~~ a.cc:125:7: note: previous definition of 'class lazy_seg_tree' 125 | class lazy_seg_tree | ^~~~~~~~~~~~~ a.cc:407:22: error: redefinition of 'template<class T> std::vector<std::pair<_BiIter, int> > rle(std::vector<_Tp>)' 407 | vector<pair<T, int>> rle(vector<T> vec) { | ^~~ a.cc:173:22: note: 'template<class T> std::vector<std::pair<_BiIter, int> > rle(std::vector<_Tp>)' previously declared here 173 | vector<pair<T, int>> rle(vector<T> vec) { | ^~~ a.cc:419:6: error: redefinition of 'vect cum_sum(vect)' 419 | vect cum_sum(vect v) { | ^~~~~~~ a.cc:185:6: note: 'vect cum_sum(vect)' previously defined here 185 | vect cum_sum(vect v) { | ^~~~~~~ a.cc:426:8: error: redefinition of 'vecvec cum_sum_2d(vecvec)' 426 | vecvec cum_sum_2d(vecvec v) { | ^~~~~~~~~~ a.cc:192:8: note: 'vecvec cum_sum_2d(vecvec)' previously defined here 192 | vecvec cum_sum_2d(vecvec v) { | ^~~~~~~~~~ a.cc:434:14: error: redefinition of 'std::vector<bool> eratosthenes(int)' 434 | vector<bool> eratosthenes(int n) { | ^~~~~~~~~~~~ a.cc:200:14: note: 'std::vector<bool> eratosthenes(int)' previously defined here 200 | vector<bool> eratosthenes(int n) { | ^~~~~~~~~~~~ a.cc:445:6: error: redefinition of 'bool prime(int)' 445 | bool prime(int n) { | ^~~~~ a.cc:211:6: note: 'bool prime(int)' previously defined here 211 | bool prime(int n) { | ^~~~~ a.cc:452:15: error: redefinition of 'std::vector<std::pair<long long int, long long int> > fact(int)' 452 | vector<ipair> fact(int n) { | ^~~~ a.cc:218:15: note: 'std::vector<std::pair<long long int, long long int> > fact(int)' previously defined here 218 | vector<ipair> fact(int n) { | ^~~~ a.cc:471:5: error: redefinition of 'lli gcd(lli, lli)' 471 | lli gcd(lli a, lli b) { | ^~~ a.cc:237:5: note: 'lli gcd(lli, lli)' previously defined here 237 | lli gcd(lli a, lli b) { | ^~~ a.cc:480:5: error: redefinition of 'lli s [100000]' 480 | lli s[100000], t[100000]; | ^ a.cc:246:5: note: 'lli s [100000]' previously declared here 246 | lli s[100000], t[100000]; | ^ a.cc:480:16: error: redefinition of 'lli t [100000]' 480 | lli s[100000], t[100000]; | ^ a.cc:246:16: note: 'lli t [100000]' previously declared here 246 | lli s[100000], t[100000]; | ^ a.cc:482:5: error: redefinition of 'int main()' 482 | int main() { | ^~~~ a.cc:248:5: note: 'int main()' previously defined here 248 | int main() { | ^~~~ a.cc:499:15: error: redefinition of 'constexpr const lli inf' 499 | constexpr lli inf = 1e15; | ^~~ a.cc:45:15: note: 'constexpr const lli inf' previously defined here 45 | constexpr lli inf = 1e15; | ^~~ a.cc:500:15: error: redefinition of 'constexpr const lli mod' 500 | constexpr lli mod = 1e9 + 7; | ^~~ a.cc:46:15: note: 'constexpr const lli mod' previously defined here 46 | constexpr lli mod = 1e9 + 7; | ^~~ a.cc:501:5: error: redefinition of 'int dx [4]' 501 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:47:5: note: 'int dx [4]' previously defined here 47 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:501:27: error: redefinition of 'int dy [4]' 501 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:47:27: note: 'int dy [4]' previously defined here 47 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:503:7: error: redefinition of 'class unionfind' 503 | class unionfind | ^~~~~~~~~ a.cc:49:7: note: previous definition of 'class unionfind' 49 | class unionfind | ^~~~~~~~~ a.cc:550:7: error: redefinition of 'class seg_tree' 550 | class seg_tree | ^~~~~~~~ a.cc:96:7: note: previous definition of 'class seg_tree' 96 | class seg_tree | ^~~~~~~~ a.cc:579:7: error: redefinition of 'class lazy_seg_tree' 579 | class lazy_seg_tree | ^~~~~~~~~~~~~ a.cc:125:7: note: previous definition of 'class lazy_seg_tree' 125 | class lazy_seg_tree | ^~~~~~~~~~~~~ a.cc:627:22: error: redefinition of 'template<class T> std::vector<std::pair<_BiIter, int> > rle(std::vector<_Tp>)' 627 | vector<pair<T, int>> rle(vector<T> vec) { | ^~~ a.cc:173:22: note: 'template<class T> std::vector<std::pair<_BiIter, int> > rle(std::vector<_Tp>)' previously declared here 173 | vector<pair<T, int>> rle(vector<T> vec) { | ^~~ a.cc:639:6: error: redefinition of 'vect cum_sum(vect)' 639 | vect cum_sum(vect v) { | ^~~~~~~ a.cc:185:6: note: 'vect cum_sum(vect)' previously defined here 185 | vect cum_sum(vect v) { | ^~~~~~~ a.cc:646:8: error: redefinition of 'vecvec cum_sum_2d(vecvec)' 646 | vecvec cum_sum_2d(vecvec v) { | ^~~~~~~~~~ a.cc:192:8: note: 'vecvec cum_sum_2d(vecvec)' previously defined here 192 | vecvec cum_sum_2d(vecvec v) { | ^~~~~~~~~~ a.cc:654:14: error: redefinition of 'std::vector<bool> eratosthenes(int)' 654 | vector<bool> eratosthenes(int n) { | ^~~~~~~~~~~~ a.cc:200:14: note: 'std::vector<bool> eratosthenes(int)' previously defined here 200 | vector<bool> eratosthenes(int n) { | ^~~~~~~~~~~~ a.cc:665:6: error: redefinition of 'bool prime(int)' 665 | bool prime(int n) { | ^~~~~ a.cc:211:6: note: 'bool prime(int)' previously defined here 211 | bool prime(int n) { | ^~~~~ a.cc:672:15: error: redefinition of 'std::vector<std::pair<long long int, long long int> > fact(int)' 672 | vector<ipair> fact(int n) { | ^~~~ a.cc:218:15: note: 'std::vector<std::pair<long long int, long long int> > fact(int)' previously defined here 218 | vector<ipair> fact(int n) { | ^~~~ a.cc:691:5: error: redefinition of 'lli gcd(lli, lli)' 691 | lli gcd(lli a, lli b) { | ^~~ a.cc:237:5: note: 'lli gcd(lli, lli)' previously defined here 237 | lli gcd(lli a, lli b) { | ^~~ a.cc:700:5: error: redefinition of 'lli s [100000]' 700 | lli s[100000], t[100000]; | ^ a.cc:246:5: note: 'lli s [100000]' previously declared here 246 | lli s[100000], t[100000]; | ^ a.cc:700:16: error: redefinition of 'lli t [100000]' 700 | lli s[100000], t[100000]; | ^ a.cc:246:16: note: 'lli t [100000]' previously declared here 246 | lli s[100000], t[100000]; | ^ a.cc:702:5: error: redefinition of 'int main()' 702 | int main() { | ^~~~ a.cc:248:5: note: 'int main()' previously defined here 248 | int main() { | ^~~~
s031227429
p03657
C++
#define _USE_MATH_DEFINES #include <iostream> #include <cstdio> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <numeric> #include <cctype> #include <stack> #include <queue> #include <map> #include <set> #include <functional> #include <cstdlib> #include <iomanip>#define _USE_MATH_DEFINES #include <iostream> #include <cstdio> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <numeric> #include <cctype> #include <stack> #include <queue> #include <map> #include <set> #include <functional> #include <cstdlib> #include <iomanip> #include <list> #include <regex> using namespace std; #define rep(i, n) for (lli i = 0; i < (n); i++) #define all(obj) (obj).begin(), (obj).end() #define m_p make_pair #define rond(a, b) ((a) + (b) - 1) / (b) using lli = long long; using vect = vector<lli>; using vecvec = vector<vect>; using ipair = pair<lli, lli>; using p_q = priority_queue<lli>; constexpr lli inf = 1e15; constexpr lli mod = 1e9 + 7; int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; class unionfind { public: int size; unionfind(int n) { size = n; for (int i = 0; i < n; i++) { par.push_back(i); rank.push_back(0); len.push_back(1); } }; int find(int n) { if (par[n] == n) return n; else return par[n] = find(par[n]); }; void unite(int n, int m) { n = find(n); m = find(m); if (n == m) return; size--; if (rank[n] < rank[m]) { par[n] = m; len[m] += len[n]; } else { par[m] = n; len[n] += len[m]; } if (rank[n] == rank[m]) rank[n]++; }; bool same(int n, int m) { return find(n) == find(m); }; int length(int n) { return len[find(n)]; } private: vect par; vect rank; vect len; }; class seg_tree { public: seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = node[2 * i + 1] + node[2 * i + 2]; }; void update(int x, lli val) { x += n - 1; node[x] = val; while (x > 0) { x = (x - 1) / 2; node[x] = node[2 * x + 1] + node[2 * x + 2]; } }; lli getsum(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return 0; if (a <= l && r <= b) return node[k]; return getsum(a, b, 2 * k + 1, l, (l + r) / 2) + getsum(a, b, 2 * k + 2, (l + r) / 2, r); }; private: int n; vect node; }; class lazy_seg_tree { public: lazy_seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1, inf); lazy.resize(n * 2 - 1, inf); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = min(node[2 * i + 1], node[2 * i + 2]); }; void eval(int k, int l, int r) { if (lazy[k] != inf) { node[k] = min(node[k], lazy[k]); if (r - l > 1) { lazy[2 * k + 1] = min(lazy[2 * k + 1], lazy[k]); lazy[2 * k + 2] = min(lazy[2 * k + 1], lazy[k]); } lazy[k] = inf; } }; void update(int a, int b, lli x, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; eval(k, l, r); if (b <= l || r <= a) return; if (a <= l && r <= b) { lazy[k] = min(lazy[k], x); eval(k, l, r); } else { update(a, b, x, 2 * k + 1, l, (l + r) / 2); update(a, b, x, 2 * k + 2, (l + r) / 2, r); node[k] = min(node[2 * k + 1], node[2 * k + 2]); } }; lli getmin(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return inf; eval(k, l, r); if (a <= l && r <= b) return node[k]; return min(getmin(a, b, 2 * k + 1, l, (l + r) / 2), getmin(a, b, 2 * k + 2, (l + r) / 2, r)); }; private: int n; vect node, lazy; }; template<class T> vector<pair<T, int>> rle(vector<T> vec) { vector<pair<T, int>> ans; ans.emplace_back(vec.front(), 1); for (int i = 1; i < vec.size(); i++) { if (vec[i] == ans.back().first) ans.back().second++; else ans.emplace_back(vec[i], 1); } return ans; } vect cum_sum(vect v) { vect ans(v.size() + 1); rep(i, v.size()) ans[i + 1] = ans[i] + v[i]; return ans; } vecvec cum_sum_2d(vecvec v) { vecvec ans(v.size() + 1, vect(v[0].size() + 1)); rep(i, v.size()) rep(j, v[0].size()) ans[i + 1][j + 1] = ans[i + 1][j] + ans[i][j + 1] - ans[i][j] + v[i][j]; return ans; } vector<bool> eratosthenes(int n) { vector<bool> ans(n + 1, 1); ans[1] = 0; for (int i = 2; i * i <= n; i++) { if (ans[i] == 0) continue; for (int j = i; i * j <= n; j++) ans[i * j] = 0; } return ans; } bool prime(int n) { for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; } vector<ipair> fact(int n) { vector<ipair> ans; auto era = eratosthenes(floor(sqrt(n))); for (int i = 2; i * i <= n; i++) { if (era[i] == 0) continue; if (n % i == 0) { ans.emplace_back(i, 1); n /= i; } while (n % i == 0) { ans.back().second++; n /= i; } } if (n != 1) ans.emplace_back(n, 1); return ans; } lli gcd(lli a, lli b) { if (a < b) swap(a, b); if (b == 0) return a; return gcd(b, a % b); } #define lcm(a, b) (a) / gcd((a), (b)) * (b) lli s[100000], t[100000]; int main() { int a, b; cin >> a >> b; cout << (a * b % 3 == 1 ? "Impossible" : "Possible") << endl; } #include <list> #include <regex> using namespace std; #define rep(i, n) for (lli i = 0; i < (n); i++) #define all(obj) (obj).begin(), (obj).end() #define m_p make_pair #define rond(a, b) ((a) + (b) - 1) / (b) using lli = long long; using vect = vector<lli>; using vecvec = vector<vect>; using ipair = pair<lli, lli>; using p_q = priority_queue<lli>; constexpr lli inf = 1e15; constexpr lli mod = 1e9 + 7; int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; class unionfind { public: int size; unionfind(int n) { size = n; for (int i = 0; i < n; i++) { par.push_back(i); rank.push_back(0); len.push_back(1); } }; int find(int n) { if (par[n] == n) return n; else return par[n] = find(par[n]); }; void unite(int n, int m) { n = find(n); m = find(m); if (n == m) return; size--; if (rank[n] < rank[m]) { par[n] = m; len[m] += len[n]; } else { par[m] = n; len[n] += len[m]; } if (rank[n] == rank[m]) rank[n]++; }; bool same(int n, int m) { return find(n) == find(m); }; int length(int n) { return len[find(n)]; } private: vect par; vect rank; vect len; }; class seg_tree { public: seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = node[2 * i + 1] + node[2 * i + 2]; }; void update(int x, lli val) { x += n - 1; node[x] = val; while (x > 0) { x = (x - 1) / 2; node[x] = node[2 * x + 1] + node[2 * x + 2]; } }; lli getsum(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return 0; if (a <= l && r <= b) return node[k]; return getsum(a, b, 2 * k + 1, l, (l + r) / 2) + getsum(a, b, 2 * k + 2, (l + r) / 2, r); }; private: int n; vect node; }; class lazy_seg_tree { public: lazy_seg_tree(vect v) { n = 1; while (n < v.size()) n *= 2; node.resize(n * 2 - 1, inf); lazy.resize(n * 2 - 1, inf); rep(i, v.size()) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = min(node[2 * i + 1], node[2 * i + 2]); }; void eval(int k, int l, int r) { if (lazy[k] != inf) { node[k] = min(node[k], lazy[k]); if (r - l > 1) { lazy[2 * k + 1] = min(lazy[2 * k + 1], lazy[k]); lazy[2 * k + 2] = min(lazy[2 * k + 1], lazy[k]); } lazy[k] = inf; } }; void update(int a, int b, lli x, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; eval(k, l, r); if (b <= l || r <= a) return; if (a <= l && r <= b) { lazy[k] = min(lazy[k], x); eval(k, l, r); } else { update(a, b, x, 2 * k + 1, l, (l + r) / 2); update(a, b, x, 2 * k + 2, (l + r) / 2, r); node[k] = min(node[2 * k + 1], node[2 * k + 2]); } }; lli getmin(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; if (r <= a || b <= l) return inf; eval(k, l, r); if (a <= l && r <= b) return node[k]; return min(getmin(a, b, 2 * k + 1, l, (l + r) / 2), getmin(a, b, 2 * k + 2, (l + r) / 2, r)); }; private: int n; vect node, lazy; }; template<class T> vector<pair<T, int>> rle(vector<T> vec) { vector<pair<T, int>> ans; ans.emplace_back(vec.front(), 1); for (int i = 1; i < vec.size(); i++) { if (vec[i] == ans.back().first) ans.back().second++; else ans.emplace_back(vec[i], 1); } return ans; } vect cum_sum(vect v) { vect ans(v.size() + 1); rep(i, v.size()) ans[i + 1] = ans[i] + v[i]; return ans; } vecvec cum_sum_2d(vecvec v) { vecvec ans(v.size() + 1, vect(v[0].size() + 1)); rep(i, v.size()) rep(j, v[0].size()) ans[i + 1][j + 1] = ans[i + 1][j] + ans[i][j + 1] - ans[i][j] + v[i][j]; return ans; } vector<bool> eratosthenes(int n) { vector<bool> ans(n + 1, 1); ans[1] = 0; for (int i = 2; i * i <= n; i++) { if (ans[i] == 0) continue; for (int j = i; i * j <= n; j++) ans[i * j] = 0; } return ans; } bool prime(int n) { for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; } vector<ipair> fact(int n) { vector<ipair> ans; auto era = eratosthenes(floor(sqrt(n))); for (int i = 2; i * i <= n; i++) { if (era[i] == 0) continue; if (n % i == 0) { ans.emplace_back(i, 1); n /= i; } while (n % i == 0) { ans.back().second++; n /= i; } } if (n != 1) ans.emplace_back(n, 1); return ans; } lli gcd(lli a, lli b) { if (a < b) swap(a, b); if (b == 0) return a; return gcd(b, a % b); } #define lcm(a, b) (a) / gcd((a), (b)) * (b) lli s[100000], t[100000]; int main() { int a, b; cin >> a >> b; cout << (a * b % 3 == 2 ? "Impossible" : "Possible") << endl; }
a.cc:16:19: warning: extra tokens at end of #include directive 16 | #include <iomanip>#define _USE_MATH_DEFINES | ^ a.cc:264:15: error: redefinition of 'constexpr const lli inf' 264 | constexpr lli inf = 1e15; | ^~~ a.cc:44:15: note: 'constexpr const lli inf' previously defined here 44 | constexpr lli inf = 1e15; | ^~~ a.cc:265:15: error: redefinition of 'constexpr const lli mod' 265 | constexpr lli mod = 1e9 + 7; | ^~~ a.cc:45:15: note: 'constexpr const lli mod' previously defined here 45 | constexpr lli mod = 1e9 + 7; | ^~~ a.cc:266:5: error: redefinition of 'int dx [4]' 266 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:46:5: note: 'int dx [4]' previously defined here 46 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:266:27: error: redefinition of 'int dy [4]' 266 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:46:27: note: 'int dy [4]' previously defined here 46 | int dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }; | ^~ a.cc:268:7: error: redefinition of 'class unionfind' 268 | class unionfind | ^~~~~~~~~ a.cc:48:7: note: previous definition of 'class unionfind' 48 | class unionfind | ^~~~~~~~~ a.cc:315:7: error: redefinition of 'class seg_tree' 315 | class seg_tree | ^~~~~~~~ a.cc:95:7: note: previous definition of 'class seg_tree' 95 | class seg_tree | ^~~~~~~~ a.cc:344:7: error: redefinition of 'class lazy_seg_tree' 344 | class lazy_seg_tree | ^~~~~~~~~~~~~ a.cc:124:7: note: previous definition of 'class lazy_seg_tree' 124 | class lazy_seg_tree | ^~~~~~~~~~~~~ a.cc:392:22: error: redefinition of 'template<class T> std::vector<std::pair<_BiIter, int> > rle(std::vector<_Tp>)' 392 | vector<pair<T, int>> rle(vector<T> vec) { | ^~~ a.cc:172:22: note: 'template<class T> std::vector<std::pair<_BiIter, int> > rle(std::vector<_Tp>)' previously declared here 172 | vector<pair<T, int>> rle(vector<T> vec) { | ^~~ a.cc:404:6: error: redefinition of 'vect cum_sum(vect)' 404 | vect cum_sum(vect v) { | ^~~~~~~ a.cc:184:6: note: 'vect cum_sum(vect)' previously defined here 184 | vect cum_sum(vect v) { | ^~~~~~~ a.cc:411:8: error: redefinition of 'vecvec cum_sum_2d(vecvec)' 411 | vecvec cum_sum_2d(vecvec v) { | ^~~~~~~~~~ a.cc:191:8: note: 'vecvec cum_sum_2d(vecvec)' previously defined here 191 | vecvec cum_sum_2d(vecvec v) { | ^~~~~~~~~~ a.cc:419:14: error: redefinition of 'std::vector<bool> eratosthenes(int)' 419 | vector<bool> eratosthenes(int n) { | ^~~~~~~~~~~~ a.cc:199:14: note: 'std::vector<bool> eratosthenes(int)' previously defined here 199 | vector<bool> eratosthenes(int n) { | ^~~~~~~~~~~~ a.cc:430:6: error: redefinition of 'bool prime(int)' 430 | bool prime(int n) { | ^~~~~ a.cc:210:6: note: 'bool prime(int)' previously defined here 210 | bool prime(int n) { | ^~~~~ a.cc:437:15: error: redefinition of 'std::vector<std::pair<long long int, long long int> > fact(int)' 437 | vector<ipair> fact(int n) { | ^~~~ a.cc:217:15: note: 'std::vector<std::pair<long long int, long long int> > fact(int)' previously defined here 217 | vector<ipair> fact(int n) { | ^~~~ a.cc:456:5: error: redefinition of 'lli gcd(lli, lli)' 456 | lli gcd(lli a, lli b) { | ^~~ a.cc:236:5: note: 'lli gcd(lli, lli)' previously defined here 236 | lli gcd(lli a, lli b) { | ^~~ a.cc:465:5: error: redefinition of 'lli s [100000]' 465 | lli s[100000], t[100000]; | ^ a.cc:245:5: note: 'lli s [100000]' previously declared here 245 | lli s[100000], t[100000]; | ^ a.cc:465:16: error: redefinition of 'lli t [100000]' 465 | lli s[100000], t[100000]; | ^ a.cc:245:16: note: 'lli t [100000]' previously declared here 245 | lli s[100000], t[100000]; | ^ a.cc:467:5: error: redefinition of 'int main()' 467 | int main() { | ^~~~ a.cc:247:5: note: 'int main()' previously defined here 247 | int main() { | ^~~~
s557314172
p03657
C++
#include <iostream> #include<vector> #include<algorithm> #include<string> #include<map> #include<set> #include<stack> #include<queue> #include<math.h> using namespace std; typedef long long ll; #define int long long typedef vector<int> VI; #define fore(i,a) for(auto &i:a) #define REP(i,n) for(int i=0;i<n;i++) #define eREP(i,n) for(int i=0;i<=n;i++) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define eFOR(i,a,b) for(int i=(a);i<=(b);++i) #define SORT(c) sort((c).begin(),(c).end()) #define rSORT(c) sort((c).rbegin(),(c).rend()) #define LB(x,a) lower_bound((x).begin(),(x).end(),(a)) #define UB(x,a) upper_bound((x).begin(),(x).end(),(a)) #define INF 1000000000 #define LLINF 9223372036854775807 #define mod 1000000007 //vector<vector<int> > dp; //vector<vector<vector<int> > > vvvi; //dp=vector<vector<int> >(N, vector<int>(M,0)); //vector<pair<int,int> > v; //v.push_back(make_pair(x,y)); signed main(){ cin.tie(0); ios::sync_with_stdio(false); int x, y ,z; cin >> x >> y>>z; if (!A % 3 || !B % 3 || !(A + B) % 3) cout << "Possible" << endl; else cout << "Impossible" << endl; return 0; }
a.cc: In function 'int main()': a.cc:43:14: error: 'A' was not declared in this scope 43 | if (!A % 3 || !B % 3 || !(A + B) % 3) | ^ a.cc:43:24: error: 'B' was not declared in this scope 43 | if (!A % 3 || !B % 3 || !(A + B) % 3) | ^
s952258415
p03657
C++
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b>>endl; if(a%3==0||b%3==0||(a+b)%3==0)cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; }
a.cc: In function 'int main()': a.cc:5:12: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 5 | cin>>a>>b>>endl; | ~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); | ~~~~~