submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s532440542
p03635
C++
int main() { cout << "ce" << endl; return 0; }
a.cc: In function 'int main()': a.cc:3:5: error: 'cout' was not declared in this scope 3 | cout << "ce" << endl; | ^~~~ a.cc:3:21: error: 'endl' was not declared in this scope 3 | cout << "ce" << endl; | ^~~~
s635682392
p03635
C++
int main() { cout << "ce" << endl; return 0; }
a.cc: In function 'int main()': a.cc:3:5: error: 'cout' was not declared in this scope 3 | cout << "ce" << endl; | ^~~~ a.cc:3:21: error: 'endl' was not declared in this scope 3 | cout << "ce" << endl; | ^~~~
s310688482
p03635
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String a = sc.next().split(""); System.out.println(a[0]+(a.length()-2)+a[a.length()-1]); } }
Main.java:5: error: incompatible types: String[] cannot be converted to String String a = sc.next().split(""); ^ Main.java:6: error: array required, but String found System.out.println(a[0]+(a.length()-2)+a[a.length()-1]); ^ Main.java:6: error: array required, but String found System.out.println(a[0]+(a.length()-2)+a[a.length()-1]); ^ 3 errors
s138989143
p03635
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; typedef long long ll; typedef long double ld; const int inf=1e9+7; const ll longinf=1LL<<60; #define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i ) #define rep(i,n) REP(i,0,n) #define F first #define S second const int mx=200010; const ll mod=1e9+7; int main(){ int h,w; cin >> h >> w; h--; w--; cout << h*w<< endl; return 0; }
a.cc:20:3: error: extended character   is not valid in an identifier 20 | cout << h*w<< endl; | ^ a.cc: In function 'int main()': a.cc:20:3: error: 'cout\U00003000' was not declared in this scope 20 | cout << h*w<< endl; | ^~~~~~
s884875529
p03635
C++
#include <iostream> #include <bits/stdc++.h> int main() { int m,n; cin>>m>>n; int sq; sq=(m-1)*(n-1); cout<<sq; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>m>>n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:10:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | cout<<sq; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s149461958
p03635
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int n, m; cin >> n >> m; cout << (n - 1)(m - 1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:18: error: expression cannot be used as a function 9 | cout << (n - 1)(m - 1) << endl; | ~~~~~~~^~~~~~~
s854599215
p03635
C++
#include<bits/stdc++.h> usinf namespace std; int main() { long a,b; cin>>a>>b; cout<<(a-1)*(b-1)<<endl; return 0; }
a.cc:2:1: error: 'usinf' does not name a type 2 | usinf namespace std; | ^~~~~ a.cc: In function 'int main()': a.cc:6:10: 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:7:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | cout<<(a-1)*(b-1)<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | cout<<(a-1)*(b-1)<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s659435894
p03635
Java
import java.util.Scanner; public class Adjacent { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); if (2 <= n && n <= 1.0e5) { int[] sunukenoaho = new int[n]; for (int i = 0; i < n ; i++) { sunukenoaho[i] = scan.nextInt(); sunukenoaho[i] = sunukenoaho[i] % 4; } int sum = 0; for (int i = 1; i < n; i++) { if (sunukenoaho[i] * sunukenoaho[i - 1] % 4 == 0) { sum++; } } if (sum == n - 1) { System.out.println("Yes"); } else { System.out.println("No"); } } } }
Main.java:4: error: class Adjacent is public, should be declared in a file named Adjacent.java public class Adjacent { ^ 1 error
s454085000
p03635
Java
import java.util.Scanner; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Kcity { public static void main(String[] args) { int n, m; Scanner scan = new Scanner(System.in); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); while (true) { try { System.out.print("n = ?:"); n = scan.nextInt(); System.out.print("m = ?:"); m = scan.nextInt(); System.out.println(nBlocks(n, m)); } catch (java.util.InputMismatchException e) { e.printStackTrace(); } try { System.out.print("Wanna quit? (y / n)"); String str = reader.readLine(); if (str.equals("y")) { break; } } catch (IOException e) { e.printStackTrace(); } } } public static int nBlocks(int n, int m) { if (n >= 2 && m <= 100 && m > 0) { if (m == 1) { return 0; } return (n - 1) * (m - 1); } return -1; } }
Main.java:6: error: class Kcity is public, should be declared in a file named Kcity.java public class Kcity { ^ 1 error
s121482879
p03635
C++
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; cout >> (a - 1) * (b - 1) >> endl; }
a.cc: In function 'int main()': a.cc:7:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 7 | cout >> (a - 1) * (b - 1) >> endl; | ~~~~ ^~ ~~~~~~~~~~~~~~~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:7:8: note: candidate: 'operator>>(int, int)' (built-in) 7 | cout >> (a - 1) * (b - 1) >> endl; | ~~~~~^~~~~~~~~~~~~~~~~~~~ a.cc:7:8: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:7:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> (a - 1) * (b - 1) >> endl; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:7:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 7 | cout >> (a - 1) * (b - 1) >> endl; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:7:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> (a - 1) * (b - 1) >> endl; | ^ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:7:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> (a - 1) * (b - 1) >> endl; | ^ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:7:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> (a - 1) * (b - 1) >> endl; | ^ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:7:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> (a - 1) * (b - 1) >> endl; | ^ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:7:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> (a - 1) * (b - 1) >> endl; | ^ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:7:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> (a - 1) * (b - 1) >> endl; | ^ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]': a.cc:7:27: required from here 7 | cout >> (a - 1) * (b - 1) >> endl; | ^ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~
s786330869
p03635
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanenr(System.in); int n = sc.nextInt()-1; int m = sc.nextInt()-1; System.out.println(n*m); } }
Main.java:5: error: cannot find symbol Scanner sc = new Scanenr(System.in); ^ symbol: class Scanenr location: class Main 1 error
s400393295
p03635
C++
#include<bits/stdc++.h> using namespace std; #define ll long long // long long省略 #define pb push_back // push_back省略 #define mp make_pair // make_pair省略 #define fi first // first省略 #define se second // second省略 #define itn int // int誤字保険 #define count cout // cout誤字保険 #define vecotr vector // vector誤字保険 #define ednl endl // endl誤字保険 #define opt() cin.tie(0); ios::sync_with_stdio(false) // 入出力速度改善 #define rep(i,l,r) for(ll i=(l);i<(r);i++) // 範囲[l, r)で刻み1のfor文(順方向) #define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k)) // 範囲[l, r)で刻みkのfor文(順方向) #define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--) // 範囲[l, r)で刻み1のfor文(逆方向) #define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k)) // 範囲[l, r)で刻みkのfor文(逆方向) #define all(x) (x).begin(), (x).end() // vectorのポインタ位置指定用 #define max(p,q)((p)>(q)?(p):(q)) // max拡張 #define min(p,q)((p)<(q)?(p):(q)) // min拡張 #define bit(n,m)(((n)>>(m))&1) // 変数nのm番目のbitを取り出す template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } int dy[]={0, 1, 0, -1}; // 4方向近傍 int dx[]={1, 0, -1, 0}; // 4方向近傍 //union-find const int N_MAX = 10e9; ll par[N_MAX]; ll rnk[N_MAX]; void init(ll n){ rep(i,0,n){ par[i] = i; rnk[i] = 1;} } ll find(ll x){ if(x == par[x]) return x; return par[x] = find(par[x]); } void unite(ll x, ll y){ x = find(x); y = find(y); if(rnk[x] < rnk[y]){ par[x] = y; }else{ par[y] = x; if(rnk[x] == rnk[y]) rnk[x]++ } } bool same(ll x, ll y){ return find(x) == find(y); } int main(){ ll a,b;cin>>a>>b; a--;b--; cout<<a*b<<endl; }
a.cc:30:19: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+10' to '2147483647' [-Woverflow] 30 | const int N_MAX = 10e9; | ^~~~ a.cc:31:8: error: size of array 'par' exceeds maximum object size '9223372036854775807' 31 | ll par[N_MAX]; | ^~~~~ a.cc:32:8: error: size of array 'rnk' exceeds maximum object size '9223372036854775807' 32 | ll rnk[N_MAX]; | ^~~~~ a.cc: In function 'void unite(long long int, long long int)': a.cc:41:38: error: expected ';' before '}' token 41 | if(rnk[x] == rnk[y]) rnk[x]++ | ^ | ; 42 | } | ~
s876490685
p03635
C++
#include <bits/stdc++.h> using namespace std; int main() { string n,m; cin >> n >> m; cout << (n-1)*(m-1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 7 | cout << (n-1)*(m-1) << endl; | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/bits/stl_algobase.h:67, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | cout << (n-1)*(m-1) << endl; | ^ In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/complex:370:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)' 370 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:370:5: note: template argument deduction/substitution failed: a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/complex:379:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)' 379 | operator-(const complex<_Tp>& __x, const _Tp& __y) | ^~~~~~~~ /usr/include/c++/14/complex:379:5: note: template argument deduction/substitution failed: a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/complex:388:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)' 388 | operator-(const _Tp& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:388:5: note: template argument deduction/substitution failed: a.cc:7:16: note: mismatched types 'const std::complex<_Tp>' and 'int' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/complex:465:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&)' 465 | operator-(const complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:465:5: note: candidate expects 1 argument, 2 provided In file included from /usr/include/c++/14/valarray:605, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166: /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:7:16: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:7:16: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 7 | cout << (n-1)*(m-1) << endl; | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:7:16: note: mismatched types 'const std::valarray<_Tp>' and 'int' 7 | cout << (n-1)*(m-1) << endl; | ^ a.cc:7:21: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 7 | cout << (n-1)*(m-1) << endl; | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iter
s704621971
p03635
C++
#include<bits/stdc++.h> using namespace std; int main() { string ss; cin>>ss; int l=s.size(); int ll=l-2; cout<<ss[0]<<ll<<ss[l-1]; return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: 's' was not declared in this scope 7 | int l=s.size(); | ^
s159844661
p03635
C++
#include<bits/stdc++.h> using namespace std; int main() { string ss; cin>>ss; int l=ss.size(); int ll=l-2; cout<<s[0]<<ll<<s[l-1]; return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: 's' was not declared in this scope 9 | cout<<s[0]<<ll<<s[l-1]; | ^
s039321198
p03635
C++
#include<bits/stdc++.h> using namespace std; int main() { string ss; cin>>ss; int l=s.size(); int ll=l-2; cout<<s[0]<<ll<<s[l-1]; return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: 's' was not declared in this scope 7 | int l=s.size(); | ^
s122691820
p03635
C++
#include <iostream> using namespace std; int a, b; int main () { cin >> a >> b; cout << (a-1)*(B-1) << endl; }
a.cc: In function 'int main()': a.cc:6:20: error: 'B' was not declared in this scope 6 | cout << (a-1)*(B-1) << endl; | ^
s530388293
p03635
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; inline int read() { ,f=; char ch=getchar(); ') { if(ch=='-') f=-; ch=getchar(); } ') { x=x*+ch-'; ch=getchar(); } return x*f; } inline void write(int x) { ) { putchar('-'); x=-x; } ) { write(x/); } putchar(x%+'); } int main() { int a,b; cin>>a>>b; cout<<(a-)*(b-)<<endl; ; }
a.cc:8:6: warning: missing terminating ' character 8 | ') | ^ a.cc:8:6: error: missing terminating ' character 8 | ') | ^~ a.cc:14:6: warning: missing terminating ' character 14 | ') | ^ a.cc:14:6: error: missing terminating ' character 14 | ') | ^~ a.cc:16:18: warning: missing terminating ' character 16 | x=x*+ch-'; | ^ a.cc:16:18: error: missing terminating ' character 16 | x=x*+ch-'; | ^~ a.cc:32:17: warning: missing terminating ' character 32 | putchar(x%+'); | ^ a.cc:32:17: error: missing terminating ' character 32 | putchar(x%+'); | ^~~ a.cc: In function 'int read()': a.cc:6:6: error: expected primary-expression before ',' token 6 | ,f=; | ^ a.cc:6:7: error: 'f' was not declared in this scope 6 | ,f=; | ^ a.cc:6:9: error: expected primary-expression before ';' token 6 | ,f=; | ^ a.cc:11:17: error: expected primary-expression before ';' token 11 | f=-; | ^ a.cc:16:10: error: 'x' was not declared in this scope 16 | x=x*+ch-'; | ^ a.cc:19:13: error: 'x' was not declared in this scope 19 | return x*f; | ^ a.cc: In function 'void write(int)': a.cc:23:6: error: expected primary-expression before ')' token 23 | ) | ^ a.cc:28:6: error: expected primary-expression before ')' token 28 | ) | ^ a.cc:33:2: error: expected primary-expression before '}' token 33 | } | ^ a.cc: In function 'int main()': a.cc:38:15: error: expected primary-expression before ')' token 38 | cout<<(a-)*(b-)<<endl; | ^ a.cc:38:20: error: expected primary-expression before ')' token 38 | cout<<(a-)*(b-)<<endl; | ^
s491755285
p03635
C++
#include <bit/stdc++.h> using namespace std; typedef long long int ll; int main() { ll n, m; cin >> n >> m; cout << (n - 1) * (m - 1); return 0; }
a.cc:1:10: fatal error: bit/stdc++.h: No such file or directory 1 | #include <bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s397674033
p03635
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; cout<<(a-1)*(b-1<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 6 | cout<<(a-1)*(b-1<<endl; | ~~~^~~~~~ a.cc:6:25: error: expected ')' before ';' token 6 | cout<<(a-1)*(b-1<<endl; | ~ ^ | )
s268132542
p03635
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int n = s.length(); System.out.print(s.charAt(0); System.out.print(n-2); System.out.println(s.charAt(k-1)); } }
Main.java:10: error: ')' or ',' expected System.out.print(s.charAt(0); ^ 1 error
s799858157
p03635
Java
import java.util.Scanner; public class Maim{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); System.out.println((n-1)*(m-1)); } }
Main.java:3: error: class Maim is public, should be declared in a file named Maim.java public class Maim{ ^ 1 error
s677588207
p03635
C++
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <iomanip> #include <cstring> #define rep(i, N) for (int i = 0; i < (int)N; i++) using namespace std; typedef long long ll; const ll LLINF = 9223372036854775807; const int MOD = 1000000007; int main() { int n, m; cin >> n >> m; result = (n-1) * (m-1); cout << result << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:3: error: 'result' was not declared in this scope 15 | result = (n-1) * (m-1); | ^~~~~~
s478852643
p03635
C++
#include <bits/stdc++.h> using namespace std; { int n,m; cin >> n >> m; cout << (n - 1) * (m - 1) << endl; }
a.cc:3:1: error: expected unqualified-id before '{' token 3 | { | ^
s255527306
p03635
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n;,m cin>>n>>m; cout<<(n-1)*(m-1)<<endl; }
a.cc: In function 'int main()': a.cc:4:9: error: expected primary-expression before ',' token 4 | int n;,m | ^ a.cc:4:10: error: 'm' was not declared in this scope 4 | int n;,m | ^
s704869684
p03635
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; cout << N / (n - 1) * (m - 1) << endl; }
a.cc: In function 'int main()': a.cc:7:11: error: 'N' was not declared in this scope 7 | cout << N / (n - 1) * (m - 1) << endl; | ^
s063847116
p03635
C++
// luogu-judger-enable-o2 #include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; if(n==0&&m==0)cout<<"0<<endl; else cout<<(n-1)*(m-1)<<endl; return 0; }
a.cc:9:21: warning: missing terminating " character 9 | if(n==0&&m==0)cout<<"0<<endl; | ^ a.cc:9:21: error: missing terminating " character 9 | if(n==0&&m==0)cout<<"0<<endl; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:10:1: error: expected primary-expression before 'else' 10 | else cout<<(n-1)*(m-1)<<endl; | ^~~~
s574063751
p03635
C++
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> #include <iomanip> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define rep(i, a, b) for (int i=a; i<(b); i++) #define rp(i, a) for (int i=0; i<(a); i++) #define repd(i,a,b) for (int i = (b)-1; i >= a; i--) #define rpd(i,a) for (int i = (a)-1; i >= 0; i--) #define sz(x) (int)(x).size() #define mp make_pair #define pb push_back #define f first #define s second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define shandom_ruffle random_shuffle const int MOD = 1000000007; const ll INF = 1e18; const int MX = 100001; //check the limits, dummy int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout << std::setprecision(9); cout << std::fixed; ll n,m; cin >> n >> k; cout << (n-1)*(k-1)<<endl; return 0; } // read the question correctly (ll vs int) // template by super1 derived from bqi343
a.cc: In function 'int main()': a.cc:52:17: error: 'k' was not declared in this scope 52 | cin >> n >> k; | ^
s938756371
p03635
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i) #define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i) #define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--) #define rreps(i, n) for (int i = ((int)(n)); i > 0; i--) #define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) #define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i) #define FOR(e, c) for (auto &e : c) #define SORT(v, n) sort(v, v + n); #define vsort(v) sort(v.begin(), v.end()); #define rvisort(v) sort(v.begin(), v.end(), greater<int>()); #define all(v) v.begin(), v.end() #define mp(n, m) make_pair(n, m); #define cout(d) cout<<d<<endl; #define coutd(d) cout<<std::setprecision(10)<<d<<endl; #define cinline(n) getline(cin,n); using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; using vvll = vector<vll>; using pii = pair<int, int>; using vpii = vector<pii>; using vs = vector<string>; using vd = vector<double>; using ul = unsigned long; template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; } template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; } const int mod=1e9+7; struct mint { ll x; mint(ll x=0):x(x%mod){} mint& operator+=(const mint a) { if ((x += a.x) >= mod) x -= mod; return *this; } mint& operator-=(const mint a) { if ((x += mod-a.x) >= mod) x -= mod; return *this; } mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this; } mint operator+(const mint a) const { mint res(*this); return res+=a; } mint operator-(const mint a) const { mint res(*this); return res-=a; } mint operator*(const mint a) const { mint res(*this); return res*=a; } }; mint c[4005][4005]; void init() { c[0][0] = 1; for (int i = 0; i <= 4000; i++) { for (int j = 0; j <= i; j++) { c[i+1][j] += c[i][j]; c[i+1][j+1] += c[i][j]; } } } mint comb(int n, int k) { return c[n][k]; } bool IsPrime(int num) { if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) { return false; } } return true; } map<ll, ll> primeFact(ll n) { map<ll, ll> res; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { res[i]++; n /= i; } } if (n != 1) res[n]++; return res; } void printv(vi& v){ rep(i,v.size()) cout << v[i] << " "; cout << endl; } void printv(vll& v){ rep(i,v.size()) cout << v[i] << " "; cout << endl; } int vtotal(vi& v){ int total=0; rep(i,v.size()) total+=v[i]; return total; } int main() { //init(); // mint初期化 cin.tie( 0 ); ios::sync_with_stdio( false ); string n,m;cin>>n>>m; int ans=(n-1)*(m-1); cout(ans); return 0; }
a.cc: In function 'int main()': a.cc:130:13: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 130 | int ans=(n-1)*(m-1); | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/bits/stl_algobase.h:67, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc:130:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: a.cc:130:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 130 | int ans=(n-1)*(m-1); | ^ In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/complex:370:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const complex<_Tp>&)' 370 | operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:370:5: note: template argument deduction/substitution failed: a.cc:130:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/complex:379:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&, const _Tp&)' 379 | operator-(const complex<_Tp>& __x, const _Tp& __y) | ^~~~~~~~ /usr/include/c++/14/complex:379:5: note: template argument deduction/substitution failed: a.cc:130:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/complex:388:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)' 388 | operator-(const _Tp& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:388:5: note: template argument deduction/substitution failed: a.cc:130:14: note: mismatched types 'const std::complex<_Tp>' and 'int' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/complex:465:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&)' 465 | operator-(const complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:465:5: note: candidate expects 1 argument, 2 provided In file included from /usr/include/c++/14/valarray:605, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166: /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:130:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:130:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:130:14: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:130:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: a.cc:130:14: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:130:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:130:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>' 130 | int ans=(n-1)*(m-1); | ^ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: a.cc:130:14: note: mismatched types 'const std::valarray<_Tp>' and 'int' 130 | int ans=(n-1)*(m-1); | ^ a.cc:130:19: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 130 | int ans=(n-1)*(m-1); | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_ite
s632518557
p03635
C++
#include<stdio.h> int main(void) { int n,m; scanf("%d%d",&n,&m); prnitf("%d",(n-1)*(m-1)); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'prnitf' was not declared in this scope; did you mean 'printf'? 6 | prnitf("%d",(n-1)*(m-1)); | ^~~~~~ | printf
s891731317
p03635
C++
#include <bits/stdc++.h> #define int long long using namespace std; signed main(){ int a,b; cin>>a>>b; cout<<(a-1)*(b-1);a }
a.cc: In function 'int main()': a.cc:7:20: error: expected ';' before '}' token 7 | cout<<(a-1)*(b-1);a | ^ | ; 8 | } | ~
s781843499
p03635
C++
#include<stdio.h> int main(void) { int a,b,c; scanf("%d",&n); scanf("%d",&m); s=(n-1)*(m-1); printf("%d\n",s); return 0; }
a.cc: In function 'int main()': a.cc:5:21: error: 'n' was not declared in this scope 5 | scanf("%d",&n); | ^ a.cc:6:21: error: 'm' was not declared in this scope 6 | scanf("%d",&m); | ^ a.cc:7:9: error: 's' was not declared in this scope 7 | s=(n-1)*(m-1); | ^
s888862604
p03635
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,; cin>>a>>b; cout<<(a-1)*(b-1)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:17: error: expected unqualified-id before ';' token 5 | int a,b,; | ^
s636001086
p03635
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int N, M int main() { cin >> N >> M; cout << (N-1) * (M-1) << endl; return 0; }
a.cc:7:1: error: expected initializer before 'int' 7 | int main() { | ^~~
s443983910
p03635
C++
#include <algorithm> #include <iostream> //入出力 #include <stdio.h> #include <map> #include <set> #include <string> #include <math.h> //算術演算子 #include <vector> #include <cstdlib> #include <queue> #include <stack> #include <list> #include <iomanip> //小数点以下を表示させる(setprecision()) //#include <bits/stdc++.h> using namespace std; typedef long long ll; //64bit型 #define debug(x) cerr << x << " " \ << "(L:" << __LINE__ << ")" << '\n' #define PRINT(V) \ { \ for (int i = 0; i < V.size(); i++) \ { \ cout << V[i] << " "; \ } \ cout << endl; \ } int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } int main() { //input->compute->output// int n, m; cin >> n>>M; cout << (n-1)*(m-1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:39:19: error: 'M' was not declared in this scope 39 | cin >> n>>M; | ^
s178476336
p03635
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,n; cin >> n>>m; cout << (n-1)*(m-1) << endl; }
a.cc: In function 'int main()': a.cc:5:9: error: redeclaration of 'int n' 5 | int n,n; | ^ a.cc:5:7: note: 'int n' previously declared here 5 | int n,n; | ^ a.cc:6:13: error: 'm' was not declared in this scope 6 | cin >> n>>m; | ^
s289852999
p03635
C++
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; int i; i = len(s)-2; string(i); cout << s[0] + i + s[-1] <<endl; }
a.cc: In function 'int main()': a.cc:9:7: error: 'len' was not declared in this scope; did you mean 'mblen'? 9 | i = len(s)-2; | ^~~ | mblen a.cc:10:10: error: conflicting declaration 'std::string i' 10 | string(i); | ^ a.cc:8:7: note: previous declaration as 'int i' 8 | int i; | ^
s013308462
p03635
C
#include<iostream> using namespace std; int main(){ int a, b; cin>>a>>b; a-=1; b-=1; cout<<a*b; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s970278668
p03635
C
#inclide<iostream> using namespace std; int main(){ int a, b; cin>>a>>b; a--; b--; cout<<a*b; }
main.c:1:2: error: invalid preprocessing directive #inclide; did you mean #include? 1 | #inclide<iostream> | ^~~~~~~ | include main.c:3:1: error: unknown type name 'using' 3 | using namespace std; | ^~~~~ main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 3 | using namespace std; | ^~~ main.c: In function 'main': main.c:7:3: error: 'cin' undeclared (first use in this function) 7 | cin>>a>>b; | ^~~ main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in main.c:10:3: error: 'cout' undeclared (first use in this function) 10 | cout<<a*b; | ^~~~
s057542125
p03635
C
#include<iostream> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) int main(){ int a, b; cin>>a>>b; a--; b--; cout<<a*b; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s720334314
p03635
C
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) int main(){ int a, b; cin>>a>>b; a--; b--; cout<<a*b; }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s895611510
p03635
C
#include <stdio.h> int main(void) { int A, B; scanf("%d", &A); scanf("%d", &B); printf("%d", (A-1)(B-1)); return 0; }
main.c: In function 'main': main.c:7:18: error: called object is not a function or function pointer 7 | printf("%d", (A-1)(B-1)); | ~~^~~
s885510120
p03635
Java
import java.util.*; public class Main { public static void main(String[] args) { Main m = new Main(); m.exec(); } private void exec() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int result = (n + 1) * (m + 1) - (2 * (m + 1) + 2 * (n - 1)); System.out.println(result); } } import java.util.*; public class Main { public static void main(String[] args) { Main m = new Main(); m.exec(); } private void exec() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int result = n * m - (2 * m + 2 * (n - 2)); System.out.println(result); } } 提出情報
Main.java:19: error: class, interface, enum, or record expected import java.util.*; ^ Main.java:37: error: reached end of file while parsing ???? ^ 2 errors
s875548418
p03635
Java
public class Main { public static void main(String[] args) { Main m = new Main(); m.exec(); } private void exec() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int result = n * m - (2 * m + 2 * (n - 2)); System.out.println(result); } }
Main.java:9: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:9: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s901476624
p03635
Java
import java.util.*; public class Main { public static void main(String[] args) { Main m = new Main(); m.exec(); } private void exec() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int result = n * m - (2 * m + 2 * (n - 2)) System.out.println(result); } }
Main.java:14: error: ';' expected int result = n * m - (2 * m + 2 * (n - 2)) ^ 1 error
s238879732
p03635
C++
using namespace std; int main(void) { int n, m; cin >> n >> m; cout << (n - 1) * (m - 1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> n >> m; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:6:3: error: 'cout' was not declared in this scope 6 | cout << (n - 1) * (m - 1) << endl; | ^~~~ a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:6:32: error: 'endl' was not declared in this scope 6 | cout << (n - 1) * (m - 1) << endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std;
s015741292
p03635
Java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author dyominov */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); AWheresSnuke solver = new AWheresSnuke(); solver.solve(1, in, out); out.close(); } static class AWheresSnuke { public void solve(int testNumber, InputReader in, PrintWriter out) { int h = in.nextInt() - 1; int w = in.nextInt() - 1; out.print(h * w) } } static class InputReader implements AutoCloseable { 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()); } public void close() { } } }
Main.java:32: error: ';' expected out.print(h * w) ^ 1 error
s415626397
p03635
C++
tree = input() (n,m)=tree.split() a = int(n)-1 b = int(m)-1 print (a*b)
a.cc:1:1: error: 'tree' does not name a type 1 | tree = input() | ^~~~
s838242503
p03635
C++
#include <bits/stdc++.h> using namespace std; int main(){ cin >> a >> b; cout << (a-1) * (b-1) << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:10: error: 'a' was not declared in this scope 5 | cin >> a >> b; | ^ a.cc:5:15: error: 'b' was not declared in this scope 5 | cin >> a >> b; | ^
s856390226
p03635
C++
#include <iostream> #include <vector> #include <string> #include <cstdlib> #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <math.h> #include <map> #define Z class #define ln cout<<'\n' #define ll long long #define rep(i, n) for(int i = 0; i < (n); ++i) //ASCII a=97, A=65 // int H[N]; rep(i,N) scanf("%d", &H[i]); // int max_x = *std::max_element(x.begin(), x.end()); // int min_y = *std::min_element(y.begin(), y.end()); using namespace std; template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;} template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;} template<Z A>void pr(A a){cout<<a;ln;} template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);} template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);} template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);} template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;} int GCD(int a, int b) { return b ? GCD(b, a%b) : a; } const long long INF = 1LL << 60; int main(){ string a,b; cin >> a >> b; cout << (a-1)*(b-1) << endl; }
a.cc: In function 'int main()': a.cc:33:15: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 33 | cout << (a-1)*(b-1) << endl; | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} 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:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc:33:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 33 | cout << (a-1)*(b-1) << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: a.cc:33:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 33 | cout << (a-1)*(b-1) << endl; | ^ a.cc:33:21: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 33 | cout << (a-1)*(b-1) << endl; | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc:33:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 33 | cout << (a-1)*(b-1) << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: a.cc:33:22: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 33 | cout << (a-1)*(b-1) << endl; | ^
s838378262
p03635
C++
#include <iostream> #include <vector> #include <string> #include <cstdlib> #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <math.h> #include <map> #define Z class #define ln cout<<'\n' #define ll long long #define rep(i, n) for(int i = 0; i < (n); ++i) //ASCII a=97, A=65 // int H[N]; rep(i,N) scanf("%d", &H[i]); // int max_x = *std::max_element(x.begin(), x.end()); // int min_y = *std::min_element(y.begin(), y.end()); using namespace std; template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;} template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;} template<Z A>void pr(A a){cout<<a;ln;} template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);} template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);} template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);} template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;} int GCD(int a, int b) { return b ? GCD(b, a%b) : a; } const long long INF = 1LL << 60; int main(){ string a,b; cin >> a >> b; pr((a-1)*(b-1)); }
a.cc: In function 'int main()': a.cc:33:10: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 33 | pr((a-1)*(b-1)); | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} 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:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc:33:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 33 | pr((a-1)*(b-1)); | ^ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: a.cc:33:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 33 | pr((a-1)*(b-1)); | ^ a.cc:33:16: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 33 | pr((a-1)*(b-1)); | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: a.cc:33:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 33 | pr((a-1)*(b-1)); | ^ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: a.cc:33:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 33 | pr((a-1)*(b-1)); | ^
s364799241
p03635
C++
#include<iostream> #include<string> using namespace std; int main() { string a; cin >> a; char a[1]; char a[a.size]; cout << a[1] ; cout << a.size() - 2; cout << a[a.size()] << endl ; }
a.cc: In function 'int main()': a.cc:9:14: error: conflicting declaration 'char a [1]' 9 | char a[1]; | ^ a.cc:7:16: note: previous declaration as 'std::string a' 7 | string a; | ^ a.cc:10:22: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'long unsigned int' 10 | char a[a.size]; | ^ a.cc:10:18: error: size of array 'a' has non-integral type '<unresolved overloaded function type>' 10 | char a[a.size]; | ~~^~~~ a.cc:10:14: error: conflicting declaration 'char a [1]' 10 | char a[a.size]; | ^ a.cc:7:16: note: previous declaration as 'std::string a' 7 | string a; | ^
s562326929
p03635
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; const double pi = acos(-1); #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__) #define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__) template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { REP(i,v.size()){if(i)os<<" ";os<<v[i];}return os;} template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { REP(i,v.size()){if(i)os<<endl;os<<v[i];}return os;} int main() { // Write Your Code Below string a; cin >> a; cout << a[0]<< a.size()-2 << a[s.size()-1] << endl; }
a.cc: In function 'int main()': a.cc:21:35: error: 's' was not declared in this scope 21 | cout << a[0]<< a.size()-2 << a[s.size()-1] << endl; | ^
s441623654
p03635
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; const double pi = acos(-1); #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__) #define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__) template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { REP(i,v.size()){if(i)os<<" ";os<<v[i];}return os;} template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { REP(i,v.size()){if(i)os<<endl;os<<v[i];}return os;} int main() { // Write Your Code Below string a; cin >> a; cout << s[0]<< s.size()-2 << s[s.size()-1] << endl; }
a.cc: In function 'int main()': a.cc:21:12: error: 's' was not declared in this scope 21 | cout << s[0]<< s.size()-2 << s[s.size()-1] << endl; | ^
s877138278
p03635
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; const double pi = acos(-1); #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__) #define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__) template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { REP(i,v.size()){if(i)os<<" ";os<<v[i];}return os;} template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { REP(i,v.size()){if(i)os<<endl;os<<v[i];}return os;} int main() { // Write Your Code Below string a; cin >>a; cout << s[0]<< s.size()-2 << s[s.size()-1] << endl; }
a.cc: In function 'int main()': a.cc:21:12: error: 's' was not declared in this scope 21 | cout << s[0]<< s.size()-2 << s[s.size()-1] << endl; | ^
s582774395
p03635
C++
#include <iostream> using namespace std; int main() { int n, m; cin >> n >> m; //n本,m本の通りがなす行列はn-1行, m-1列 n = n-1; m = m-1; cout << n * m; cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: 'm\U0000ff1b' was not declared in this scope 7 | cin >> n >> m; | ^~~
s645444554
p03635
C++
#include <iostream> using namespace std; int main() { int n, m; cin >> n >> m //n本,m本の通りがなす行列はn-1行, m-1列 n = n-1; m = m-1; cout << n * m; cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:22: error: expected ';' before 'n' 7 | cin >> n >> m | ^ | ; ...... 11 | n = n-1; | ~
s115606579
p03635
C++
#include<ioatream> using namespace std; int main(){ int m,n; cin>>n>>m; cout<<(n-1)*(m-1)<<endl; return 0; }
a.cc:1:9: fatal error: ioatream: No such file or directory 1 | #include<ioatream> | ^~~~~~~~~~ compilation terminated.
s017815883
p03635
C++
#include <cstdio> using namespace std; int main() { int a,b,c; scanf("%d %d", &a, &b); printf("%d", (a+1)*(b+1)-(a*2+b*2)) }
a.cc: In function 'int main()': a.cc:7:44: error: expected ';' before '}' token 7 | printf("%d", (a+1)*(b+1)-(a*2+b*2)) | ^ | ; 8 | 9 | } | ~
s732835410
p03635
C
#include<stdio.h> int main() { int N, M; scanf_s("%d%d", &N, &M); printf("%d\n", (N - 1) * (M - 1)); return 0; }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%d%d", &N, &M); | ^~~~~~~ | scanf
s416875363
p03635
C
#include<stdio.h> int main() { int N, M; scanf_s("%d%d", &N, &M); printf_s("%d\n", (N - 1) * (M - 1)); }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%d%d", &N, &M); | ^~~~~~~ | scanf main.c:8:9: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration] 8 | printf_s("%d\n", (N - 1) * (M - 1)); | ^~~~~~~~ | printf
s835453302
p03635
C
#include<stdio.h> int main() { int N, M; scanf_s("%d%d", &N, &M); printf_s("%d\n", (N - 1) * (M - 1)); }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%d%d", &N, &M); | ^~~~~~~ | scanf main.c:8:9: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration] 8 | printf_s("%d\n", (N - 1) * (M - 1)); | ^~~~~~~~ | printf
s385745769
p03635
C
#include<stdio.h> int main() { int N, M; scanf_s("%d%d", &N, &M); printf_s("%d\n", (N - 1) * (M - 1)); }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%d%d", &N, &M); | ^~~~~~~ | scanf main.c:8:9: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration] 8 | printf_s("%d\n", (N - 1) * (M - 1)); | ^~~~~~~~ | printf
s654795613
p03635
C++
#include<stdio.h> int main() { int N, M; scanf_s("%d%d", &N, &M); printf_s("%d\n", (N - 1) * (M - 1)); }
a.cc: In function 'int main()': a.cc:6:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 6 | scanf_s("%d%d", &N, &M); | ^~~~~~~ | scanf a.cc:8:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'? 8 | printf_s("%d\n", (N - 1) * (M - 1)); | ^~~~~~~~ | printf
s192709484
p03635
C++
#include <iostream> using namespace std; int main() { int n,m,sum=0; cin>>n>>m; sum=(n-1)(m-1); cout<<sum; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: expression cannot be used as a function 7 | sum=(n-1)(m-1); | ~~~~~^~~~~
s144512217
p03635
C++
#include <iostream> using namespace std; int main() { int n,m,sum=0; cin>>n>>m; sum=((n-1)(m-1)); cout<<sum; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: expression cannot be used as a function 7 | sum=((n-1)(m-1)); | ~~~~~^~~~~
s862877169
p03635
C
n,m = map(int, input().split()) print(int((n - 1) * (m - 1)))
main.c:1:1: warning: data definition has no type or storage class 1 | n,m = map(int, input().split()) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] 1 | n,m = map(int, input().split()) | ^ main.c:1:7: error: implicit declaration of function 'map' [-Wimplicit-function-declaration] 1 | n,m = map(int, input().split()) | ^~~ main.c:1:11: error: expected expression before 'int' 1 | n,m = map(int, input().split()) | ^~~ main.c:2:1: error: expected ',' or ';' before 'print' 2 | print(int((n - 1) * (m - 1))) | ^~~~~
s414172443
p03635
C++
#include <cstdio> using namespace std; int main() { int n. m; scanf("%d%d", &n, &m); printf("%d\n", (n - 1) * (m - 1)); return 0; }
a.cc: In function 'int main()': a.cc:4:8: error: expected initializer before '.' token 4 | int n. m; | ^ a.cc:5:18: error: 'n' was not declared in this scope 5 | scanf("%d%d", &n, &m); | ^ a.cc:5:22: error: 'm' was not declared in this scope 5 | scanf("%d%d", &n, &m); | ^
s181371088
p03635
C
#include <stdio.h> int main(){ int n,m; scanf("%d %d",&n,&m); prnitf("%d\n",(n - 1) * (m - 1)); return 0; }
main.c: In function 'main': main.c:5:3: error: implicit declaration of function 'prnitf'; did you mean 'printf'? [-Wimplicit-function-declaration] 5 | prnitf("%d\n",(n - 1) * (m - 1)); | ^~~~~~ | printf
s439116129
p03635
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); String s = scan.nextLine(); int size = s.length(); char a = s.charAt(0); char z = s.charAt(size - 1); Syste.out.print(a + size - 2 + z); } }
Main.java:10: error: package Syste does not exist Syste.out.print(a + size - 2 + z); ^ 1 error
s394486052
p03635
C++
#include<iostream> using namespace std; int main(){ cin>>n>>m; cout<<(n-1)*(m-1)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:4:10: error: 'n' was not declared in this scope 4 | cin>>n>>m; | ^ a.cc:4:13: error: 'm' was not declared in this scope; did you mean 'tm'? 4 | cin>>n>>m; | ^ | tm
s529576762
p03635
C++
#include<bits/stdc++.h> using namespace std; itn main(){int a,b;cin>>a>>b;cout<<(a-1)*(b-1);}
a.cc:3:1: error: 'itn' does not name a type; did you mean 'int'? 3 | itn main(){int a,b;cin>>a>>b;cout<<(a-1)*(b-1);} | ^~~ | int
s499859291
p03635
C++
#include <iostream> #include<string> #include<algorithm> #include<vector> using namespace std; int main(){ int n,,m; cin>>n>>m; cout<<(n-1)*(m-1)<<endl; }
a.cc: In function 'int main()': a.cc:8:11: error: expected unqualified-id before ',' token 8 | int n,,m; | ^
s450053794
p03635
C++
#include <bits/stdc++.h> using namespace std; int main () { int n,m; cin >> n > m; cout << (n-1) * (m-1) << endl; }
a.cc: In function 'int main()': a.cc:5:18: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 5 | cin >> n > m; | ~~~~~~~~ ^ ~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:5:18: note: candidate: 'operator>(int, int)' (built-in) 5 | cin >> n > m; | ~~~~~~~~~^~~ a.cc:5: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/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1329 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed: a.cc:5:20: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1497 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed: a.cc:5:20: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1673 | operator>(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 5 | cin >> n > m; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 5 | cin >> n > m; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 462 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 507 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1714 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1774 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 5 | cin >> n > m; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 695 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 5 | cin >> n > m; | ^ /usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 702 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed: a.cc:5:20: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 5 | cin >> n > m; | ^ /usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed: a.cc:5:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 5 | cin >> n > m; | ^ /usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Trai
s160354908
p03635
C
#include<stdio.h> int main(void) { int n, m, ans; scanf("%d, %d", &n, %m); ans = (n-1) * (m-1); printf("%d", ans); return 0; }
main.c: In function 'main': main.c:5:23: error: expected expression before '%' token 5 | scanf("%d, %d", &n, %m); | ^
s025878758
p03635
C++
#include<iostream> #include <bits/stdc++.h> #include<stdio.h> #include <stdlib.h> #include<string> #include<queue> #include<algorithm> #include<math.h> using namespace std; int main(){ int a,s; cin>>a>>s; cout<<(a-1)(s-1)<<endl; }
a.cc: In function 'int main()': a.cc:15:20: error: expression cannot be used as a function 15 | cout<<(a-1)(s-1)<<endl; | ~~~~~^~~~~
s294645023
p03635
C++
#include<stdio.h> int main(void){ int n,m,gk; scanf("%d %d",&n,&m); gk = (n-1)*(m-1) printf("%d\n",gk); return 0; }
a.cc: In function 'int main()': a.cc:8:25: error: expected ';' before 'printf' 8 | gk = (n-1)*(m-1) | ^ | ; 9 | 10 | printf("%d\n",gk); | ~~~~~~
s742916584
p03635
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <math.h> using namespace std; int main() { // 整数の入力 int n, m; cin >> n >> m; cout << (n - 1) * (m - 1) << endl; return 0;
a.cc: In function 'int main()': a.cc:14:14: error: expected '}' at end of input 14 | return 0; | ^ a.cc:8:1: note: to match this '{' 8 | { | ^
s706152810
p03635
C++
#include <vector> #include <array> #include <queue> #include <deque> #include <set> #include <list> #include <map> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <random> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <ctime> #include <stdio.h> #include <string.h> #include <math.h> #include <ctype.h> using namespace std; #define _CRT_SECURE_NO_WARNINGS #define REP(i, n) for(int i=0; i<(n); i++) #define LLREP(i,n) for(LL i=0; i<(n); i++) #define FOR(i, m, n) for(int i=(m);i<(n);i++) #define ALL(x) (x).begin(),(x).end() #define SZ(x) ((int)(x).size()) #define SORT(x) sort(ALL(x)) #define REVE(x) reverse(ALL(x)) #define MP make_pair #define PB push_back #define INF INT_MAX typedef vector<int> VI; typedef vector<string> VS; typedef vector<bool> VB; typedef vector<vector<int>> VVI; typedef vector<vector<bool>> VVB; typedef pair<int, int> PII; typedef vector<pair<int, int>> VPII; typedef queue<int> QI; typedef long long LL; int main() { int a, b; cin >> a >> b; cout << (n - 1)*(m - 1) << endl; }
a.cc: In function 'int main()': a.cc:57:18: error: 'n' was not declared in this scope 57 | cout << (n - 1)*(m - 1) << endl; | ^ a.cc:57:26: error: 'm' was not declared in this scope 57 | cout << (n - 1)*(m - 1) << endl; | ^
s357486634
p03635
C++
#include <iostream using namespace std; int main() { int n, m; cin >> n >> m; cout << (n - 1) * (m - 1); }
a.cc:1:19: error: missing terminating > character 1 | #include <iostream | ^
s047012611
p03635
C++
都是十分大叔大叔的
a.cc:1:1: error: '\U000090fd\U0000662f\U00005341\U00005206\U00005927\U000053d4\U00005927\U000053d4\U00007684' does not name a type 1 | 都是十分大叔大叔的 | ^~~~~~~~~~~~~~~~~~
s626099647
p03635
C++
都是十分大叔大叔的
a.cc:1:1: error: '\U000090fd\U0000662f\U00005341\U00005206\U00005927\U000053d4\U00005927\U000053d4\U00007684' does not name a type 1 | 都是十分大叔大叔的 | ^~~~~~~~~~~~~~~~~~
s298845392
p03635
C++
#include<iostream> using namespace std; intn main() { int a,b; cin>>a>>b; cout<<(a-1)*(b-1)<<endl; return 0; }
a.cc:3:1: error: 'intn' does not name a type; did you mean 'int'? 3 | intn main() | ^~~~ | int
s063698451
p03635
C++
#include<bits/stdc++.h> int main() { int a,b; scanf("%d%d",&a,&b); printf("%d",(a-1)(b-1)); return 0; }
a.cc: In function 'int main()': a.cc:6:22: error: expression cannot be used as a function 6 | printf("%d",(a-1)(b-1)); | ~~~~~^~~~~
s205363985
p03635
C++
#include<bits/stdc++.h> int main() { int a,b; cin>>a>>b; cout<<(a-1)(b-1); return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | 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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<(a-1)(b-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:6:16: error: expression cannot be used as a function 6 | cout<<(a-1)(b-1); | ~~~~~^~~~~
s485472825
p03635
C++
#include <bits/stdc++.h> #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) typedef long long ll; using namespace std; const int MOD = 1000000007; const int INF = 1010000000; const double EPS = 1e-10; int h,w,x; char s[1000][1000]; bool visited [1000][1000]; pair<int,int> start,goal; queue<pair<int,pair<int,int>>> q; vector<pair<int,int>> ino; int main(){ int a,b,c,d;cin >>a>>b>>c>>d; cout << (a-1)*(b-1);
a.cc: In function 'int main()': a.cc:19:23: error: expected '}' at end of input 19 | cout << (a-1)*(b-1); | ^ a.cc:17:11: note: to match this '{' 17 | int main(){ | ^
s864429972
p03635
C++
#include<iostream> int main(void){ int n,m; cin>>n>>m; cout<<(n-1)*(m-1); return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin>>n>>m; | ^~~ | 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:5:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 5 | cout<<(n-1)*(m-1); | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s527673912
p03635
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n m; cin >> n >> m; cout << (n-1)*(m-1) << endl; }
a.cc: In function 'int main()': a.cc:4:9: error: expected initializer before 'm' 4 | int n m; | ^ a.cc:5:10: error: 'n' was not declared in this scope; did you mean 'yn'? 5 | cin >> n >> m; | ^ | yn a.cc:5:15: error: 'm' was not declared in this scope; did you mean 'tm'? 5 | cin >> n >> m; | ^ | tm
s155171146
p03635
Java
import java.util.Scanner; public class K_city { public static void main(String[] args) { Scanner in = new Scanner(System.in); String[] line = in.nextLine().split(" "); int sum = (Integer.parseInt(line[0]) - 1) * (Integer.parseInt(line[1]) - 1); System.out.println(sum); } }
Main.java:3: error: class K_city is public, should be declared in a file named K_city.java public class K_city { ^ 1 error
s164384536
p03635
Java
import java.util.Scanner; public class K_city { public static void main(String[] args) { Scanner in = new Scanner(System.in); String[] line = in.nextLine().split(" "); int sum = (Integer.parseInt(line[0]) - 1) * (Integer.parseInt(line[1]) - 1); System.out.println(sum); } }
Main.java:3: error: class K_city is public, should be declared in a file named K_city.java public class K_city { ^ 1 error
s371872372
p03635
Java
#include <bits/stdc++.h> #define INF (1<<30) #define MOD 1000000007 #define l_ength size using ll = long long; using namespace std; int main(){ int a, b; cin >> a >> b; cout << (a-1) * (b-1) << endl; return 0; }
Main.java:1: error: illegal character: '#' #include <bits/stdc++.h> ^ Main.java:1: error: class, interface, enum, or record expected #include <bits/stdc++.h> ^ Main.java:2: error: illegal character: '#' #define INF (1<<30) ^ Main.java:3: error: illegal character: '#' #define MOD 1000000007 ^ Main.java:4: error: illegal character: '#' #define l_ength size ^ Main.java:6: error: class, interface, enum, or record expected using namespace std; ^ Main.java:10: error: not a statement cin >> a >> b; ^ Main.java:11: error: not a statement cout << (a-1) * (b-1) << endl; ^ Main.java:8: error: unnamed classes are a preview feature and are disabled by default. int main(){ ^ (use --enable-preview to enable unnamed classes) 9 errors
s199644769
p03635
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; scanf("%d%d",&n,&m); printf("%d",(n-1)*(m-1)) }
a.cc: In function 'int main()': a.cc:6:29: error: expected ';' before '}' token 6 | printf("%d",(n-1)*(m-1)) | ^ | ; 7 | } | ~
s317901605
p03635
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; scanf("%d%d",&n,&m); printf("%d",(n-1)*(m-1)) }
a.cc: In function 'int main()': a.cc:6:29: error: expected ';' before '}' token 6 | printf("%d",(n-1)*(m-1)) | ^ | ; 7 | } | ~
s993567362
p03635
C++
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<(a-1)*(b-1)<<endl; }
a.cc: In function 'int main()': a.cc:6:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 6 | cout<(a-1)*(b-1)<<endl; | ~~~~~~~~~~~^~~~~~
s541860251
p03635
C++
#include <stdio.h> typedef long long ll; int main() { ll n,m; scanf("%lld %lld",&n,&m); printf("%lld",(n-1)*(m-1)) }
a.cc: In function 'int main()': a.cc:7:31: error: expected ';' before '}' token 7 | printf("%lld",(n-1)*(m-1)) | ^ | ; 8 | } | ~
s677140389
p03635
C++
#include <iostream> using namespace std; int main(void){ int n, m; cin >> n >> m; // implements prtinf("%d\n", (n-1)*(m-1)); return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'prtinf' was not declared in this scope; did you mean 'printf'? 9 | prtinf("%d\n", (n-1)*(m-1)); | ^~~~~~ | printf
s660262268
p03635
C++
#include <iostream> main(){ int n,m; cin>>n>>m; cout<<(n-1)*(m-1); }
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin>>n>>m; | ^~~ | 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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 5 | cout<<(n-1)*(m-1); | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s807190987
p03635
C++
#include"stdafx.h" #include"iostream" using namespace std; int main() { int n, m; cin >> n >> m; cout << (n - 1)*(m - 1) << endl; }
a.cc:1:9: fatal error: stdafx.h: No such file or directory 1 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s461503515
p03635
C++
#include<cstdio> #include<iostream> int main() { int n,m; cin>>n>>m; n--,m--; cout<<n*m; }
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>n>>m; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | cout<<n*m; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s404872888
p03635
C++
#include<cstdio> int main() { int n,m; cin>>n>>m; n--,m--; cout<<n*m; }
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin>>n>>m; | ^~~ a.cc:7:9: error: 'cout' was not declared in this scope 7 | cout<<n*m; | ^~~~