submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s080032371 | p03635 | C++ | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
struct node { int c,t; }a[660];
int m,n,cnt,s=1,f[550];
bool book[550];
bool cmp(node k1,node k2) { return k1.c>k2.c; }
int main()
{
cin >> m >> n;
m--.n--;
cout<<m*n<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:13: error: request for member 'n' in '(m --)', which is of non-class type 'int'
16 | m--.n--;
| ^
|
s472833496 | p03635 | C | #include <stdio.h> main(){int a,b;scanf("%d%d",&a,&b);printf("%d",(a-1)*(b-1));} | main.c:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> main(){int a,b;scanf("%d%d",&a,&b);printf("%d",(a-1)*(b-1));}
| ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s476198282 | p03635 | C++ | #include<cstdio>
#include<queue>
#include<utility>
#include<cstring>
#include<stack>
#include<algorithm>
#include<cmath>
#include<iostream>
#include<map>
#define MAX_N 100001
#define INF_INT 2147483647
#define INF_LL 9223372036854775807
#define REP(i,n) for(int i=0;i<(int)(n);i++)
void init(int n);
int find(int n);
void unite(int x,int y);
bool same(int x, int y);
int dx[4] = {1,0,0,-1};
int dy[4] = {0,1,-1,0};
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
bool cmp_P(const P &a,const P &b){
return a.second < b.second;
}
int main()
{
int n,m;
cin >> N >> M;
cout << (N-1)*(M-1) << endl;
return 0;
}
int par[MAX_N];
int ranks[MAX_N];
//n要素で初期化
void init(int n){
REP(i,n){
par[i] = i;
ranks[i] = 0;
}
}
//木の根を求める
int find(int x){
if(par[x] == x){
return x;
}else{
return par[x] = find(par[x]);
}
}
void unite(int x,int y){
x = find(x);
y = find(y);
if(x == y) return ;
if(ranks[x] < ranks[y]){
par[x] = y;
}else{
par[y] = x;
if(ranks[x] == ranks[y]) ranks[x]++;
}
}
bool same(int x, int y){
return find(x) == find(y);
}
| a.cc: In function 'int main()':
a.cc:29:10: error: 'N' was not declared in this scope
29 | cin >> N >> M;
| ^
a.cc:29:15: error: 'M' was not declared in this scope
29 | cin >> N >> M;
| ^
|
s652432567 | p03635 | C++ | #include <iostream>
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:16: error: 'B' was not declared in this scope
6 | cout<<(a-1)*(B-1)<<endl;
| ^
|
s180266146 | p03635 | C++ | #include <bits/stdc++.h>
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:7:20: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
7 | cout<<(a-1)*(b-1)<endl;
| ~~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: couldn't deduce template parameter '_Bi_iter'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: couldn't deduce template parameter '_Bi_iter'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: couldn't deduce template parameter '_CharT'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:7:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
7 | cout<<(a-1)*(b-1)<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
|
s978517974 | p03635 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
cin >> s;
int len = s.size(s);
cout << s[0] << len - 2 << s[len - 1] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:25: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(std::string&)'
9 | int len = s.size(s);
| ~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
1076 | size() const _GLIBCXX_NOEXCEPT
| ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note: candidate expects 0 arguments, 1 provided
|
s072838344 | p03635 | C++ | #include <iostream>
using namespace std;
int x, y;
cin>>x>>y
cout << (x-1)*(y-1) | a.cc:5:1: error: 'cin' does not name a type
5 | cin>>x>>y
| ^~~
|
s307060445 | p03635 | C++ | using namespace std;
int x, y;
cin>>x>>y
cout << (x-1)*(y-1) | a.cc:4:1: error: 'cin' does not name a type
4 | cin>>x>>y
| ^~~
|
s467646478 | p03635 | C++ | int x, y;
cin>>x>>y
cout << (x-1)*(y-1) << endl; | a.cc:2:1: error: 'cin' does not name a type
2 | cin>>x>>y
| ^~~
|
s413589600 | p03635 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
System.out.println( (m-1)*(n-1);
}
}
| Main.java:8: error: ')' or ',' expected
System.out.println( (m-1)*(n-1);
^
1 error
|
s472890393 | p03635 | C++ | #include <bits/stdc++.h>
#include <typeinfo>
#include <cxxabi.h>
#ifdef LOCAL
#include "dbgtoki.hpp"
#define DUMP(i) dump((string)TOSTRING(i), demangle(typeid(i).name()), __LINE__ , i)
DbgTimer D_t;
#define TSTART() D_t.start()
#define TSTOP() D_t.stop()
#else
#define DUMP(i)
#define TSTART()
#define TSTOP()
#endif
#define TOSTRING(x) #x
#define SZ(x) (int)(x).size()
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(s) (s).begin(), (s).end()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()) , v.end());
using namespace std;
typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
const int EPS = 1e-9;
int main (){
cin.tie(0);
ios::sync_with_stdio(false);
string n;
while(cin >> n ){
TSTART();
cout << (n-1) * (m-1) << endl;
TSTOP();
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:36:15: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
36 | 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:36:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
36 | 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:36:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
36 | 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:36:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>'
36 | 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:36:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>'
36 | 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:36:16: note: mismatched types 'const std::complex<_Tp>' and 'int'
36 | 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:36:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
36 | 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:36:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
36 | 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:36:16: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
36 | 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:36:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
36 | 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:36:16: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
36 | 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:36:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>'
36 | 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:36:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>'
36 | 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:36:16: note: mismatched types 'const std::valarray<_Tp>' and 'int'
36 | cout << (n-1) * (m-1) << endl;
| ^
a.cc:36:22: error: 'm' was not declared in this scope
36 | cout << (n-1) * (m-1) << endl;
| ^
|
s981818032 | p03635 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main() {
cin >> m >> n;
cout << (n - 1) * (m - 1);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:12: error: 'm' was not declared in this scope; did you mean 'tm'?
5 | cin >> m >> n;
| ^
| tm
a.cc:5:17: error: 'n' was not declared in this scope
5 | cin >> m >> n;
| ^
|
s052394426 | p03635 | C++ | #include <iostream>
#include <cstdio>
int main() {
cin >> m >> n;
cout << (n - 1) * (m - 1);
return 0;
} | a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | 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:4:12: error: 'm' was not declared in this scope; did you mean 'tm'?
4 | cin >> m >> n;
| ^
| tm
a.cc:4:17: error: 'n' was not declared in this scope
4 | cin >> m >> n;
| ^
a.cc:5:5: 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
| ^~~~
|
s848097319 | p03635 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
int i;
int p;
cin >> s;
i = s.length;
p= i - 2;
cout<<s[0]<<i<<s[p]
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:11: error: cannot convert 'std::__cxx11::basic_string<char>::length' 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 'int'
9 | i = s.length;
| ^~~~~~
a.cc:11:24: error: expected ';' before 'return'
11 | cout<<s[0]<<i<<s[p]
| ^
| ;
12 | return 0;
| ~~~~~~
|
s443897171 | p03635 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
int i;
cin >> s;
i = s.length;
i = i - 2;
cout<<s[0]<<i<<s[s.length]
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:11: error: cannot convert 'std::__cxx11::basic_string<char>::length' 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 'int'
8 | i = s.length;
| ^~~~~~
a.cc:10:21: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
10 | cout<<s[0]<<i<<s[s.length]
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1083:7: note: declared here
1083 | length() const _GLIBCXX_NOEXCEPT
| ^~~~~~
|
s753839160 | p03635 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
int i;
cin >> s;
i=((s.length)-2)
cout<<s[0]<<i<<s[s.length]
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
8 | i=((s.length)-2)
| ~~~^~~~~~~
| ()
|
s286021647 | p03635 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
int i;
cin >> s;
i=(s.length)-2
cout<<s[0]<<i<<s[s.length]
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
8 | i=(s.length)-2
| ~~~^~~~~~~
| ()
|
s199712286 | p03635 | C++ | #incldue<iostream>
using namespace std;
int main(void) {
int a, b;
cin >> a >> b;
cout << (a-1)*(b-1) << endl;
} | a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
1 | #incldue<iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> a >> b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #incldue<iostream>
a.cc:8:3: error: 'cout' was not declared in this scope
8 | cout << (a-1)*(b-1) << endl;
| ^~~~
a.cc:8:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:26: error: 'endl' was not declared in this scope
8 | cout << (a-1)*(b-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 | #incldue<iostream>
|
s130110825 | p03635 | C++ | #include<iostream>
using namespase std;
int main(void)
{
int m,n;
cin>>n>>m;
cout<<(n-1)*(m-1)<<endl;
return 0;
} | a.cc:2:7: error: expected nested-name-specifier before 'namespase'
2 | using namespase std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: 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:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout<<(n-1)*(m-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:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | cout<<(n-1)*(m-1)<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s195479778 | p03635 | C++ | #include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
using namespace std;
int main(){
int m,n;
cin>>m>>n;
cout<<(m-1)*(n-1)<<endl; | a.cc: In function 'int main()':
a.cc:29:27: error: expected '}' at end of input
29 | cout<<(m-1)*(n-1)<<endl;
| ^
a.cc:26:11: note: to match this '{'
26 | int main(){
| ^
|
s771305495 | p03635 | C++ | #include <iostream>
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:6:16: error: expression cannot be used as a function
6 | cout << (n-1)(m-1) << endl;
| ~~~~~^~~~~
|
s318415884 | p03635 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m;
cin >> n >> m;
cout << (n-1)*(m-1) << endl;
reurn 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'reurn' was not declared in this scope
9 | reurn 0;
| ^~~~~
|
s633072320 | p03635 | C++ | #include <stdio.h>
int main(){
int n,m;
scanf("%d%d",&n, &m);
int mul = (n-1)*(m-1)
printf("%d",mul);
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:5: error: expected ',' or ';' before 'printf'
6 | printf("%d",mul);
| ^~~~~~
|
s888603554 | p03635 | C++ | #include <stdio.h>
int main(){
int n,m;
scanf("%d%d",n, m);
int mul = (n-1)*(m-1)
printf("%d",mul);
return 0;
} | a.cc: In function 'int main()':
a.cc:6:5: error: expected ',' or ';' before 'printf'
6 | printf("%d",mul);
| ^~~~~~
|
s462730605 | p03635 | C++ | #include<iostream>
int main() {
int a, b;
std::cin >> a >> b;
std::cout << (a - 1)*(b - 1) << std::endl;
}
| a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:6:1: error: extended character is not valid in an identifier
6 |
| ^
a.cc:8:1: error: extended character is not valid in an identifier
8 |
| ^
a.cc:2:1: error: '\U000000a0' does not name a type
2 |
| ^
|
s905004723 | p03635 | C++ | #include<iostream>
int main() {
int a, b;
std::cin >> a >> b;
std::cout << (a - 1)*(b - 1) << std::endl;
}
#include<iostream>
int main() {
int a, b;
std::cin >> a >> b;
std::cout << (a - 1)*(b - 1) << std::endl;
}
| a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:6:1: error: extended character is not valid in an identifier
6 |
| ^
a.cc:8:1: error: extended character is not valid in an identifier
8 |
| ^
a.cc:2:1: error: '\U000000a0' does not name a type
2 |
| ^
|
s188869878 | p03635 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<string>
#include<queue>
#include<vector>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)//初期値a,i<bの範囲でループ
#define REP(i,n) FOR(i,0,n)//初期値0,i<nの範囲でループ
using namespace std;
typedef long long ll;//int64
typedef unsigned long long ull;
int n;
ll a[100010];
int c[5];
int main(){
cin>>n;
REP(i,n){
cin>>a[i];
if(a[i]%4==0){
a[i]=4;
}else if(a[i]%2==0){
a[i]=2;
}else{
a[i]=1;
}
c[a[i]]++;
}
int f2=0;
if(c[2])f2==1;
if(f2){
if(c[0]>=c[1]+c[3])cout<<"Yes";
cout<<"No";
}else{
if(c[0]>=floor(n/2))cout<<"Yes"
else cout<<"No";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:37:40: error: expected ';' before 'else'
37 | if(c[0]>=floor(n/2))cout<<"Yes"
| ^
| ;
38 | else cout<<"No";
| ~~~~
|
s588046854 | p03635 | C++ | #include<iostream>
#include<string>
#include <cmath>
using namespace std;
int n. m;
int main() {
cin >> n >> m;
cout << (n-1)*(m-1) << endl;
return 0;
} | a.cc:5:6: error: expected initializer before '.' token
5 | int n. m;
| ^
a.cc: In function 'int main()':
a.cc:7:12: error: 'n' was not declared in this scope; did you mean 'yn'?
7 | cin >> n >> m;
| ^
| yn
a.cc:7:17: error: 'm' was not declared in this scope; did you mean 'tm'?
7 | cin >> n >> m;
| ^
| tm
|
s018904884 | p03635 | C++ | include <iostream>
using namespace std;
int main(){
int m,n;
cin >> m >> n;
cout << (n-1)*(m-1) << endl;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> m >> n;
| ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
7 | cout << (n-1)*(m-1) << endl;
| ^~~~
a.cc:7:26: error: 'endl' was not declared in this scope
7 | cout << (n-1)*(m-1) << endl;
| ^~~~
|
s289455157 | p03635 | C++ | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(x,y) (x=min(x,y))
#define chmax(x,y) (x=max(x,y))
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}
int main(){
cin>>a>>b;
cout<<(a-1)*(b-1)<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:42:14: error: 'a' was not declared in this scope
42 | cin>>a>>b;
| ^
a.cc:42:17: error: 'b' was not declared in this scope
42 | cin>>a>>b;
| ^
|
s780294627 | p03635 | Java | import java.util.Scanner;
public class Maic {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt()-1 ;
int b = scanner.nextInt()-1;
int ans = a*b;
System.out.println(ans);
scanner.close();
}
}
| Main.java:3: error: class Maic is public, should be declared in a file named Maic.java
public class Maic {
^
1 error
|
s213080025 | p03635 | C | #include<stdio.h>
int main(void)
{
int n,m;
scanf("%d%d",&n,&m);
printf("%d\n"n*m-n-m+1);
return 0;
} | main.c: In function 'main':
main.c:7:18: error: expected ')' before 'n'
7 | printf("%d\n"n*m-n-m+1);
| ~ ^
| )
|
s915186251 | p03635 | C++ | #include<stdio.h>
void main(void) {
int n;
int m;
int ans;
scanf("%d%d", &n, &m);
ans = (n - 1)*(m - 1);
printf("%d",ans);
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main(void) {
| ^~~~
|
s015254503 | p03635 | C++ | // AKCity.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
#include<stdio.h>
void main(void) {
int n;
int m;
int ans;
scanf("%d%d", &n, &m);
ans = (n - 1)*(m - 1);
printf("%d",ans);
} | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s894810677 | p03635 | C++ | #include <iostream>
int main(void) {
int a, b;
std::cin >> a >> b;
std::cout << (a-1)*(b-1) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
6 | std::cout << (a-1)*(b-1) << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s572856208 | p03635 | C++ | #include <iostream>
#include <cstdlib>
using namespace std;
#define PrintLn(X) cout << X << endl
int main(void)
{
int a, b;
cin >> a >> b;
PrintLn(((a-1)*(b-1));
return 0;
}
| a.cc:12:2: error: unterminated argument list invoking macro "PrintLn"
12 | }
| ^
a.cc: In function 'int main()':
a.cc:10:9: error: 'PrintLn' was not declared in this scope
10 | PrintLn(((a-1)*(b-1));
| ^~~~~~~
a.cc:10:16: error: expected '}' at end of input
10 | PrintLn(((a-1)*(b-1));
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s466904870 | p03635 | C++ | #include<iostream>
int A,B;
int main(){
cin>>A>>B;
cout<<(A-1)*(B-1);
return 0;
} | a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin>>A>>B;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:5:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | 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
| ^~~~
|
s366714436 | p03635 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
using namespace std;
//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}
//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))
//debug
#define dump(x) cerr << #x << '=' << (x) << endl;
#define debug(x) cerr << #x << '=' << (x) << '('<<'L' << __LINE__ << ')' << ' ' << __FILE__ << endl;
int main(){
int a,b;
cin>>a>>b;
cout(a-1)*(b-1)<<endl;
}
| a.cc: In function 'int main()':
a.cc:74:5: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
74 | cout(a-1)*(b-1)<<endl;
| ~~~~^~~~~
|
s589406023 | p03635 | C++ | #include<bits/stdc++.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:6:24: error: expected ';' before ':' token
6 | cout<<(n-1)*(m-1)<<endl:
| ^
| ;
|
s957765983 | p03635 | C++ | #include <iostream>
#include <algorithm>
#include <array>
#include <math.h>
#include <set>
#include <stdlib.h>
#include <string>
#include <vector>
#define INT_MAX 2000000000
#define MOD 1000000007
#define ll long long
#define rep(i,a,b) for(i = (a); i < (b); i++)
#define bitget(a,b) (((a) >> (b)) & 1)
#define vint vector<int>
#define vsort(x) sort(x.begin(),x.end())
using namespace std;
int main() {
int i, j, k;
int n, m;
cin >> n >> > m;
cout << (n - 1)*(m - 1) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:24:21: error: expected primary-expression before '>' token
24 | cin >> n >> > m;
| ^
|
s222829646 | p03635 | Java | import java.util.Scanner;
//import java.util.Map;
//import java.util.HashMap;
public class TestTest {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int a = in.nextInt()-1;
int b = in.nextInt()-1;
System.out.println(a*b);
}
}
| Main.java:5: error: class TestTest is public, should be declared in a file named TestTest.java
public class TestTest {
^
1 error
|
s729296347 | p03635 | C | #inclue <stdio.h>
int main(void){
int a,b,kakeru;
scanf("%d %d",&a,&b);
a--;b--;
kakeru = a*b;
printf("%d",kakeru);
return 0;
} | main.c:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
1 | #inclue <stdio.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%d %d",&a,&b);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #inclue <stdio.h>
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | scanf("%d %d",&a,&b);
| ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | printf("%d",kakeru);
| ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s779307272 | p03635 | C++ | #include<algorithm>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<sstream>
#include<unordered_map>
#include<unordered_set>
#include<vector>
using uint = unsigned int;
using ll = long long;
enum : int { M = (int)1e9 + 7 };
enum : ll { MLL = (ll)1e18L + 9 };
#ifdef LOCAL
#include"rprint2.hpp"
#else
#define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
#endif
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n, m;
cin >> n >> m;
cout << (n - 1) * (m - 1) << '\n';
return 0;
}
| a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:1: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:1: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
In file included from a.cc:4:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:14: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:14: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:27: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:27: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:40: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:40: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:54: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:54: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:30: error: 'ostream' has not been declared
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~~~~
a.cc:21:67: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
a.cc:20:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | #define FUNC(name) template <ostream& out = cout, class... T> void name(T&&...){ }
| ^~~~
a.cc:21:67: note: in expansion of macro 'FUNC'
21 | FUNC(prints) FUNC(printe) FUNC(printw) FUNC(printew) FUNC(printb) FUNC(printd);
| ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s509293498 | p03635 | C++ | import java.util.Scanner;
public class Main {
Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
new Main().compute();
}
void compute() {
System.out.println((scanner.nextInt() - 1) * (scanner.nextInt()) - 1);
}
}
| a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s730502824 | p03635 | C++ | n, m = map(int, raw_input().split())
print (n-1) * (m-1) | a.cc:1:1: error: 'n' does not name a type
1 | n, m = map(int, raw_input().split())
| ^
|
s160221258 | p03635 | C++ | int no1, no2;
scanf("%d%d", &no1, &no2);
printf("%d",(no1-1) * (no2 - 1));
| a.cc:3:6: error: expected constructor, destructor, or type conversion before '(' token
3 | scanf("%d%d", &no1, &no2);
| ^
a.cc:5:7: error: expected constructor, destructor, or type conversion before '(' token
5 | printf("%d",(no1-1) * (no2 - 1));
| ^
|
s301876144 | p03635 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b;
cin >>a >>b;
cout<<(a-1)*(b-1)<<end l;
return 0;} | a.cc: In function 'int main()':
a.cc:7:18: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
7 | cout<<(a-1)*(b-1)<<end l;
| ~~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
306 | operator<<(nullptr_t)
| ^~~~~~~~
/usr/include/c++/14/ostream:306:18: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::nullptr_t'
306 | operator<<(nullptr_t)
| |
s007553343 | p03635 | C++ | #include<iostream>
int main() { int n,m;cin>>n>>m;cout<<(n-1)*(m-1)<<endl; }
| a.cc: In function 'int main()':
a.cc:2:22: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
2 | int main() { int n,m;cin>>n>>m;cout<<(n-1)*(m-1)<<endl; }
| ^~~
| 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:2:32: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
2 | int main() { int n,m;cin>>n>>m;cout<<(n-1)*(m-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:2:51: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
2 | int main() { int n,m;cin>>n>>m;cout<<(n-1)*(m-1)<<endl; }
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s570494639 | p03635 | C++ | include<iostream>
using namespace std;
int m,n;int main(){
cin>>m>>n;
cout<<(m-1)*(n-1);
return 0;} | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope
4 | cin>>m>>n;
| ^~~
a.cc:5:1: error: 'cout' was not declared in this scope
5 | cout<<(m-1)*(n-1);
| ^~~~
|
s544330128 | p03635 | C++ | 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 Anirudh Rayabharam (mail@anirudhrb.com)
*/
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);
KCity solver = new KCity();
solver.solve(1, in, out);
out.close();
}
static class KCity {
public void solve(int testNumber, InputReader in, PrintWriter out) {
int m = in.nextInt();
int n = in.nextInt();
out.println((m - 1) * (n - 1));
}
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
}
}
| a.cc:1:1: error: 'import' does not name a type
1 | import java.io.OutputStream;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.InputStream;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.io.PrintWriter;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
5 | import java.util.StringTokenizer;
| ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
6 | import java.io.IOException;
| ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
7 | import java.io.BufferedReader;
| ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
8 | import java.io.InputStreamReader;
| ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: 'import' does not name a type
9 | import java.io.InputStream;
| ^~~~~~
a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:17:1: error: expected unqualified-id before 'public'
17 | public class Main {
| ^~~~~~
|
s314490070 | p03635 | C++ | #include<stdio.h>
int main(void)
{
int n,s;
scanf("%d %d",&n,&s);
n--; s--;
n=n*s;
printf(%d\n",n);
return 0;
} | a.cc:8:18: error: stray '\' in program
8 | printf(%d\n",n);
| ^
a.cc:8:20: warning: missing terminating " character
8 | printf(%d\n",n);
| ^
a.cc:8:20: error: missing terminating " character
8 | printf(%d\n",n);
| ^~~~~
a.cc: In function 'int main()':
a.cc:8:16: error: expected primary-expression before '%' token
8 | printf(%d\n",n);
| ^
a.cc:8:17: error: 'd' was not declared in this scope
8 | printf(%d\n",n);
| ^
|
s759915794 | p03635 | C | #include <stdio.h>
2
3int main(void){
4 int n,m;
5
6 fscanf(stdin, "%d %d", &n, &m);
7
8 printf("%d\n", (n-1)*(m-1));
9
10 return 0;
11}
| main.c:2:2: error: expected identifier or '(' before numeric constant
2 | 2
| ^
main.c:3:2: error: invalid suffix "int" on integer constant
3 | 3int main(void){
| ^~~~
|
s094237781 | p03635 | C++ | #include<iostream>
using namespace std;
int main()
{
int n,m;
cin >> n >> m;
cout << (n-1)*(m-1); << "\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:8:24: error: expected primary-expression before '<<' token
8 | cout << (n-1)*(m-1); << "\n";
| ^~
|
s270778512 | p03635 | C++ | #include<iostream>
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:8:24: error: expected primary-expression before '<<' token
8 | cout << (n-1)*(m-1); << endl;
| ^~
|
s739570369 | p03635 | C | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<ctime>
#include<queue>
using namespace std;
char a[1001];
int main()
{
gets(a);
int str=strlen(a);
printf("%c%d%c",a[0],str-2,a[str-1]);
return 0;
}
| main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s263119945 | p03635 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<ctime>
#include<queue>
using namespace std;
char a[1001];
int main()
{
gets(a);
int str=strlen(a);
cout<<a[0]<<str-2<<a[str-1];
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:2: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(a);
| ^~~~
| getw
|
s017350153 | p03635 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n,m
cin>>n>>m;
n--;
m--;
int a=n*m;
cout<<a<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'cin'
7 | cin>>n>>m;
| ^~~
a.cc:9:5: error: 'm' was not declared in this scope
9 | m--;
| ^
|
s462774031 | p03635 | C++ | #include <iostream>
int main()
{
int a, b;
cin >> a >> b;
cout << (a - 1) * (b - 1);
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:9: 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
| ^~~~
|
s214130786 | 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:5:5: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d %d", &n, &m);
| ^~~~~~~
| scanf
|
s006677750 | p03635 | C++ | test2 | a.cc:1:1: error: 'test2' does not name a type
1 | test2
| ^~~~~
|
s156271907 | p03635 | C++ | hoge | a.cc:1:1: error: 'hoge' does not name a type
1 | hoge
| ^~~~
|
s613836944 | p03635 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main()
{
int a[100000];
int n;
int i;
cin >> n >> a[];
for(i=0;i<=n-1;i++){
if(a[i]*a[i+1]%4!=0){
cout << No << endl;
break;
if(i==n){
cout << Yes << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before ']' token
9 | cin >> n >> a[];
| ^
a.cc:13:25: error: 'No' was not declared in this scope
13 | cout << No << endl;
| ^~
a.cc:16:33: error: 'Yes' was not declared in this scope
16 | cout << Yes << endl;
| ^~~
a.cc:20:2: error: expected '}' at end of input
20 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s874655158 | p03635 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main()
{
int a[100000];
int n;
cin >> n >> a[];
for(i=0;i<=n-1;i++){
if(a[i]*a[i+1]%4!=0){
cout << No << endl;
break;
if(i==n){
cout << Yes << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:23: error: expected primary-expression before ']' token
8 | cin >> n >> a[];
| ^
a.cc:10:13: error: 'i' was not declared in this scope
10 | for(i=0;i<=n-1;i++){
| ^
a.cc:12:25: error: 'No' was not declared in this scope
12 | cout << No << endl;
| ^~
a.cc:15:33: error: 'Yes' was not declared in this scope
15 | cout << Yes << endl;
| ^~~
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s279186549 | p03635 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main()
{
int a[100000];
int n;
cin >> n >> a;
for(i=0;i<=n-1;i++){
if(a[i]*a[i+1]%4!=0){
cout << No << endl;
break;
if(i==n){
cout << Yes << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:18: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int [100000]')
8 | cin >> n >> a;
| ~~~~~~~~ ^~ ~
| | |
| | int [100000]
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*'
8 | cin >> n >> a;
| ^
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: invalid conversion from 'int*' to 'short int' [-fpermissive]
8 | cin >> n >> a;
| ^
| |
| int*
a.cc:8:21: error: cannot bind rvalue '(short int)((int*)(& a))' to 'short int&'
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive]
8 | cin >> n >> a;
| ^
| |
| int*
a.cc:8:21: error: cannot bind rvalue '(short unsigned int)((int*)(& a))' to 'short unsigned int&'
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: invalid conversion from 'int*' to 'int' [-fpermissive]
8 | cin >> n >> a;
| ^
| |
| int*
a.cc:8:21: error: cannot bind rvalue '(int)((int*)(& a))' to 'int&'
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive]
8 | cin >> n >> a;
| ^
| |
| int*
a.cc:8:21: error: cannot bind rvalue '(unsigned int)((int*)(& a))' to 'unsigned int&'
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: invalid conversion from 'int*' to 'long int' [-fpermissive]
8 | cin >> n >> a;
| ^
| |
| int*
a.cc:8:21: error: cannot bind rvalue '(long int)((int*)(& a))' to 'long int&'
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive]
8 | cin >> n >> a;
| ^
| |
| int*
a.cc:8:21: error: cannot bind rvalue '(long unsigned int)((int*)(& a))' to 'long unsigned int&'
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: invalid conversion from 'int*' to 'long long int' [-fpermissive]
8 | cin >> n >> a;
| ^
| |
| int*
a.cc:8:21: error: cannot bind rvalue '(long long int)((int*)(& a))' to 'long long int&'
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive]
8 | cin >> n >> a;
| ^
| |
| int*
a.cc:8:21: error: cannot bind rvalue '(long long unsigned int)((int*)(& a))' to 'long long unsigned int&'
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:8:21: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
8 | cin >> n >> a;
| ^
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int [100000]' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int [100000]' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int [100000]' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int [100000]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'int [100000]' to 'std::basic_istream<char>:: |
s833007453 | p03635 | C++ | #include<iostream>
#include<string.h>
int main()
{
char s[100];
int n;
cin >> s;
n=strlen(s);
cout << s[0] << n-2 << s[n-1];
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> s;
| ^~~
| 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:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout << s[0] << n-2 << s[n-1];
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s469817309 | p03635 | C++ | #include<iostream>
#include<string.h>
int main()
{
char str[100];
int n;
cin >> str;
n=strlen(str);
cout << str[0] << n-2 << str[n-1];
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> str;
| ^~~
| 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:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout << str[0] << n-2 << str[n-1];
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s009591863 | p03635 | C | #include <iostream>
using namespace std;
int main()
{
int m,n;
while(cin>>m>>n)
{
cout<<(m-1)*(n-1)<<endl;
}
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s598429914 | p03635 | C |
#include<stdio.h>
int main(void)
{
int main n, m,t;
scanf("%d%d",&n,&m);
t=(n-1)*(m-1);
printf("\n%d\n",t);
return 0;
} | main.c: In function 'main':
main.c:5:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'n'
5 | int main n, m,t;
| ^
main.c:5:11: error: 'n' undeclared (first use in this function)
main.c:5:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:14: error: 'm' undeclared (first use in this function)
5 | int main n, m,t;
| ^
main.c:5:16: error: 't' undeclared (first use in this function)
5 | int main n, m,t;
| ^
|
s172065662 | p03635 | C | //A
#include<stdio.h>
int main(void)
{
int main n, m,t;
scanf("%d%d",&n,&m);
t=(n-1)*(m-1);
printf("\n%d\n",t);
return 0;
} | main.c: In function 'main':
main.c:6:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'n'
6 | int main n, m,t;
| ^
main.c:6:11: error: 'n' undeclared (first use in this function)
main.c:6:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:14: error: 'm' undeclared (first use in this function)
6 | int main n, m,t;
| ^
main.c:6:16: error: 't' undeclared (first use in this function)
6 | int main n, m,t;
| ^
|
s696520188 | p03635 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b;
cin << a<< b;
cout << (a-1)*(b-1) << endl;
return0;
}
| a.cc: In function 'int main()':
a.cc:7:5: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin << a<< b;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:7:5: note: candidate: 'operator<<(int, int)' (built-in)
7 | cin << a<< b;
| ~~~~^~~~
a.cc:7:5: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:7:1: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
7 | cin << a<< b;
| ^~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed:
a.cc:7:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
/usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]':
a.cc:7:8: required from here
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
a.cc:11:1: error: 'return0' was not declared in this scope
11 | return0;
| ^~~~~~~
|
s211817191 | p03635 | Java | import java.io.*;
import java.util.*;
class Test
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int m=sc.nextInt();
System.out.println((n-1)*(m-1)); | Main.java:11: error: reached end of file while parsing
System.out.println((n-1)*(m-1));
^
1 error
|
s530961724 | p03635 | C++ | #include <iostream>
using namespace std;
int main(){
int n, m;
cin>>n>>m;
cout<<(n-1)*(m-1)≤≤endl;
} | a.cc:7:22: error: extended character ≤ is not valid in an identifier
7 | cout<<(n-1)*(m-1)≤≤endl;
| ^
a.cc:7:22: error: extended character ≤ is not valid in an identifier
a.cc:1:1: error: '\U0000ff03include' does not name a type
1 | #include <iostream>
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin>>n>>m;
| ^~~
a.cc:7:5: error: 'cout' was not declared in this scope
7 | cout<<(n-1)*(m-1)≤≤endl;
| ^~~~
|
s441682767 | p03635 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <array>
#include <vector>
#include <functional>
#include <unordered_map>
#include <map>
#include <numeric>
#include <limits>
#include <utility>
#include <queue>
#include <atltime.h>
#include <random>
using namespace std;
typedef long long LL;
int main(void) {
int a, b;
cin >> a >> b;
cout << (a - 1)*(b - 1) << endl;
return 0;
} | a.cc:14:10: fatal error: atltime.h: No such file or directory
14 | #include <atltime.h>
| ^~~~~~~~~~~
compilation terminated.
|
s007457586 | p03635 | C++ | #include<bits\stdc++.h>
const int oo = 1e9;
using namespace std;
void fast(){
std::ios_base::sync_with_stdio(0);
cin.tie(NULL); cout.tie(NULL);
}
int main(){
fast();
int n , m;cin>>n>>m;
cout<<(n-1 * m-1 )<<endl;
return 0;
}
//mosta7il_ | a.cc:1:13: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s730949058 | p03635 | C++ | #include<bits\stdc++.h>
const int oo = 1e9;
using namespace std;
void fast(){
std::ios_base::sync_with_stdio(0);
cin.tie(NULL); cout.tie(NULL);
}
int main(){
fast();
int n , m;cin>>n>>m;
cout<<(n * m )/2<<endl;
return 0;
}
//mosta7il_ | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s940303059 | p03635 | C++ | #include<iostream>
using namespace std;
int main(void){
int n,m;
cin>>n>>m;
cout<<(n-1)*(m-1)<<endl;
return 0;
}
~ | a.cc:10:2: error: expected class-name at end of input
10 | ~
| ^
|
s877812586 | p03635 | C++ | #include<bit/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
a--;b--;
cout << a*b << endl;
return 0;
} | a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory
1 | #include<bit/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s101499774 | p03635 | C++ | n, m = map(int, input().split())
print((n-1)*(m-1))
| a.cc:1:1: error: 'n' does not name a type
1 | n, m = map(int, input().split())
| ^
|
s873467541 | p03635 | C++ | #include <bits/stdc++.h>
using namespace std;
long long int N, a, i;
int main(){
scanf("%lld%lld", &N, &M);
cout << (N - 1)*(M - 1) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:28: error: 'M' was not declared in this scope
7 | scanf("%lld%lld", &N, &M);
| ^
|
s105725627 | p03635 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cassert>
#include <complex>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <ctime>
#include <cctype>
#include <set>
#include <map>
#include <queue>
#include <bitset>
#include <deque>
#include <stack>
#include <memory.h>
using namespace std;
#define ll long long
int main() {
int H, W; cin >> H >> W;
int N; cin >> N;
int a[N+1];
for (int i = 1; i <= N; i++) {
cin >> a[i];
}
int color = 1;
int c[H+1][W+1];
for (int i = 1; i <= H; i++) {
if (i % 2 == 1) {
for (int j = 1; j <= W; j++) {
if (a[color] == 0) {
color++;
}
a[color]--;
c[i][j] = color;
}
}
else {
for (int j = W; j >= 1; j--) {
if (a[color] == 0) {
color++;
}
a[color]--;
c[i][j] = color;
}
}
}
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; j++) {
cout << c[i][j] << " ";
}
cout << endl;
}
return 0;
} | a.cc:33:1: error: extended character is not valid in an identifier
33 |
| ^
a.cc:36:1: error: extended character is not valid in an identifier
36 |
| ^
a.cc:47:1: error: extended character is not valid in an identifier
47 |
| ^
a.cc:58:1: error: extended character is not valid in an identifier
58 |
| ^
a.cc:65:1: error: extended character is not valid in an identifier
65 |
| ^
a.cc: In function 'int main()':
a.cc:33:1: error: '\U000000a0' was not declared in this scope
33 |
| ^
a.cc:36:2: error: expected ';' before 'for'
36 |
| ^
| ;
37 | for (int i = 1; i <= H; i++) {
| ~~~
a.cc:37:21: error: 'i' was not declared in this scope
37 | for (int i = 1; i <= H; i++) {
| ^
a.cc:58:2: error: expected ';' before 'for'
58 |
| ^
| ;
59 | for (int i = 1; i <= H; i++) {
| ~~~
a.cc:65:2: error: expected ';' before 'return'
65 |
| ^
| ;
66 | return 0;
| ~~~~~~
|
s532695208 | p03635 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cassert>
#include <complex>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <ctime>
#include <cctype>
#include <set>
#include <map>
#include <queue>
#include <bitset>
#include <deque>
#include <stack>
#include <memory.h>
using namespace std;
#define ll long long
using namespace std;
int main() {
int H, W; cin >> H >> W;
int N; cin >> N;
int a[N+1];
for (int i = 1; i <= N; i++) {
cin >> a[i];
}
int color = 1;
int c[H+1][W+1];
for (int i = 1; i <= H; i++) {
if (i % 2 == 1) {
for (int j = 1; j <= W; j++) {
if (a[color] == 0) {
color++;
}
a[color]--;
c[i][j] = color;
}
}
else {
for (int j = W; j >= 1; j--) {
if (a[color] == 0) {
color++;
}
a[color]--;
c[i][j] = color;
}
}
}
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; j++) {
cout << c[i][j] << " ";
}
cout << endl;
}
return 0;
} | a.cc:27:1: error: extended character is not valid in an identifier
27 |
| ^
a.cc:35:1: error: extended character is not valid in an identifier
35 |
| ^
a.cc:38:1: error: extended character is not valid in an identifier
38 |
| ^
a.cc:49:1: error: extended character is not valid in an identifier
49 |
| ^
a.cc:60:1: error: extended character is not valid in an identifier
60 |
| ^
a.cc:67:1: error: extended character is not valid in an identifier
67 |
| ^
a.cc:27:1: error: '\U000000a0' does not name a type
27 |
| ^
|
s555900332 | p03635 | C++ | #include <iostream>
int main(){
int n, m;
std:cin >> n >> m;
std:cout << (n-1)*(m-1) << std:endl;
return 0;
}; | a.cc: In function 'int main()':
a.cc:5:8: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | std: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:6:4: error: duplicate label 'std'
6 | std:cout << (n-1)*(m-1) << std:endl;
| ^~~
a.cc:6:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | std:cout << (n-1)*(m-1) << std:endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:6:34: error: found ':' in nested-name-specifier, expected '::'
6 | std:cout << (n-1)*(m-1) << std:endl;
| ^
| ::
|
s265945477 | p03635 | C++ | #include <iostream>
int main(){
int n, m;
std:cin >> n >> m
std:cout << (n-1)*(m-1) << std:endl;
return 0;
}; | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | std: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
| ^~~
|
s713298098 | p03635 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n、m;
cin >> n >> m;
cout << (n-1)*(m-1) << endl;
return 0;
} | a.cc:5:7: error: extended character 、 is not valid in an identifier
5 | int n、m;
| ^
a.cc: In function 'int main()':
a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'?
6 | cin >> n >> m;
| ^
| yn
a.cc:6:15: error: 'm' was not declared in this scope; did you mean 'tm'?
6 | cin >> n >> m;
| ^
| tm
|
s954198286 | p03635 | C++ | #include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <locale>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <wchar.h>
#include <wctype.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <exception>
#include <functional>
#include <map>
#include <ios>
#include <iosfwd>
#include <istream>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <utility>
#include <vector>
#include <cwchar>
#include <cwctype>
#include <complex.h>
#include <fenv.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <tgmath.h>
#include <conio.h>
#include <numeric>
#include <list>
#include <windows.h>
#include <cfloat>
#include <climits>
#include <unordered_map>
#include <unordered_set>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
cout<<--n*--m;
return 0;
} | a.cc:53:10: fatal error: conio.h: No such file or directory
53 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s431608990 | p03635 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int N;
cin >> N;
int mod4 = 0;
int modX = 0;
vector<unsigned int> A(N);
for(int i=0; i<N; i++){
cin >> A[i];
if(A[i] % 4 == 0) mod4++;
else if(A[i] % 2 != 0) modX++;
}
if(mod4 > 0){
if(mod4 >= modX){
cout << "Yes" << endl;
} else{
cout << "No" << endl;
}
}else if(modX = 0 && N % 2==0){
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:27:9: error: expected '}' before 'else'
27 | else
| ^~~~
a.cc:25:39: note: to match this '{'
25 | }else if(modX = 0 && N % 2==0){
| ^
|
s936740913 | p03635 | C++ | #include <iostream>
using namespace std;
int n;
int m;
int main()
{
cin >> n >> m;
cout << (n-1) * (m-1) <, endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:32: error: expected primary-expression before ',' token
10 | cout << (n-1) * (m-1) <, endl;
| ^
|
s330795649 | p03635 | C++ | #include <iostream>
using namespace std;
int n;
int m;
int main()
{
cin >> n >> m;
cout << (n-1) * (m-1) <, endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:32: error: expected primary-expression before ',' token
10 | cout << (n-1) * (m-1) <, endl;
| ^
|
s194996255 | p03635 | C++ | #include <iostream>
using namespace std;
int n;
int m;
int main()
{
cin >> n >> m;
cout << (n-1) * (m-1) <, endl;
} | a.cc: In function 'int main()':
a.cc:10:32: error: expected primary-expression before ',' token
10 | cout << (n-1) * (m-1) <, endl;
| ^
|
s963566168 | p03635 | C | #include <stdio.h>
#include <string.h>
main() {
char str[222];
int a,b;
int i;
scanf("%s", &str);
strncpy( a, str, 1 ); //strの先頭の位置から1文字をtにコピー
t[1] = '\0';
n = strlen(str);
for (i = n - 2 ; i ; i -= 2) {
if(strncmp(str, str + i/2 , i/2 ) == 0) {
printf( "%s %d %s \n", a,i,b );
return 0;
}
} | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main() {
| ^~~~
main.c: In function 'main':
main.c:10:14: error: passing argument 1 of 'strncpy' makes pointer from integer without a cast [-Wint-conversion]
10 | strncpy( a, str, 1 ); //strの先頭の位置から1文字をtにコピー
| ^
| |
| int
In file included from main.c:2:
/usr/include/string.h:144:40: note: expected 'char * restrict' but argument is of type 'int'
144 | extern char *strncpy (char *__restrict __dest,
| ~~~~~~~~~~~~~~~~~^~~~~~
main.c:11:5: error: 't' undeclared (first use in this function)
11 | t[1] = '\0';
| ^
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:6: error: 'n' undeclared (first use in this function)
13 | n = strlen(str);
| ^
main.c:20:1: error: expected declaration or statement at end of input
20 | }
| ^
|
s820983737 | p03635 | C | #include <stdio.h>
#include <string.h>
int main2() {
char c[101];
char num,chl;
scanf("%s", &c);
num = strlen(c);
chl = c[(num - 1)];
printf("%c%d%c",c[0],(num-2),chl);
return 0;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s679009128 | p03635 | C++ | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int f(int x) {
int main() {
int a, b;
cin >> a >> b;
cout << (a - 1) * (b - 1) << endl;
return 0;
}
| a.cc: In function 'int f(int)':
a.cc:13:11: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
13 | int main() {
| ^~
a.cc:13:11: note: remove parentheses to default-initialize a variable
13 | int main() {
| ^~
| --
a.cc:13:11: note: or replace parentheses with braces to value-initialize a variable
a.cc:13:14: error: a function-definition is not allowed here before '{' token
13 | int main() {
| ^
a.cc:20:4: error: expected '}' at end of input
20 | }
| ^
a.cc:11:14: note: to match this '{'
11 | int f(int x) {
| ^
a.cc:20:4: warning: no return statement in function returning non-void [-Wreturn-type]
20 | }
| ^
|
s704348716 | p03635 | C | include <stdio.h>
int main(){
unsigned char n,m;
scanf("%d %d",&n,&m);
printf("%d\n",(--n)*(--m));
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s100452944 | p03635 | C | include<stdio.h>
int main(){
unsigned char n,m;
scanf("%d %d",&n,&m);
printf("%d\n",(--n)*(--m));
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s374498499 | p03635 | C++ | gueuehsh | a.cc:1:1: error: 'gueuehsh' does not name a type
1 | gueuehsh
| ^~~~~~~~
|
s292406835 | p03635 | C | #include <stdio.h>
int main(void)
{
int n,m;
scanf("%d%d",&n,&m)
printf("%d\n",(n - 1)*(m - 1));
return 0;
} | main.c: In function 'main':
main.c:6:28: error: expected ';' before 'printf'
6 | scanf("%d%d",&n,&m)
| ^
| ;
7 | printf("%d\n",(n - 1)*(m - 1));
| ~~~~~~
|
s705535056 | p03635 | C | #include <stdio.h>
int main(void)
{
int n,m;
scanf("%d%d",&n&m);
printf("%d\n",(n - 1)*(m - 1));
return 0;
} | main.c: In function 'main':
main.c:6:24: error: invalid operands to binary & (have 'int *' and 'int')
6 | scanf("%d%d",&n&m);
| ~~^
| |
| int *
|
s848008308 | p03635 | C | #include <stdio.h>
int main(void)
{
int n,m;
scanf("%d%d",&n&m)
printf("%d\n",(n - 1)*(m - 1));
return 0;
} | main.c: In function 'main':
main.c:6:24: error: invalid operands to binary & (have 'int *' and 'int')
6 | scanf("%d%d",&n&m)
| ~~^
| |
| int *
main.c:6:27: error: expected ';' before 'printf'
6 | scanf("%d%d",&n&m)
| ^
| ;
7 | printf("%d\n",(n - 1)*(m - 1));
| ~~~~~~
|
s122914902 | p03635 | Java | public class Main{
public static void main(String[]args){
int n = new java.util.Scarnner(System.in).NextInt();
int m = new java.util.Scarnner(System.in).NextInt();
int k= (n-1)*(m-1);
System.out.println(k);
}
} | Main.java:3: error: cannot find symbol
int n = new java.util.Scarnner(System.in).NextInt();
^
symbol: class Scarnner
location: package java.util
Main.java:4: error: cannot find symbol
int m = new java.util.Scarnner(System.in).NextInt();
^
symbol: class Scarnner
location: package java.util
2 errors
|
s477767115 | p03635 | C++ | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
* Built using CHelper plug-in Actual solution is at the top
*/
public class Main {
public final static double MAX_T = 1000000;
public final static double MIN_T = 0;
public static int s = 0;
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
TaskC solver = new TaskC();
solver.solve(1, in, out);
out.close();
}
static class TaskC {
public void solve(int testNumber, InputReader in, PrintWriter out) {
int n = in.nextInt();
int m = in.nextInt();
out.println((n - 1) * (m - 1));
}
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
public long nextLong() {
return Long.parseLong(next());
}
public double nextFloat() {
return Double.parseDouble(next());
}
public double nextDouble() {
return Double.parseDouble(next());
}
}
}
| a.cc:1:1: error: 'import' does not name a type
1 | import java.io.OutputStream;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.InputStream;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.io.PrintWriter;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
5 | import java.util.ArrayList;
| ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
6 | import java.util.Comparator;
| ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
7 | import java.util.Iterator;
| ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
8 | import java.util.Random;
| ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: 'import' does not name a type
9 | import java.util.StringTokenizer;
| ^~~~~~
a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'import' does not name a type
10 | import java.util.TreeSet;
| ^~~~~~
a.cc:10:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:11:1: error: 'import' does not name a type
11 | import java.io.BufferedReader;
| ^~~~~~
a.cc:11:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:12:1: error: 'import' does not name a type
12 | import java.io.InputStreamReader;
| ^~~~~~
a.cc:12:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:17:1: error: expected unqualified-id before 'public'
17 | public class Main {
| ^~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.