submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s461851557
p03657
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.StringTokenizer; import Main339A.IOUtils; /** * Built using CHelper plug-in Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; IOUtils in = new IOUtils(inputStream); PrintWriter out = new PrintWriter(outputStream); Solution solver = new Solution(); solver.solve(in, out); out.close(); } static class Solution { public void solve(IOUtils in, PrintWriter out) { int a = in.nextInt(); int b = in.nextInt(); int c = a + b; int goats = 3; if (a % goats == 0 || b % goats == 0 || c % goats == 0) { out.println("Possible"); } else { out.println("Impossible"); } } } static class IOUtils { private BufferedReader reader; private StringTokenizer tokenizer; public IOUtils(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream)); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } }
Main.java:9: error: package Main339A does not exist import Main339A.IOUtils; ^ 1 error
s461778039
p03657
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.StringTokenizer; /** * Built using CHelper plug-in Actual solution is at the top */ public class SharingCookies { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); Solution solver = new Solution(); solver.solve(in, out); out.close(); } static class Solution { public void solve(InputReader in, PrintWriter out) { int a = in.nextInt(); int b = in.nextInt(); int c = a + b; int goats = 3; if (a % goats == 0 || c % goats == 0 || c % goats == 0) { out.println("Possible"); } else { out.println("Impossible"); } } } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } }
Main.java:12: error: class SharingCookies is public, should be declared in a file named SharingCookies.java public class SharingCookies { ^ 1 error
s541949671
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:11:35: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 11 | cout<<"Impossible"<endl; | ~~~~~~~~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:11:36: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | cout<<"Impossible"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:11:36: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 11 | cout<<"Impossible"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:11:36: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | cout<<"Impossible"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:11:36: note: couldn't deduce template parameter '_Bi_iter' 11 | cout<<"Impossible"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:11:36: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | cout<<"Impossible"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:11:36: note: couldn't deduce template parameter '_Bi_iter' 11 | cout<<"Impossible"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:11:36: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | cout<<"Impossible"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:11:36: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 11 | cout<<"Impossible"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:11:36: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 11 | 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:11:36: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 11 | 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:11:36: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 11 | 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:11:36: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 11 | cout<<"Impossible"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:11:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 11 | 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:11:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 11 | 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:11:36: note: couldn't deduce template parameter '_CharT' 11 | 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:11:3
s802830375
p03657
C++
int main() { long N; long long sum=0; cin >> N; long long a[200001]={0}; for(int i=0;i<N;i++){ cin >> a[i]; sum += a[i]; } long long ans=10000000000; long long tmp=0; for(int k=0;k<N-1;k++){ tmp+=a[k]; ans=min(abs(sum-2*tmp),ans); } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin >> N; | ^~~ a.cc:15:21: error: 'abs' was not declared in this scope; did you mean 'ans'? 15 | ans=min(abs(sum-2*tmp),ans); | ^~~ | ans a.cc:15:17: error: 'min' was not declared in this scope; did you mean 'main'? 15 | ans=min(abs(sum-2*tmp),ans); | ^~~ | main a.cc:17:5: error: 'cout' was not declared in this scope 17 | cout << ans << endl; | ^~~~ a.cc:17:20: error: 'endl' was not declared in this scope 17 | cout << ans << endl; | ^~~~
s354586315
p03657
Java
import java.util.Scanner; class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); if ((a+b) % 3 == 0) { System.out.println("Possible"); } else if (a % 3 == 0) { System.out.println("Possible"); } else if (b % 3 == 0) { System.out.println("Possible"); } else { System.out.println("Impossible); } sc.close(); } }
Main.java:18: error: unclosed string literal System.out.println("Impossible); ^ 1 error
s231597448
p03657
Java
import java.util.Scanner; class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); if ((a+b) % 3 == 0) { System.out.println("Possible"); } else { System.out.println("Impossible"); } sc.close(); }
Main.java:17: error: reached end of file while parsing } ^ 1 error
s574610768
p03657
Java
import java.util.Scanner; public class A { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); if ((a+b) % 3 == 0) { System.out.println("Possible"); } else { System.out.println("Impossible"); } sc.close(); } }
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s353128878
p03657
C++
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; if (a % 3 == 0 || b % == 0 || (a + b) % 3 == 0) { cout << "Possible" << endl; } else cout << "Impossible" << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:26: error: expected primary-expression before '==' token 7 | if (a % 3 == 0 || b % == 0 || (a + b) % 3 == 0) | ^~
s483953727
p03657
Java
import java.util.Scanner; public class ABC067_A{ 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:3: error: class ABC067_A is public, should be declared in a file named ABC067_A.java public class ABC067_A{ ^ 1 error
s040004441
p03657
C++
#include <iostream> using namespace std; int main(){ 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:6:10: error: 'a' was not declared in this scope 6 | cin >> a >> b; | ^ a.cc:6:15: error: 'b' was not declared in this scope 6 | cin >> a >> b; | ^
s023156987
p03657
C++
#include<iosteam.h> using namspace std; int main(void) { int a,b; cin<<a<<b; if((a+b)%3==0) cout>>"Possible">>endl; else if((a+b)%3!=0) cout>>"Impossible">>endl; return 0; }
a.cc:1:9: fatal error: iosteam.h: No such file or directory 1 | #include<iosteam.h> | ^~~~~~~~~~~ compilation terminated.
s065433020
p03657
C
#include<iostream> using namespace std; int main(void) { int a,b; cin>>a>>b; if((a+b)%3==0) cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s598877358
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()) | ^
s253576456
p03657
C++
#include<cmath> #include<math.h> #include<ctype.h> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #include<cerrno> #include<cfloat> #include<ciso646> #include<climits> #include<clocale> #include<complex> #include<csetjmp> #include<csignal> #include<cstdarg> #include<cstddef> #include<cstdio> #include<cstdlib> #include<cstring> #include<ctime> #include<cwchar> #include<cwctype> #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> #include<string.h> #include<stdlib.h> #include<stdio.h> #include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if((a+b)%c) cout<<"Impossible"; else cout<<"Possible"; return 0; }
a.cc: In function 'int main()': a.cc:62:18: error: 'c' was not declared in this scope 62 | if((a+b)%c) | ^
s553051406
p03657
C++
A, B = list(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 = list(map(int, input().split())) | ^
s585368882
p03657
C++
//El Lool #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cmath> #include <iomanip> #include <algorithm> #include <fstream> #include <cctype> #include <string> #include <string.h> #include <vector> #include <sstream> #include <queue> #include <map> #include <set> using namespace std; #define all(v) ((v).begin()),((v).end()) #define sz(v) ((int)((v).size())) void fast() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); } string cop(vector<char>v) { string x; for (int i = 0; i < sz(v); i++) x += v[i]; return x; } int main() { fast(); int t, n, w; long long sum = 0, min = LONG_MAX; vector<long long>v; string s; t=1; while (t--) { cin >> n; for (int i = 0; i < n; i++) { cin >> w; sum += w; v.push_back(sum); } for (int i = 0; i < v.size() - 1; i++) { long long x = v[i]; long long y = sum - v[i]; if (abs(x-y) < min) min = abs(x-y); } cout << min << endl; min = LONG_MAX; v.clear(); sum = 0; } return 0; }
a.cc: In function 'int main()': a.cc:37:34: error: 'LONG_MAX' was not declared in this scope 37 | long long sum = 0, min = LONG_MAX; | ^~~~~~~~ a.cc:16:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 15 | #include <set> +++ |+#include <climits> 16 | using namespace std;
s271228012
p03657
C++
#include<cstdio> #include<iostream> #include<cmath> #include<limits.h> #define M LLONG_MAX using namespace std; long long int a[20000],x,y,zxy,min; int main(void){ int n,i,j; cin>>n; for(i=0;i<n;i++) cin>>a[i]; min=M; for(i=1;i<n;i++){ x=0; for(j=0;j<i;j++) x+=a[j]; y=0; for(j=i;j<n;j++) y+=a[j]; zxy=abs(x-y); if(min>zxy) min=zxy; } cout<<min<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: reference to 'min' is ambiguous 12 | min=M; | ^~~ In file included from /usr/include/c++/14/string:51, 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:2: /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ a.cc:7:32: note: 'long long int min' 7 | long long int a[20000],x,y,zxy,min; | ^~~ a.cc:19:20: error: reference to 'min' is ambiguous 19 | if(min>zxy) min=zxy; | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ a.cc:7:32: note: 'long long int min' 7 | long long int a[20000],x,y,zxy,min; | ^~~ a.cc:19:29: error: reference to 'min' is ambiguous 19 | if(min>zxy) min=zxy; | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ a.cc:7:32: note: 'long long int min' 7 | long long int a[20000],x,y,zxy,min; | ^~~ a.cc:21:15: error: reference to 'min' is ambiguous 21 | cout<<min<<endl; | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ a.cc:7:32: note: 'long long int min' 7 | long long int a[20000],x,y,zxy,min; | ^~~
s996687069
p03657
C++
#include<cstdio> #include<iostream> #include<algorithm> using namespace std; int main(void){ int a,b; cin>>a>>b; if((a+b)%3==0) cout<<'Possible"<<endl; else cout<<"Impossible"<<endl; return 0; }
a.cc:8:30: warning: missing terminating ' character 8 | if((a+b)%3==0) cout<<'Possible"<<endl; | ^ a.cc:8:30: error: missing terminating ' character 8 | if((a+b)%3==0) cout<<'Possible"<<endl; | ^~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:9:9: error: expected primary-expression before 'else' 9 | else cout<<"Impossible"<<endl; | ^~~~
s837956707
p03657
C++
#!/usr/bin # -*- cording: "utf-8" -*- a = input().split() a = list(map(int, a)) if (a[0] % 3 == 0) or (a[1] % 3 == 0) or ((a[0] + a[1]) % 3 == 0): print("Possible") else: print("Impossible")
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin | ^ a.cc:2:3: error: invalid preprocessing directive #- 2 | # -*- cording: "utf-8" -*- | ^ a.cc:4:1: error: 'a' does not name a type 4 | a = input().split() | ^
s646650545
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; if(a % 3 = 0){ cout << "Possible"; }else if(b % 3 = 0){ cout << "Possible"; }else if(a % 3 = 0){ cout << "Possible"; }else if((a+b) % 3 = 0){ cout << "Possible"; }else{ cout << "Impossible"; } return 0; }
a.cc: In function 'int main()': a.cc:8:8: error: lvalue required as left operand of assignment 8 | if(a % 3 = 0){ | ~~^~~ a.cc:10:14: error: lvalue required as left operand of assignment 10 | }else if(b % 3 = 0){ | ~~^~~ a.cc:12:14: error: lvalue required as left operand of assignment 12 | }else if(a % 3 = 0){ | ~~^~~ a.cc:14:18: error: lvalue required as left operand of assignment 14 | }else if((a+b) % 3 = 0){ | ~~~~~~^~~
s787287997
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) returnt cout<<"Possible"<<endl,1; return cout<<"Impossible"<<endl,1; return 0; }
a.cc: In function 'int main()': a.cc:8:6: error: 'returnt' was not declared in this scope 8 | returnt cout<<"Possible"<<endl,1; | ^~~~~~~
s683170746
p03657
C++
#include <bits/stdc++.h> usnig namespace std; int main(){ int a,b; cin>>a>>b; if(a%3==0 || b%3==0 || (a+b)%3==0) returnt cout<<"Possible"<<endl,1; return cout<<"Impossible"<<endl,1; return 0; }
a.cc:2:1: error: 'usnig' does not name a type 2 | usnig namespace std; | ^~~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | 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:8:2: error: 'returnt' was not declared in this scope 8 | returnt cout<<"Possible"<<endl,1; | ^~~~~~~ a.cc:9:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | return cout<<"Impossible"<<endl,1; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | return cout<<"Impossible"<<endl,1; | ^~~~ | 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) | ^~~~
s349989526
p03657
C++
#include<iostream> #include<vector> #include<string> #include<cmath> 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:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | cin >>a>>b; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | 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:10:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | cout <<"Possible"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | 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:12:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 12 | cout <<"Impossible"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s670201213
p03657
C++
typedef long long ll; typedef unsigned int ui; typedef unsigned long ul; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int,int> ii; typedef vector<ii> vii; const int inf = int (1e9) + int (1e5); const ll infl = ll (2e18) + ll (1e10); const ui M=1E9+7; const double eps = 1e-9; int main() { std::ios_base::sync_with_stdio (false); int n,k; cin >> n >> k; vi l(n); for (int i=0;i<n;i++) cin >> l[i]; sort(l.begin(),l.end(),greater<int>()); int s=0; for (int i=0;i<k;i++) s += l[i]; cout << s; return 0; }
a.cc:5:9: error: 'vector' does not name a type 5 | typedef vector<int> vi; | ^~~~~~ a.cc:6:9: error: 'vector' does not name a type 6 | typedef vector<vi> vvi; | ^~~~~~ a.cc:7:9: error: 'pair' does not name a type 7 | typedef pair<int,int> ii; | ^~~~ a.cc:8:9: error: 'vector' does not name a type 8 | typedef vector<ii> vii; | ^~~~~~ a.cc: In function 'int main()': a.cc:16:10: error: 'std::ios_base' has not been declared 16 | std::ios_base::sync_with_stdio (false); | ^~~~~~~~ a.cc:19:5: error: 'cin' was not declared in this scope 19 | cin >> n >> k; | ^~~ a.cc:20:5: error: 'vi' was not declared in this scope; did you mean 'ui'? 20 | vi l(n); | ^~ | ui a.cc:21:34: error: 'l' was not declared in this scope 21 | for (int i=0;i<n;i++) cin >> l[i]; | ^ a.cc:22:10: error: 'l' was not declared in this scope 22 | sort(l.begin(),l.end(),greater<int>()); | ^ a.cc:22:28: error: 'greater' was not declared in this scope 22 | sort(l.begin(),l.end(),greater<int>()); | ^~~~~~~ a.cc:22:36: error: expected primary-expression before 'int' 22 | sort(l.begin(),l.end(),greater<int>()); | ^~~ a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(l.begin(),l.end(),greater<int>()); | ^~~~ | short a.cc:25:5: error: 'cout' was not declared in this scope 25 | cout << s; | ^~~~
s201888503
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" <<endl; else { cout<< "Impossible" <<endl; } } }
a.cc: In function 'int main()': a.cc:9:1: error: expected '}' before 'else' 9 | else | ^~~~ a.cc:7:1: note: to match this '{' 7 | { | ^ a.cc: At global scope: a.cc:14:1: error: expected declaration before '}' token 14 | } | ^
s723378961
p03657
C++
#include<iostream> using namespace std;. int main(){ int a,b; cin >> a >> b; if(!(a%3&&b%3&&(a+b%3)))cout << "Possible\n"; else cout << "Impossible\n"; return 0; }
a.cc:2:21: error: expected unqualified-id before '.' token 2 | using namespace std;. | ^
s739135170
p03657
C++
#include<iostream> 2.using namespace std; 3.int main(){ 4. int a,b; 5. cin >> a >> b; 6. if(!(a%3&&b%3&&a+b%3))cout << "Possible\n"; 7. else cout << "Inpossible\n"; 8. return 0; 9.}
a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 2.using namespace std; | ^~~~~~~ a.cc:3:1: error: expected unqualified-id before numeric constant 3 | 3.int main(){ | ^~~~~
s029358805
p03657
C++
#incldue<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; if(!(a%3&&b%3&&a+b%3))cout << "Possible\n"; else cout << "Inpossible\n"; return 0; }
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include? 1 | #incldue<iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:5:2: error: 'cin' was not declared in this scope 5 | cin >> a >> b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #incldue<iostream> a.cc:6:24: error: 'cout' was not declared in this scope 6 | if(!(a%3&&b%3&&a+b%3))cout << "Possible\n"; | ^~~~ a.cc:6:24: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:7: error: 'cout' was not declared in this scope 7 | else cout << "Inpossible\n"; | ^~~~ a.cc:7:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s213244156
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<((a+b)%3) "Impossible" : "Possible")<<endl; }
a.cc: In function 'int main()': a.cc:5:24: error: expected ';' before string constant 5 | cout<<((a+b)%3) "Impossible" : "Possible")<<endl; | ^~~~~~~~~~~~~ | ;
s382062824
p03657
C++
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int a,n; 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:11:17: error: 'b' was not declared in this scope 11 | cin >> a >> b; | ^
s314797838
p03657
C++
#incclude<iostream> using namespace std; int main(){ for(;;)cout<<"w"; }
a.cc:1:2: error: invalid preprocessing directive #incclude; did you mean #include? 1 | #incclude<iostream> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:4:8: error: 'cout' was not declared in this scope 4 | for(;;)cout<<"w"; | ^~~~ a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #incclude<iostream>
s810630966
p03657
C
#include<stdio.h> int main(){ int a,b; scanf(“%d %d”,&a,&b); if((a%3)!0 and (b%3)!0 and ((a+b)%3)!0){ printf("Impossible"); }else{ printf("Possible"); } }
main.c: In function 'main': main.c:7:7: error: stray '\342' in program 7 | scanf(<U+201C>%d %d<U+201D>,&a,&b); | ^~~~~~~~ main.c:7:8: error: expected expression before '%' token 7 | scanf(“%d %d”,&a,&b); | ^ main.c:7:13: error: stray '\342' in program 7 | scanf(<U+201C>%d %d<U+201D>,&a,&b); | ^~~~~~~~ main.c:9:9: error: expected ')' before '!' token 9 | if((a%3)!0 and (b%3)!0 and ((a+b)%3)!0){ | ~ ^ | )
s296698694
p03657
C
#include<stdio.h> int main(){ int a,b; scanf(“%d %d”,&a,&b); a = (a/3)% b = (b/3)% if(a!0){ pointf("Inpossible") }else if(b!0){ pointf("Inpossible") }else if((a+b)/3%!0){ pointf("Inpossible") }else{ pointf("possible") } }
main.c: In function 'main': main.c:7:7: error: stray '\342' in program 7 | scanf(<U+201C>%d %d<U+201D>,&a,&b); | ^~~~~~~~ main.c:7:8: error: expected expression before '%' token 7 | scanf(“%d %d”,&a,&b); | ^ main.c:7:13: error: stray '\342' in program 7 | scanf(<U+201C>%d %d<U+201D>,&a,&b); | ^~~~~~~~ main.c:12:1: error: expected expression before 'if' 12 | if(a!0){ | ^~
s939400309
p03657
C++
#include<stdio.h> int main(){ int a,b; scanf(“%d %d”,&a,&b); a = (a/3)% b = (b/3)% if(a!0){ pointf("Inpossible") }else if(b!0){ pointf("Inpossible") }else if((a+b)/3%!0){ pointf("Inpossible") }else{ pointf("possible") } }
a.cc:7:7: error: extended character “ is not valid in an identifier 7 | scanf(“%d %d”,&a,&b); | ^ a.cc:7:12: error: extended character ” is not valid in an identifier 7 | scanf(“%d %d”,&a,&b); | ^ a.cc: In function 'int main()': a.cc:7:7: error: '\U0000201c' was not declared in this scope 7 | scanf(“%d %d”,&a,&b); | ^ a.cc:7:9: error: 'd' was not declared in this scope 7 | scanf(“%d %d”,&a,&b); | ^ a.cc:7:12: error: 'd\U0000201d' was not declared in this scope 7 | scanf(“%d %d”,&a,&b); | ^~ a.cc:12:1: error: expected primary-expression before 'if' 12 | if(a!0){ | ^~ a.cc:14:2: error: 'else' without a previous 'if' 14 | }else if(b!0){ | ^~~~ a.cc:14:11: error: expected ')' before '!' token 14 | }else if(b!0){ | ~ ^ | ) a.cc:15:5: error: 'pointf' was not declared in this scope; did you mean 'printf'? 15 | pointf("Inpossible") | ^~~~~~ | printf a.cc:17:5: error: 'pointf' was not declared in this scope; did you mean 'printf'? 17 | pointf("Inpossible") | ^~~~~~ | printf a.cc:19:5: error: 'pointf' was not declared in this scope; did you mean 'printf'? 19 | pointf("possible") | ^~~~~~ | printf
s252931109
p03657
C++
#include<stdio.h> int main(){ int a,b; scanf(“%d,%d”,&a,&b); a = (a/3)% b = (b/3)% if(a!0){ pointf("Inpossible") }else if(b!0){ pointf("Inpossible") }else if((a+b)/3%!0){ pointf("Inpossible") }else{ pointf("possible") } }
a.cc:7:7: error: extended character “ is not valid in an identifier 7 | scanf(“%d,%d”,&a,&b); | ^ a.cc:7:12: error: extended character ” is not valid in an identifier 7 | scanf(“%d,%d”,&a,&b); | ^ a.cc: In function 'int main()': a.cc:7:7: error: '\U0000201c' was not declared in this scope 7 | scanf(“%d,%d”,&a,&b); | ^ a.cc:7:9: error: 'd' was not declared in this scope 7 | scanf(“%d,%d”,&a,&b); | ^ a.cc:7:11: error: expected primary-expression before '%' token 7 | scanf(“%d,%d”,&a,&b); | ^ a.cc:7:12: error: 'd\U0000201d' was not declared in this scope 7 | scanf(“%d,%d”,&a,&b); | ^~ a.cc:12:1: error: expected primary-expression before 'if' 12 | if(a!0){ | ^~ a.cc:14:2: error: 'else' without a previous 'if' 14 | }else if(b!0){ | ^~~~ a.cc:14:11: error: expected ')' before '!' token 14 | }else if(b!0){ | ~ ^ | ) a.cc:15:5: error: 'pointf' was not declared in this scope; did you mean 'printf'? 15 | pointf("Inpossible") | ^~~~~~ | printf a.cc:17:5: error: 'pointf' was not declared in this scope; did you mean 'printf'? 17 | pointf("Inpossible") | ^~~~~~ | printf a.cc:19:5: error: 'pointf' was not declared in this scope; did you mean 'printf'? 19 | pointf("possible") | ^~~~~~ | printf
s645152028
p03657
C++
#include<iostream> #include<vector> #include<cmath> #include<algorithm> using namespace std; int main(){ int N, long long su_sum, ta_sum; cin >> N; vector<long long> a(N), dif(N-1); for(int i = 0; i < N; i++) cin >> a[i]; /*/ すぬけの引く数を1〜Nまで変化させて、そのときのx-yを記録 記録した配列をソートして、最小値を出力 /*/ //1〜Nまで変化させるループ(iで進める) for(int i = 0; i < N-1; i++){ su_sum = 0; ta_sum = 0; //すぬけの合計値(0~iまで)を求めるためのループ for(int j = 0; j < i+1; j++){ su_sum += a[j]; } //たぬきの合計値(i+1 ~ N-1まで)を求めるループ for(int j = i+1; j < N; j++){ ta_sum += a[j]; } //x-yを格納 dif[i] = abs(su_sum - ta_sum); } sort(dif.begin(),dif.end()); cout << dif[0] << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: expected unqualified-id before 'long' 9 | long long su_sum, ta_sum; | ^~~~ a.cc:22:5: error: 'su_sum' was not declared in this scope 22 | su_sum = 0; | ^~~~~~ a.cc:23:5: error: 'ta_sum' was not declared in this scope 23 | ta_sum = 0; | ^~~~~~
s485352430
p03657
C++
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<n;i++) using namespace std; int main(){ puts("Hello,world!") }
a.cc: In function 'int main()': a.cc:6:29: error: expected ';' before '}' token 6 | puts("Hello,world!") | ^ | ; 7 | } | ~
s147024442
p03657
Java
import java.io.*; import java.util.*; import java.lang.*; public class Main { public static void main(String[] args) throws Exception { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { br.lines() .map(line -> Arrays.stream(line.split(" ")) .mapToInt(Integer::parseInt) .toArray()) .forEach(tokens -> { int a = toknes[0]; int b = toknes[1]; if((a%3)||(b%3)||((a+b)%3))System.out.println("Possible"); else System.out.println("Impossible"); }); } } }
Main.java:12: error: cannot find symbol int a = toknes[0]; ^ symbol: variable toknes location: class Main Main.java:13: error: cannot find symbol int b = toknes[1]; ^ symbol: variable toknes location: class Main Main.java:14: error: bad operand types for binary operator '||' if((a%3)||(b%3)||((a+b)%3))System.out.println("Possible"); ^ first type: int second type: int 3 errors
s339410755
p03657
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { br.lines() .map(line -> Arrays.stream(line.split(" ")) .mapToInt(Integer::parseInt) .toArray()) .forEach(tokens -> { int a = toknes[0]; int b = toknes[1]; if((a%3)||(b%3)||((a+b)%3))System.out.println("Possible"); else System.out.println("Impossible"); }); } } }
Main.java:12: error: cannot find symbol int a = toknes[0]; ^ symbol: variable toknes location: class Main Main.java:13: error: cannot find symbol int b = toknes[1]; ^ symbol: variable toknes location: class Main Main.java:14: error: bad operand types for binary operator '||' if((a%3)||(b%3)||((a+b)%3))System.out.println("Possible"); ^ first type: int second type: int 3 errors
s335429805
p03657
Java
public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); if (a % 3 == 0 || (a + b) % 3 == 0){ System.out.println("Possible"); } else { System.out.println("Impossible"); } } }
Main.java:3: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s465461070
p03657
Java
package kz.alikdemon.atcoder.ABC067; import java.util.Scanner; public class A { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); if (a % 3 == 0 || (a + b) % 3 == 0){ System.out.println("Possible"); } else { System.out.println("Impossible"); } } }
Main.java:5: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s785345795
p03657
Java
public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); if (a % 3 == 0 || (a + b) % 3 == 0){ System.out.println("Possible"); } else { System.out.println("Impossible"); } }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s156544424
p03657
Java
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); if (a % 3 == 0 || (a + b) % 3 == 0){ System.out.println("Possible"); } else { System.out.println("Impossible"); } } }
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s019420416
p03657
Java
public class A { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); if (a % 3 == 0 || (a + b) % 3 == 0){ System.out.println("Possible"); } else { System.out.println("Impossible"); } } }
Main.java:1: error: class A is public, should be declared in a file named A.java public class A { ^ Main.java:3: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class A Main.java:3: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class A 3 errors
s226418644
p03657
C++
#include <cstdio> #include <iostream> using namespace std; vector<int> v; #define pb push_back int main() { int N; cin >> N; for(int i = 0; i < N; i++) cin >> v[i]; int min = 2e5; for(int i = 1; i < N; i++) { if(abs(v[i] - v[i-1]) < min) min = abs(v[i] - v[i-1]; } cout << min << endl; }
a.cc:6:1: error: 'vector' does not name a type 6 | vector<int> v; | ^~~~~~ a.cc: In function 'int main()': a.cc:13:43: error: 'v' was not declared in this scope 13 | for(int i = 0; i < N; i++) cin >> v[i]; | ^ a.cc:19:24: error: 'v' was not declared in this scope 19 | if(abs(v[i] - v[i-1]) < min) min = abs(v[i] - v[i-1]; | ^
s828175090
p03657
C++
include<iostream> using namespace std; int main() { int A,B; cin>>A>>B; if((!(A%2))||(!(B%2))||(!(A+B)%2)) cout<<"Possible"; else cout<<"Impossible" return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin>>A>>B; | ^~~ a.cc:9:1: error: 'cout' was not declared in this scope 9 | cout<<"Possible"; | ^~~~ a.cc:12:1: error: 'cout' was not declared in this scope 12 | cout<<"Impossible" | ^~~~
s624561318
p03657
Java
import java.util.Scanner; public class sample01 { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); if ((a + b) % 3 == 0) { System.out.println("Possible"); }else System.out.println("Impossible"); } }
Main.java:2: error: class sample01 is public, should be declared in a file named sample01.java public class sample01 { ^ 1 error
s151868217
p03657
Java
Public class Main{ void main(String args[]){ String input = br.readLine(); } }
Main.java:1: error: class, interface, enum, or record expected Public class Main{ ^ 1 error
s494748134
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, n, m, h; n = a + b; m = n + a; h = n + b if( n % 3 == 0 ) cout << "Possible" << endl; else if( a % 3 == 0) cout << "Possible" << endl; else if( b % 3 == 0) cout << "Possible" << endl; else if( m % 3 == 0) cout << "Possible" << endl; else if( h % 3 == 0) cout << "Possible" << endl; else cout << "Impossible" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:18: error: expected ';' before 'if' 9 | h = n + b | ^ | ; 10 | 11 | if( n % 3 == 0 ) | ~~ a.cc:14:9: error: 'else' without a previous 'if' 14 | else if( a % 3 == 0) | ^~~~
s936582186
p03657
C++
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c, d, e, f; cin >> a >> b; c = a + b; d = c % 3; e = a % 3; f = b % 3; if(d == 0)cout << "#include<bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b; c = a + b; d = c % 3; if(d == 0)cout << "Possible" << endl; else if(e == 0)cout << "Possible" << endl; else if(f == 0)cout << "Possible" << endl; else cout << "Impossible" << endl; return 0; }
a.cc:11:19: warning: missing terminating " character 11 | if(d == 0)cout << "#include<bits/stdc++.h> | ^ a.cc:11:19: error: missing terminating " character 11 | if(d == 0)cout << "#include<bits/stdc++.h> | ^~~~~~~~~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:12:1: error: expected primary-expression before 'using' 12 | using namespace std; | ^~~~~ a.cc:13:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 13 | int main() | ^~ a.cc:13:9: note: remove parentheses to default-initialize a variable 13 | int main() | ^~ | -- a.cc:13:9: note: or replace parentheses with braces to value-initialize a variable a.cc:14:1: error: a function-definition is not allowed here before '{' token 14 | { | ^ a.cc:24:2: error: expected '}' at end of input 24 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s156960248
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, n; n = a + b if( n % 3 == 0 ) cout << "Possible" << endl; else if( a % 3 == 0) cout << "Possible" << endl; else if( b % 3 == 0) cout << "Possible" << endl; else cout << "Impossible" << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:18: error: expected ';' before 'if' 7 | n = a + b | ^ | ; 8 | 9 | if( n % 3 == 0 ) | ~~ a.cc:12:9: error: 'else' without a previous 'if' 12 | else if( a % 3 == 0) | ^~~~
s491090525
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ double a, b, n; n = a + b if( n % 3 = 0 ) cout << "Possible" << endl; else cout << "Impossible" << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:18: error: expected ';' before 'if' 7 | n = a + b | ^ | ; 8 | 9 | if( n % 3 = 0 ) | ~~ a.cc:12:9: error: 'else' without a previous 'if' 12 | else | ^~~~
s973273594
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int j,i; if(j+i/3 %= 0)cout << "Possible" << endl; else cout << "Impossible" << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:18: warning: division by zero [-Wdiv-by-zero] 6 | if(j+i/3 %= 0)cout << "Possible" << endl; | ~~~~~~^~~~ a.cc:6:13: error: lvalue required as left operand of assignment 6 | if(j+i/3 %= 0)cout << "Possible" << endl; | ~^~~~
s941254601
p03657
C
#include <stdio.h> int main(void) { int a, b; scanf("%d%d", &a, &b); if((a+b)%3 == 0){ printf("Possible\n"); }else{ printf("Impossible\n"); } return 0;
main.c: In function 'main': main.c:12:1: error: expected declaration or statement at end of input 12 | return 0; | ^~~~~~
s349479187
p03657
C
#include <stdio.h> int main(void) { int a, b; scanf("%d", &a); scanf("%d", &b); if((a+b)%3 == 0){ printf("Possible\n"); }else{ printf("Impossible\n"); } return 0;
main.c: In function 'main': main.c:13:1: error: expected declaration or statement at end of input 13 | return 0; | ^~~~~~
s933457957
p03657
C
#include <stdio.h> int main(void) { int a, b; scanf("%d %d ", &a, &b); if((a+b)%3 == 0){ printf("Possible\n"); }else{ printf("Impossible\n"); } return 0;
main.c: In function 'main': main.c:12:1: error: expected declaration or statement at end of input 12 | return 0; | ^~~~~~
s159996866
p03657
C++
#include <string> #include <iostream> #include <vector> #include <sstream> #include <set> #include <map> #include <limits> #include <algorithm> #include <numeric> using namespace std; struct DDMY{ ostringstream o; template<class T>DDMY& operator,(const T &t){o<<t<<",";return *this;} string operator*(){ return o.str().substr(0,o.str().size()-1); } }; #define debug(args...) cout<<"("#args")=("<< *(DDMY(),args)<<") (L"<<__LINE__<<")"<<endl template<class T> std::ostream &operator<<(std::ostream &o,const std::vector<T> &v) { o << "["; for(std::size_t i=0;i<v.size();i++) o << v[i] << (i < v.size()-1 ? ",":""); return o << "]"; } template<class T,class U> std::ostream &operator<<(std::ostream &o,const std::pair<T,U> &v) { return o << v.first << ":" << v.second; } template<class T,class U> std::ostream &operator<<(std::ostream &o,const std::map<T,U> &v) { o << "{"; typename std::map<T,U>::const_iterator i=v.begin(),j=i;++j;for(;i!=v.end();++i,++j) o << *i << (j!=v.end()? ",":""); return o << "}"; } template<class T> std::ostream &operator<<(std::ostream &o,const std::set<T> &v) { o << "{"; typename std::set<T>::const_iterator i=v.begin(),j=i;++j;for(;i!=v.end();++i,++j) o << *i << (j!=v.end()? ",":""); return o << "}"; } string__main(int a, int b){ if(a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0){ return "Possible" }else{ return "Impossible" } } int main(int argc, char *argv[]) { string line; getline(cin, line); int a = 0; int b = 0; istringstream iss(line); iss >> a; iss >> b; cout << _main(a, b) << endl; return 0; }
a.cc:25:1: error: ISO C++ forbids declaration of 'string__main' with no type [-fpermissive] 25 | string__main(int a, int b){ | ^~~~~~~~~~~~ a.cc: In function 'int string__main(int, int)': a.cc:27:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 27 | return "Possible" | ^~~~~~~~~~ | | | const char* a.cc:27:22: error: expected ';' before '}' token 27 | return "Possible" | ^ | ; 28 | }else{ | ~ a.cc:29:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 29 | return "Impossible" | ^~~~~~~~~~~~ | | | const char* a.cc:29:24: error: expected ';' before '}' token 29 | return "Impossible" | ^ | ; 30 | } | ~ a.cc: In function 'int main(int, char**)': a.cc:43:11: error: '_main' was not declared in this scope; did you mean 'main'? 43 | cout << _main(a, b) << endl; | ^~~~~ | main
s891032846
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b ; int c[a] = {0}; for(int i = 0;i < a;i++){ cin >> c[i]; } sort(c.end(), c.begin()); cout << c[0]+c[1]+c[2] << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:12: error: request for member 'end' in 'c', which is of non-class type 'int [a]' 12 | sort(c.end(), c.begin()); | ^~~ a.cc:12:21: error: request for member 'begin' in 'c', which is of non-class type 'int [a]' 12 | sort(c.end(), c.begin()); | ^~~~~
s520951752
p03657
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b ; int c[a] = {0}; for(int i = 0;i < a;i++){ cin << c[i]; } sort(c.end(), c.begin()); cout << c[0]+c[1]+c[2] << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 10 | cin << c[i]; | ~~~ ^~ ~~~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:10:13: note: candidate: 'operator<<(int, int)' (built-in) 10 | cin << c[i]; | ~~~~^~~~~~~ a.cc:10:13: 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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ 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:10:9: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 10 | cin << c[i]; | ^~~ 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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ /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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ /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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ 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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ 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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ 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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ /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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ /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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 10 | cin << c[i]; | ^ /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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 10 | cin << c[i]; | ^ /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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 10 | cin << c[i]; | ^ /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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ 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:10:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin << c[i]; | ^ /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:10:19: note:
s859751796
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:8:21: error: lvalue required as left operand of assignment 8 | if (a%3=0||b%3=0||(a+b)%3=0){ | ~^~~~~~~~~
s239919993
p03657
C++
#include<iostream> using namespace std; int main() { int N,K; cin >> A >> B; int C=A+B; if (C%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:6:8: error: 'A' was not declared in this scope 6 | cin >> A >> B; | ^ a.cc:6:13: error: 'B' was not declared in this scope 6 | cin >> A >> B; | ^
s533188841
p03657
C++
#include<iostream> using namespace std; int main() { int N,K; cin >> N >> ; int C=A+B; if (C%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:6:13: error: expected primary-expression before ';' token 6 | cin >> N >> ; | ^ a.cc:7:7: error: 'A' was not declared in this scope 7 | int C=A+B; | ^ a.cc:7:9: error: 'B' was not declared in this scope 7 | int C=A+B; | ^
s093352656
p03657
C++
#inclide<iostream> #inclide<algorithm> using namespace std; int main(){ int n,k,ans; cin>>n>>k; int l[50]; for(int i=0;i<n;i++){ cin>>l[i]; } sort(l,l+n); for(int j=n-k;j<n;j++){ ans=ans+l[j]; } cout<<ans<<endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #inclide; did you mean #include? 1 | #inclide<iostream> | ^~~~~~~ | include a.cc:2:2: error: invalid preprocessing directive #inclide; did you mean #include? 2 | #inclide<algorithm> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:7:1: error: 'cin' was not declared in this scope 7 | cin>>n>>k; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #inclide<iostream> a.cc:12:1: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(l,l+n); | ^~~~ | short a.cc:16:1: error: 'cout' was not declared in this scope 16 | cout<<ans<<endl; | ^~~~ a.cc:16:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:16:12: error: 'endl' was not declared in this scope 16 | cout<<ans<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #inclide<iostream>
s503137453
p03657
Java
import java.util.*; import java.util.ArrayList; import java.util.Collections; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); ArrayList<int> ar = new ArrayList<>(); for(int i = 0; i < n; i++){ ar.add(sc.nextInt()); } Collections.sort(ar); int ret = 0; for (int i = 0; i < k ; i++){ ret += (Integer)ar.get(ar.size()-i); } System.out.println(ret); } }
Main.java:10: error: unexpected type ArrayList<int> ar = new ArrayList<>(); ^ required: reference found: int 1 error
s392739485
p03657
Java
import java.io.*; import java.util.*; public class A_SharingCookies { static class Question { int A, B; public void main(FastScanner in, PrintWriter out) { A = in.nextInt(); B = in.nextInt(); int sum = A + B; if (sum == 0 || sum % 3 != 0) out.println("Impossible"); else out.println("Possible"); } public void p(Object o) { System.out.print(o); } public void pl(Object o) { System.out.println(o); } public void arp(int[] o) { pl( Arrays.toString(o) ); } public void arpp(int[][] o) { for (int i = 0; i < o.length; i++) { for (int j = 0; j < o[0].length; j++) p( o[i][j] + " " ); pl(""); } } } public static void main(String[] args) throws Exception { InputStream inputStream = System.in; OutputStream outputStream = System.out; FastScanner in = new FastScanner(inputStream); PrintWriter out = new PrintWriter(outputStream); Question q = new Question(); q.main(in, out); out.close(); in.close(); } static class FastScanner { BufferedReader br; StringTokenizer st; public FastScanner(InputStream in) { br = new BufferedReader(new InputStreamReader(in)); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } public void close() throws IOException { br.close(); } } }
Main.java:4: error: class A_SharingCookies is public, should be declared in a file named A_SharingCookies.java public class A_SharingCookies { ^ 1 error
s640841549
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" << endl; } else { cout << "Impossible" << endl; } }
a.cc: In function 'int main()': a.cc:11:17: error: lvalue required as left operand of assignment 11 | if(a % 3 == 0 || b % 3 = 0 || (a +b) % 3 || 0){ | ~~~~~~~~~~~^~~~~~~~
s298492213
p03657
C++
#include <iostream> using namespace std; //↑デフォルト文 int main(){ int a, b; cin >> a >> b; if(a % 3 == 0 || b % 3 = 0 || c % 3 || 0){ cout << "Possible" << endl; } else { cout << "Impossible" << endl; } }
a.cc: In function 'int main()': a.cc:11:33: error: 'c' was not declared in this scope 11 | if(a % 3 == 0 || b % 3 = 0 || c % 3 || 0){ | ^
s869790309
p03657
Java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.io.IOException; import java.io.BufferedReader; import java.io.Reader; import java.io.InputStreamReader; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author tanzaku */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; MyInput in = new MyInput(inputStream); PrintWriter out = new PrintWriter(outputStream); TaskA solver = new TaskA(); solver.solve(1, in, out); out.close(); } static class TaskA { public void solve(int testNumber, MyInput in, PrintWriter out) throws IOException { int n = in.nextInt(); int m = in.nextInt(); out.println(n % 3 == 0 || m % 3 == 0 || (n + m) % 3 == 0 ? "Possible" : "Impossible"); } } static class MyInput { private final BufferedReader in; private static int pos; private static int readLen; private static final char[] buffer = new char[1024 * 8]; private static char[] str = new char[500 * 8 * 2]; private static boolean[] isDigit = new boolean[256]; private static boolean[] isSpace = new boolean[256]; private static boolean[] isLineSep = new boolean[256]; static { for (int i = 0; i < 10; i++) { isDigit['0' + i] = true; } isDigit['-'] = true; isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true; isLineSep['\r'] = isLineSep['\n'] = true; } public MyInput(InputStream is) { in = new BufferedReader(new InputStreamReader(is)); } public int read() throws IOException { if (pos >= readLen) { pos = 0; readLen = in.read(buffer); if (readLen <= 0) { throw new MyInput.EndOfFileRuntimeException(); } } return buffer[pos++]; } public int nextInt() throws IOException { int len = 0; str[len++] = nextChar(); len = reads(len, isSpace); int i = 0; int ret = 0; if (str[0] == '-') { i = 1; } for (; i < len; i++) ret = ret * 10 + str[i] - '0'; if (str[0] == '-') { ret = -ret; } return ret; } public char nextChar() throws IOException { while (true) { final int c = read(); if (!isSpace[c]) { return (char) c; } } } int reads(int len, boolean[] accept) throws IOException { try { while (true) { final int c = read(); if (accept[c]) { break; } if (str.length == len) { char[] rep = new char[str.length * 3 / 2]; System.arraycopy(str, 0, rep, 0, str.length); str = rep; } str[len++] = (char) c; } } catch (MyInput.EndOfFileRuntimeException e) { } return len; } static class EndOfFileRuntimeException extends RuntimeException { } } }
Main.java:24: error: unreported exception IOException; must be caught or declared to be thrown solver.solve(1, in, out); ^ 1 error
s952102439
p03657
C
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; int main() { int a, b; scanf("%d%d", &a, &b); puts(a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0 ? "Possible" : "Impossible"); }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s777207203
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" <<endl; else cout<< "Impossible" <<endl; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s721826775
p03657
C++
#include <stdio.h> int main(void){ int a, b; printf("AとBの枚数をそれぞれ1以上100以下で入力してください。\n"); while(1){ printf("A = "); scanf("%d", &a); if(1 =< a && a =< 100){ break; }else{ printf("もう一度1以上100以下で入力してください。\n"); } } while(1){ printf("B = "); scanf("%d", &b); if(1 =< b && b =< 100){ break; }else{ printf("もう一度1以上100以下で入力してください。\n"); } } if(comform(a, b) == 1) printf("Possible\n"); else printf("Impossible\n"); return 1; } int comform(int x, y){ if(x%3 == 0) return 1; else if(y%3 == 0) return 1; else if((x+y)%3 == 0) return 1; else return 0; }
a.cc: In function 'int main()': a.cc:12:11: error: expected primary-expression before '<' token 12 | if(1 =< a && a =< 100){ | ^ a.cc:12:21: error: expected primary-expression before '<' token 12 | if(1 =< a && a =< 100){ | ^ a.cc:22:11: error: expected primary-expression before '<' token 22 | if(1 =< b && b =< 100){ | ^ a.cc:22:21: error: expected primary-expression before '<' token 22 | if(1 =< b && b =< 100){ | ^ a.cc:29:6: error: 'comform' was not declared in this scope 29 | if(comform(a, b) == 1) printf("Possible\n"); | ^~~~~~~ a.cc: At global scope: a.cc:35:20: error: 'y' has not been declared 35 | int comform(int x, y){ | ^ a.cc: In function 'int comform(int, int)': a.cc:37:11: error: 'y' was not declared in this scope 37 | else if(y%3 == 0) return 1; | ^ a.cc:40:1: warning: control reaches end of non-void function [-Wreturn-type] 40 | } | ^
s618569262
p03657
Java
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; class A{ public static void main(String[] args){ FastScanner fs = new FastScanner(); long num1 = fs.nextLong(); long num2 = fs.nextLong(); if( (num+1+num2)%3 == 0||num1%3 == 0||num2%3 == 0) System.out.println("Possible"); else{ System.out.println("Impossible");} } } class FastScanner { BufferedReader br; StringTokenizer st; public FastScanner(String s) { try { br = new BufferedReader(new FileReader(s)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public FastScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } String nextToken() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return st.nextToken(); } String nextLine(){ String line = ""; try{ line = br.readLine(); }catch(IOException e){ e.printStackTrace(); } return line; } int nextInt() { return Integer.parseInt(nextToken()); } long nextLong() { return Long.parseLong(nextToken()); } double nextDouble() { return Double.parseDouble(nextToken()); } }
Main.java:13: error: cannot find symbol if( (num+1+num2)%3 == 0||num1%3 == 0||num2%3 == 0) System.out.println("Possible"); ^ symbol: variable num location: class A 1 error
s693410423
p03657
Java
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; class Main{ public static void main(String[] args){ FastScanner fs = new FastScanner(); long num1 = fs.nextLong(); long num2 = fs.nextLong(); if((num1+num2) 3 == 0||num1%3 == 0||num2%3 == 0) System.out.println("Possible"); else{ System.out.println("Impossible");} } } class FastScanner { BufferedReader br; StringTokenizer st; public FastScanner(String s) { try { br = new BufferedReader(new FileReader(s)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public FastScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } String nextToken() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return st.nextToken(); } String nextLine(){ String line = ""; try{ line = br.readLine(); }catch(IOException e){ e.printStackTrace(); } return line; } int nextInt() { return Integer.parseInt(nextToken()); } long nextLong() { return Long.parseLong(nextToken()); } double nextDouble() { return Double.parseDouble(nextToken()); } }
Main.java:13: error: ')' expected if((num1+num2) 3 == 0||num1%3 == 0||num2%3 == 0) System.out.println("Possible"); ^ Main.java:13: error: not a statement if((num1+num2) 3 == 0||num1%3 == 0||num2%3 == 0) System.out.println("Possible"); ^ Main.java:13: error: ';' expected if((num1+num2) 3 == 0||num1%3 == 0||num2%3 == 0) System.out.println("Possible"); ^ Main.java:14: error: 'else' without 'if' else{ System.out.println("Impossible");} ^ 4 errors
s162386140
p03657
C++
#include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<queue> #include<cstring> #include<utility> #include<cstdlib> #include<cmath> #include<vector> #include<map> #include<set> #include<stack> #include<bitset> #include<deque> #include<cctype> using namespace std; int main() { int A,B; cin>>A>>B; int sum=A+B; if(sum==0) { cout<<"Impossible"; } else if(A==0) { cout<<"Impossible"; } else if(B==0) { cout<<"Impossible"; } else if(sum%3==0) { cout<<"Possible"; } else if(A%3==0) { cout<<"Possible"; } else if(B%3==0) { cout<<"Possible"; } else { cout<<"Impossible" } return 0; }
a.cc: In function 'int main()': a.cc:49:35: error: expected ';' before '}' token 49 | cout<<"Impossible" | ^ | ; 50 | } | ~
s067008328
p03657
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define reps(i,s,n) for(int i=(int)(s);i<(int)(n);i++) #define allsort(v) sort(v.begin(),v.end()) const ll mod = 1e9 + 7; const int INF = 1e9; int main() { cin.sync_with_stdio(false); 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; }#include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define reps(i,s,n) for(int i=(int)(s);i<(int)(n);i++) #define allsort(v) sort(v.begin(),v.end()) const ll mod = 1e9 + 7; const int INF = 1e9; int main() { cin.sync_with_stdio(false); 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:19:2: error: stray '#' in program 19 | }#include<bits/stdc++.h> | ^ a.cc:19:3: error: 'include' does not name a type 19 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:27:10: error: redefinition of 'const ll mod' 27 | const ll mod = 1e9 + 7; | ^~~ a.cc:9:10: note: 'const ll mod' previously defined here 9 | const ll mod = 1e9 + 7; | ^~~ a.cc:28:11: error: redefinition of 'const int INF' 28 | const int INF = 1e9; | ^~~ a.cc:10:11: note: 'const int INF' previously defined here 10 | const int INF = 1e9; | ^~~ a.cc:30:5: error: redefinition of 'int main()' 30 | int main() { | ^~~~ a.cc:12:5: note: 'int main()' previously defined here 12 | int main() { | ^~~~
s601221830
p03657
C++
#include <cstdio> using namespace std; int main() { int a, b; while(~scanf("%d%d", &a, &b)) { printf("%s\n", (a+b)%3?"Possible":"Impossible") } return 0; }
a.cc: In function 'int main()': a.cc:8:56: error: expected ';' before '}' token 8 | printf("%s\n", (a+b)%3?"Possible":"Impossible") | ^ | ; 9 | } | ~
s820429447
p03657
C++
a, b = gets.chomp.split(" ").map(&:to_i) if a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0 then puts "Possible" else puts "Impossible" end
a.cc:1:1: error: 'a' does not name a type 1 | a, b = gets.chomp.split(" ").map(&:to_i) | ^
s732156003
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)%c==0)) { cout<<"Possible"<<endl; } else { cout<<"Impossible"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:26: error: 'c' was not declared in this scope 7 | if(a%3==0||b%3==0||(a+b)%c==0)) | ^ a.cc:7:31: error: expected primary-expression before ')' token 7 | if(a%3==0||b%3==0||(a+b)%c==0)) | ^
s232493107
p03657
C++
#include <iostream> #include <vector> #include <queue> #define NOCOLOR 0 #define BLACK 1 //Fennec #define WHITE 2 //Snuke #define N 100000 using namespace std; int n; int M[N][N]; int color[N]; void bfs(int s1, int s2){ queue<int> q1,q2; q1.push(s1); q2.push(s2); for(int i = 0; i < n; i++) color[i]=NOCOLOR; color[0]=BLACK; color[n-1]=WHITE; int u1,u2; while(!q1.empty() && !q2.empty()){ u1=q1.front(); q1.pop(); for(int v = 0; v < n; v++){ if(M[u1][v]==0) continue; if(color[v]!=NOCOLOR) continue; color[v] = BLACK; q1.push(v); } u2=q2.front(); q2.pop(); for(int v = 0; v < n; v++){ if(M[u2][v]==0) continue; if(color[v]!=NOCOLOR) continue; color[v] = WHITE; q2.push(v); } } if(!q1.empty()) cout<<"Fennec"<<endl; else cout<<"Snuke"<<endl; } int main(void){ cin.sync_with_stdio(false); int a,b; int n; cin>>n; for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ M[i][j] = 0; } } for(int i = 0; i < n-1; i++){ int a,b; cin>>a>>b; a--; b--; M[a][b]=1; M[b][a]=1; } bfs(0,n-1); return 0; }
/tmp/ccNX3KUR.o: in function `bfs(int, int)': a.cc:(.text+0x7b): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccNX3KUR.o a.cc:(.text+0x97): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccNX3KUR.o a.cc:(.text+0xb5): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccNX3KUR.o a.cc:(.text+0x132): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccNX3KUR.o a.cc:(.text+0x150): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccNX3KUR.o a.cc:(.text+0x20d): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccNX3KUR.o a.cc:(.text+0x22b): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccNX3KUR.o collect2: error: ld returned 1 exit status
s329732324
p03657
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(void){ int n,k; cin >> n >> k; vector<int> l(n); for(int i = 0; i < n; i++){ cin >> l[i]; } sort(l.begin(),l.end()); int ans = 0; for(int i = 0; i < k; i++){ ans += 1[n-1-i]; } return 0; }
a.cc: In function 'int main()': a.cc:21:17: error: invalid types 'int[int]' for array subscript 21 | ans += 1[n-1-i]; | ^
s748485081
p03657
C++
#include <iostream> #include <vector> #include <algorithm> //ソート用 using namespace std; int main(void){ int n,k; cin >> n >> k; vector<int> l(n); //vectorの大きさをnに設定 for(int i = 0; i < n; i++){ cin >> l[i]; } // for(int &val : l){ // cin >> val; // } sort(l.begin(),l.end()); //C++ではソート用の関数が用意されていることが多いため、ソート関数を実装する必要はない int ans = 0; for(int i = 0; i < k; i++){ ans += 1[n-1-i]; } return 0; }
a.cc: In function 'int main()': a.cc:23:17: error: invalid types 'int[int]' for array subscript 23 | ans += 1[n-1-i]; | ^
s423103433
p03657
C++
#include <iostream> #include <vector> #include <algorithm> //ソート用 using namespace std; int main(void){ int n,k; cin >> n >> k; vector<int> l(n); //vectorの大きさをnに設定 for(int i = 0; i < n; i++){ cin >> l[i]; } sort(l.begin(),l.end()); //C++ではソート用の関数が用意されていることが多いため、ソート関数を実装する必要はない int ans = 0; for(int i = 0; i < k; i++){ ans += 1[n-1-i]; } return 0; }
a.cc: In function 'int main()': a.cc:21:17: error: invalid types 'int[int]' for array subscript 21 | ans += 1[n-1-i]; | ^
s954663511
p03657
C++
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} import Control.Applicative import Control.Monad import Control.Arrow import Data.List import Data.Maybe import Data.Char import qualified Data.ByteString.Char8 as B import Text.Printf readInt = ( readLn :: IO Int ) readInts = map ( read :: String -> Int ) . words <$> getLine getList = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine which a b f = if f then a else b mp [ a, b ] = ( a, b ) main = do [ a, b ] <- readInts putStrLn $ which "Possible" "Impossible" $ any ( ( == 0 ) . ( `mod` 3 ) ) [ a, b, a + b ]
a.cc:1:3: error: stray '#' in program 1 | {-# LANGUAGE ScopedTypeVariables #-} | ^ a.cc:1:34: error: stray '#' in program 1 | {-# LANGUAGE ScopedTypeVariables #-} | ^ a.cc:2:3: error: stray '#' in program 2 | {-# LANGUAGE BangPatterns #-} | ^ a.cc:2:27: error: stray '#' in program 2 | {-# LANGUAGE BangPatterns #-} | ^ a.cc:23:71: error: stray '`' in program 23 | putStrLn $ which "Possible" "Impossible" $ any ( ( == 0 ) . ( `mod` 3 ) ) [ a, b, a + b ] | ^ a.cc:23:75: error: stray '`' in program 23 | putStrLn $ which "Possible" "Impossible" $ any ( ( == 0 ) . ( `mod` 3 ) ) [ a, b, a + b ] | ^ a.cc:1:1: error: expected unqualified-id before '{' token 1 | {-# LANGUAGE ScopedTypeVariables #-} | ^ a.cc:2:1: error: expected unqualified-id before '{' token 2 | {-# LANGUAGE BangPatterns #-} | ^ a.cc:4:1: error: 'import' does not name a type 4 | import Control.Applicative | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
s934895586
p03657
Java
import java.util.*; import java.util.Arrays; class Main{ public static void main(String args[]){ Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int a[] = new int[n]; int count = 0; for (count; count < n; count++){ a[count]=stdIn.nextInt(); } Arrays.sort(a); int sum1 = 0,sum2 = 0; int count2 = n-1; while(count2>=0){ if (sum1<sum2) { sum1=sum1+a[count2]; }else{ sum2=sum2+a[count2]; } count2=count2-1; } if ((sum1-sum2)<0) { System.out.println(sum2-sum1); }else{ System.out.println(sum1-sum2); } } }
Main.java:11: error: not a statement for (count; count < n; count++){ ^ 1 error
s572563970
p03657
C++
#include <cstdio> #include <algorithm> #include <vector> #include <iostream> #include <numeric> #include <cmath> using namespace std; int main(){ int n; vector<int> v; scanf("%d",&n); for (int i = 0; i < n; i++){ int x; scanf("%d",&x); v.push_back(x); } long long r = 10000000; for (int i = 1; i < n; i++){ int sunuke = 0; int arai = 0; for (int j = 0; j < i; j++){ sunuke += v[j]; } for (int k = i; k < n; k++){ arai += v[k]; } int sa = abs(sunuke-arai) if (r > sa){ r = sa; } } printf("%d",r[0]); }
a.cc: In function 'int main()': a.cc:30:9: error: expected ',' or ';' before 'if' 30 | if (r > sa){ | ^~ a.cc:34:18: error: invalid types 'long long int[int]' for array subscript 34 | printf("%d",r[0]); | ^
s380634019
p03657
C++
#include<iostream> int A,B; int main{ std::cin>>A>>B; if(A/3==0||B/3==0||A+B/3==0){ std::cout<<"possible"<<"\n"; }else{ std:cout<<"impossible"<<"\n"; } system("pause") return 0; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main{ | ^~~~ a.cc:4:15: error: expected '}' before ';' token 4 | std::cin>>A>>B; | ^ a.cc:3:9: note: to match this '{' 3 | int main{ | ^ a.cc:4:12: error: invalid user-defined conversion from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' [-fpermissive] 4 | std::cin>>A>>B; | ~~~~~~~~~~~^~~ In file included from /usr/include/c++/14/ios:46, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_ios.h:121:16: note: candidate is: 'std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 121 | explicit operator bool() const | ^~~~~~~~ /usr/include/c++/14/bits/basic_ios.h:121:16: note: return type 'bool' of explicit conversion function cannot be converted to 'int' with a qualification conversion a.cc:5:1: error: expected unqualified-id before 'if' 5 | if(A/3==0||B/3==0||A+B/3==0){ | ^~ a.cc:7:2: error: expected unqualified-id before 'else' 7 | }else{ | ^~~~ a.cc:10:7: error: expected constructor, destructor, or type conversion before '(' token 10 | system("pause") | ^ a.cc:12:1: error: expected declaration before '}' token 12 | } | ^
s032688878
p03657
C++
#include<iostream> #include<cmath> #include<cstdio> #include<string> #include<algorithm> using namespace std; int main() { int a,b; cin>>a>>b int sum=a+b; if(sum%3==0){cout<<"Possible"<<endl;} else cout<<"Impossible"<<endl; }
a.cc: In function 'int main()': a.cc:10:18: error: expected ';' before 'int' 10 | cin>>a>>b | ^ | ; 11 | int sum=a+b; | ~~~ a.cc:12:12: error: 'sum' was not declared in this scope 12 | if(sum%3==0){cout<<"Possible"<<endl;} | ^~~
s283912012
p03657
Java
class Main{ public static void main(String arg[]) throws IOException{ String message; int n=0; BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); message = br.readLine(); String num[] = message.split(" "); message = br.readLine(); String nagasa[] = message.split(" "); n = Integer.parseInt(num[0]); int numnum[] = new int[n]; int max = 0; int harf = 0; for(int i=0;i<n;i++){ numnum[i] = Integer.parseInt(nagasa[i]); max += numnum[i]; } harf = max/2; int akun = 0; int bkun = 0; int i = 0; int maxlong=0; while(akun<harf){ akun += numnum[i]; i++; if(n-i==1)break; } while(i<n){ bkun += numnum[i]; i++; } maxlong = Math.abs(akun - bkun); System.out.println(""+maxlong); } }
Main.java:3: error: cannot find symbol public static void main(String arg[]) throws IOException{ ^ symbol: class IOException location: class Main Main.java:6: error: cannot find symbol BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:6: error: cannot find symbol BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:6: error: cannot find symbol BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class InputStreamReader location: class Main 4 errors
s151093693
p03657
C++
#include<cstdio> int main(){ int a, b; scanf("%d%d",&a,&b); if((a + b)%3 = 0){ printf("possible"); } else{ printf("Impossible"); } return 0; }
a.cc: In function 'int main()': a.cc:6:19: error: lvalue required as left operand of assignment 6 | if((a + b)%3 = 0){ | ~~~~~~~^~
s567874728
p03657
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> a(n); int arai = 0; for(int i = 0;i < n;i++){ cin >> a[i]; arai += a[i]; } int sunuke = 0; long long ans = 1e10; for(int i = 0;i < n - 1;i++){ sunuke += a[i]; int tmp = arai - sunuke; ans = min(ans, abs(sunuke - tmp)); } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:18:18: error: no matching function for call to 'min(long long int&, int)' 18 | ans = min(ans, abs(sunuke - tmp)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included 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_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: a.cc:18:18: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int') 18 | ans = min(ans, abs(sunuke - tmp)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)' 5686 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)' 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: template argument deduction/substitution failed: a.cc:18:18: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int' 18 | ans = min(ans, abs(sunuke - tmp)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~
s420174247
p03657
C++
#include <iostream> using namespace std; int main(){ int a=0; int b=0; 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:18: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 8 | cin >> a > b; | ~~~~~~~~ ^ ~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:8:18: note: candidate: 'operator>(int, int)' (built-in) 8 | cin >> a > b; | ~~~~~~~~~^~~ a.cc:8:18: 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/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: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:8:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | 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:8:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 8 | 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:8:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | 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:8:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 8 | cin >> a > b; | ^ 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: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:8:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 8 | cin >> a > b; | ^ 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: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:8:20: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | 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:8:20: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | 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:8:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 8 | 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>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cin >> a > b; | ^ /usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cin >> a > b; | ^ /usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3942 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed: a.cc:8:20: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>' 8 | cin >> a > b; | ^ 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:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2619 | operator>(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed: a.cc:8:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 8 | cin >> a > b; | ^
s314871651
p03657
C++
#include<cstdio> using namespace std; int main(){ int a,b; cin>>a>>b; if (a%3!=0 && b%3!=0 && (a+b)%3!=0) puts("Impossible"); else puts("Possible"); return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin>>a>>b; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ |+#include <iostream> 2 | using namespace std;
s430569916
p03657
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class M1 { public static void main(String[] args) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String str=br.readLine(); String[] strr=str.split(" "); int[] a=new int[3]; for(int i=0;i<2;i++) { a[i]=Integer.parseInt(strr[i]); } a[2]=a[0]+a[1]; String msg=""; if(a[0]%3==0||a[1]%3==0||a[2]%3==0) {msg="Possible"; } else { msg="Impossible"; } System.out.println(msg); } }
Main.java:5: error: class M1 is public, should be declared in a file named M1.java public class M1 { ^ 1 error
s135975377
p03657
Java
/** * Created by DELL on 2017/7/15. */ public class main { public static void main(String[] args) { Scanner in=new Scanner(System.in); int A=in.nextInt(); int B=in.nextInt(); if(A%3==0||B%3==0||(A+B)%3==0){ System.out.println("Possible"); } else System.out.println("Impossible"); } }
Main.java:5: error: class main is public, should be declared in a file named main.java public class main { ^ Main.java:11: error: cannot find symbol Scanner in=new Scanner(System.in); ^ symbol: class Scanner location: class main Main.java:11: error: cannot find symbol Scanner in=new Scanner(System.in); ^ symbol: class Scanner location: class main 3 errors
s323919030
p03657
C++
#include <iostream> #include <algorithm> #include <cstdlib> #define ll long long using namespace std; int main(){ ll n, snuke = 0, kuma = 0, min_c = 10000000; ll a[200010]; cin >> n; for(int i = 0; i < n; i++){ cin >> a[i]; if(i != n-1) snuke += a[i]; } kuma = a[n-1]; i = n-2; while(1){ min_c = min(min_c, llabs(snuke - kuma)); snuke = snuke - a[i]; kuma = kuma + a[i]; i--; if(i == -1) break; } cout << min_c << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:3: error: 'i' was not declared in this scope 19 | i = n-2; | ^
s956472932
p03657
Java
import java.util.*; /** * Created by DELL on 2017/7/15. */ public class main { public static void main(String[] args) { Scanner in=new Scanner(System.in); int A=in.nextInt(); int B=in.nextInt(); if(A%3==0||B%3==0||(A+B)%3==0){ System.out.println("Possible"); } else System.out.println("Impossible"); } }
Main.java:6: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s828542038
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 << endl; } else{ cout << Impossible << endl; } }
a.cc: In function 'int main()': a.cc:10:25: error: 'Possible' was not declared in this scope 10 | cout << Possible << endl; | ^~~~~~~~ a.cc:13:25: error: 'Impossible' was not declared in this scope 13 | cout << Impossible << endl; | ^~~~~~~~~~
s852129949
p03657
C++
#include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; int a, b; int main() { scanf("%d %d", &a, &b); if(a + b >= 3 && a >= 3 || a + b > = 3 && b >= 3 || a == 0 || b == 0) printf("Possible\n"); else printf("Impossible\n"); return 0; }
a.cc: In function 'int main()': a.cc:11:45: error: expected primary-expression before '=' token 11 | if(a + b >= 3 && a >= 3 || a + b > = 3 && b >= 3 || a == 0 || b == 0) printf("Possible\n"); | ^
s514088999
p03657
C++
#include <stdio.h> int main(void){ int a,b; scanf("%d",&a); scanf("%d",&b); if((a+b)%3 == 0){ prinf("Possible"); }else printf("Impossible"); return (0); }
a.cc: In function 'int main()': a.cc:8:17: error: 'prinf' was not declared in this scope; did you mean 'printf'? 8 | prinf("Possible"); | ^~~~~ | printf
s828314549
p03657
C++
/// Md.ASADUZZAMAN /// Dept of ICT /// MBSTU #include<bits/stdc++.h> using namespace std; #define fr(i,a,b) for(int i=(a);i<(b);i++) #define rfr(i,a,b) for(int i=(b-1);i>=(a);i--) #define freach(i, c) for( __typeof( (c).begin() ) i = (c).begin(); i != (c).end(); ++i ) #define rep(i,n) for(int i=0;i<(n);i++) #define rrep(i,n) for(int i=(n)-1;i>=0;i--) #define forit(it, s) for(__typeof(s.begin()) it = s.begin(); it != s.end(); it++) #define PINF INT_MAX #define MINF INT_MIN #define pb push_back #define mp make_pair #define all(a) (a).begin(),(a).end() #define mset(a,c) memset(a,c,sizeof a) #define clr(a) memset(a,0,sizeof a) #define pii pair<int,int> #define pll pair<long long,long long> #define pcc pair<char,char> #define pic pair<int,char> #define pci pair<char,int> #define psi pair<sting,int> #define pis pair<int,string> #define ff first #define ss second #define vs vector<string> #define vi vector<int> #define vll vector<long long> #define vpi vector<pair<int,int> > #define vpl vector<pair<long long,long long> > #define qi queue<int> #define ql queue<long> #define qll queue<long long> #define PQ priority_queue #define mpii map<int,int> #define mpsi map<string,int> #define mpci map<char,int> #define mpll map<long long,long long> #define bug(x) cout<<#x<<": "<<x<<endl #define bug1(x,y) cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl #define bug2(x,y,z) cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl #define min(a,b) (a>b?b:a) #define max(a,b) (a>b?a:b) #define pi acos(-1.0) #define rad(x) (((1.0 * x * pi) / 180.0)) #define deg(x) (((x * 180.0) / (1.0 * pi))) #define sinr(x) (sin(rad(x))) #define cosr(x) (cos(rad(x))) #define tanr(x) (tan(rad(x))) #define asind(x) (deg((asin(x)))) #define acosd(x) (deg((acos(x)))) #define atand(x) (deg((atan(x)))) #define setbiton(x, i) (x |= (1 << i)) #define setbitoff(x, i) (x ^= (1 << i)) #define countbit(x) __builtin_popcountll((ll)x) #define resetbit(x, i) (x &= (~(1 << i))) #define LB(a,x) (lower_bound(all(a),x)-a.begin()) // first element in the range [first,last) which does not compare less than val. #define UB(a,x) (upper_bound(all(a),x)-a.begin()) // first element in the range [first,last) which compares greater than val. #define Unique(store) store.resize(unique(store.begin(),store.end())-store.begin()) #define mxe(a,n) (*max_element(a,a+n)) #define mxv(v) (*max_element(v.begin(), v.end())) #define mne(a,n) (*min_element(a,a+n)) #define mnv(v) (*min_element(v.begin(), v.end())) #define SUM(a,n) (accumulate(a,a+n,0)) #define SUMv(v) (accumulate(v.begin(), v.end(), 0)) #define occurx(v,x) (count(v.begin(), v.end(),x)) #define findx(v,x) (find(v.begin(), v.end(),x)) #define swap(a,b) a^=b^=a^=b #define bin_sa(a,n,x) (binary_search(a, a+n,x)) #define bin_sv(v,x) (binary_search(v.begin(), v.end(),x)) #define sgn(x,y) ((x)+eps<(y)?-1:((x)>eps+(y)?1:0)) #define input() freopen("in0.txt","r",stdin) #define output()freopen("out0.txt","w",stdout) #define fast() ios_base::sync_with_stdio(false);cin.tie(NULL); #define IN scanf #define OUT printf /// #define SI(a) scanf("%d",&a) /// #define SL(a) scanf("%lld",&a) /// #define SD(a) scanf("%lf",&a) /// #define OI(a) printf("%d",a) /// #define OL(a) printf("%lld",a) /// #define OD(a) printf("%lf",a) /// #define ON() printf("\n") #define ll long long #define ull unsigned long long #define EPS 1e-9 #define inf 1e18 #define MOD 1000000007 int main() { #ifndef ONLINE_JUDGE //input(); //output(); #endif fast(); // clock_t begin, end; // double time_spent; // begin = clock(); ll n,x,y,a,b,c,t,q; string s; //char c; //cin>>t; while(cin>>a>>b) { if((a%3==0 or b%3==0 or (a+b)%3==0) cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; } // end = clock(); // time_spent = (double)(end - begin) / CLOCKS_PER_SEC; // cout<<"Time spent = "<<time_spent<<endl; return 0; }
a.cc: In function 'int main()': a.cc:131:45: error: expected ';' before 'cout' 131 | if((a%3==0 or b%3==0 or (a+b)%3==0) | ^ | ; 132 | cout<<"Possible"<<endl; | ~~~~ a.cc:133:12: error: expected primary-expression before 'else' 133 | else cout<<"Impossible"<<endl; | ^~~~ a.cc:132:36: error: expected ')' before 'else' 132 | cout<<"Possible"<<endl; | ^ | ) 133 | else cout<<"Impossible"<<endl; | ~~~~ a.cc:131:12: note: to match this '(' 131 | if((a%3==0 or b%3==0 or (a+b)%3==0) | ^