submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s237353111
|
p03970
|
C++
|
#include <iostream>
#include <string>
using namespace std;
int main(){
string s;
int k=0;
cin>>s;
if(s[0]!='C')k++;
if(s[1]!='O')k++;
if(s[2]!='D')k++;
if(s[3]!='E')k++;
if(s[4]!='F')k++;FESTIVAL2016CODE
if(s[5]!='E')k++;
if(s[6]!='S')k++;
if(s[7]!='T')k++;
if(s[8]!='I')k++;
if(s[9]!='V')k++;
if(s[10]!='A')k++;
if(s[11]!='L')k++;
if(s[12]!='2')k++;
if(s[13]!='0')k++;
if(s[14]!='1')k++;
if(s[15]!='6')k++;
cout<<k<<endl;
}
|
a.cc: In function 'int main()':
a.cc:12:26: error: 'FESTIVAL2016CODE' was not declared in this scope
12 | if(s[4]!='F')k++;FESTIVAL2016CODE
| ^~~~~~~~~~~~~~~~
|
s653998998
|
p03970
|
C++
|
#include <bits/stdc++>
using namespace std;
int main(){
string s;
cin >> s;
string t="CODEFESTIVAL2016";
int res=0;
for(int i=0;i<t.size();++i){
if(s[i]!=t[i])res++;
}
cout<<res<<endl;
}
|
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
1 | #include <bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s811070935
|
p03970
|
C++
|
#include<bits/stdc++.h>
#include<cmath>
using namespace std;
int main(){
string a,b;
cin>>a;
b="CODEFESTIVAL2016"
int ans;
ans=0;
for(long long i=0;i<16;i++){
if(a[i]==b[i]){
ans++;
}
}
cout<<ans<<endl;
}
|
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before 'int'
8 | b="CODEFESTIVAL2016"
| ^
| ;
9 | int ans;
| ~~~
a.cc:10:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | ans=0;
| ^~~
| abs
|
s196667178
|
p03970
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]){
int cnt = 0;
string cf2016[] = "CODEFESTIVAL2016";
string s;
cin >> s;
for (int i = 0; i < cf2016.size(); ++i)
{
if(cf2016.at(i) != s.at(i)) ++cnt;
}
cout << cnt << endl;
return 0;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:6:27: error: array must be initialized with a brace-enclosed initializer
6 | string cf2016[] = "CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
a.cc:9:36: error: request for member 'size' in 'cf2016', which is of non-class type 'std::string [17]' {aka 'std::__cxx11::basic_string<char> [17]'}
9 | for (int i = 0; i < cf2016.size(); ++i)
| ^~~~
a.cc:11:27: error: request for member 'at' in 'cf2016', which is of non-class type 'std::string [17]' {aka 'std::__cxx11::basic_string<char> [17]'}
11 | if(cf2016.at(i) != s.at(i)) ++cnt;
| ^~
|
s868899292
|
p03970
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]){
int cnt = 0;
string cf2016[] = "CODEFESTIVAL2016";
string s(20);
cin >> s;
for (int i = 0; i < cf2016.size(); ++i)
{
if(cf2016.at(i) != s.at(i)) ++cnt;
}
cout << cnt << endl;
return 0;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:6:27: error: array must be initialized with a brace-enclosed initializer
6 | string cf2016[] = "CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
a.cc:7:20: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
7 | string s(20);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
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/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
/usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
149 | using _If_sv = enable_if_t<
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:797:30: required from here
797 | template<typename _Tp, typename = _If_sv<_Tp, void>>
| ^~~~~~~~
/usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, void>'
2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
788 | basic_string(const _Tp& __t, size_type __pos, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
765 | basic_string(_InputIterator __beg, _InputIterator __end,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:646:7: note: template argument deduction/substitution failed:
a.cc:7:18: note: cannot convert '20' (type 'int') to type 'const char*'
7 | string s(20);
| ^~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
721 | basic_string(basic_string&& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
716 | basic_string(const basic_string& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:711:45: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<char>'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
682 | basic_string(basic_string&& __str) noexcept
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:682:35: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>&&'
682 | basic_string(basic_string&& __str) noexcept
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
624 | basic_string(const _CharT* __s, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
604 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
586 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
569 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
552 | basic_string(const basic_string& __str)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:552:40: note: no known conversion for argument 1 from 'int' to 'const std::__cxx11::basic_string<char>&'
552 | basic_string(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:540:34: note: no known conversion for argument 1 from 'int' to 'const std::allocator<char>&'
540 | basic_string(const _Alloc& __a) _GLI
|
s704920849
|
p03970
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]){
int cnt = 0;
string cf2016[] = "CODEFESTIVAL2016";
string s[20];
cin >> s;
for (int i = 0; i < cf2016.size(); ++i)
{
if(cf2016.at(i) != s.at(i)) ++cnt;
}
cout << cnt << endl;
return 0;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:6:27: error: array must be initialized with a brace-enclosed initializer
6 | string cf2016[] = "CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
a.cc:8:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'})
8 | cin >> s;
| ~~~ ^~ ~
| | |
| | std::string [20] {aka std::__cxx11::basic_string<char> [20]}
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
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:16: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
8 | cin >> s;
| ^
/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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive]
8 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:8:16: error: cannot bind rvalue '(short int)((std::string*)(& s))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive]
8 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:8:16: error: cannot bind rvalue '(short unsigned int)((std::string*)(& s))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive]
8 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:8:16: error: cannot bind rvalue '(int)((std::string*)(& s))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive]
8 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:8:16: error: cannot bind rvalue '(unsigned int)((std::string*)(& s))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive]
8 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:8:16: error: cannot bind rvalue '(long int)((std::string*)(& s))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive]
8 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:8:16: error: cannot bind rvalue '(long unsigned int)((std::string*)(& s))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive]
8 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:8:16: error: cannot bind rvalue '(long long int)((std::string*)(& s))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive]
8 | cin >> s;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:8:16: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& s))' 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:16: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
8 | cin >> s;
| ^
/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 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'} 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 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'} 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 'std::string [20]' {aka 'std::__cxx11::basic_string<char> [20]'} to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream
|
s493520949
|
p03970
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main(){
int idx=0;
string s=(16,CODEFESTIVAL2016);
string ss;
cin>>ss;
for(int i=16;i>0;i--){
if(s[i]!=ss[i])idx++;
}
cout<<idx<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:16: error: 'CODEFESTIVAL2016' was not declared in this scope
7 | string s=(16,CODEFESTIVAL2016);
| ^~~~~~~~~~~~~~~~
|
s538604235
|
p03970
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main(){
int idx=0;
string s=CODEFESTIVAL2016;
string ss;
cin>>ss;
for(int i=16;i>0;i--){
if(s[i]!=ss[i])idx++;
}
cout<<idx<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:12: error: 'CODEFESTIVAL2016' was not declared in this scope
7 | string s=CODEFESTIVAL2016;
| ^~~~~~~~~~~~~~~~
|
s380036345
|
p03970
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main(){
int idx=0;
string s=CODEFESTIVAL2016;
string ss;
cin>>ss;
for(int i=16;i>0;i--){
if(s[i]!=ss[i])idx++;
}
cout<<idx<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:12: error: 'CODEFESTIVAL2016' was not declared in this scope
7 | string s=CODEFESTIVAL2016;
| ^~~~~~~~~~~~~~~~
|
s102081121
|
p03970
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string a = C0DEFESTIVAL2O16;
int ans = 0;
for(int i = 0; i < 16; i++) {
if(s[i] != a[i]) ans++;
}
cout << ans << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:14: error: 'C0DEFESTIVAL2O16' was not declared in this scope
7 | string a = C0DEFESTIVAL2O16;
| ^~~~~~~~~~~~~~~~
|
s299005707
|
p03970
|
C++
|
#include <bits/stdc++.h>
#define int long long
#define f(i,n) for(int i=0;i<n;i++)
#define INF INT_MAX
#define LINF LLONG_MAX
#define mod 1000000007
#define pie 3.141592653589793238462643383279
#define P pair<int,int>
#define prique priority_queue
#define F first
#define S second
using namespace std;
signed main(){
int ans=0;
string s=CODEFESTIVAL2016,t;
cin>>t;
f(i,16){
if(s[i]!=t[i]) ans++;
}
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:18: error: 'CODEFESTIVAL2016' was not declared in this scope
15 | string s=CODEFESTIVAL2016,t;
| ^~~~~~~~~~~~~~~~
a.cc:16:14: error: 't' was not declared in this scope
16 | cin>>t;
| ^
|
s841100414
|
p03970
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin>>S;
string S0="CODEFESTIVAL2016";
int cnt=0;
rep(i,S.size()){
if(S[i]!=S0[i])cnt++;
}
cout<<cnt<<endl;
}
|
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
9 | rep(i,S.size()){
| ^
a.cc:9:9: error: 'rep' was not declared in this scope
9 | rep(i,S.size()){
| ^~~
|
s335146982
|
p03970
|
C++
|
#include<bits/stdc++.h>
using namespace std;
string s="CODEFESTIVAL2016a";
int ans=0;
int main()
{
gets(a);
for(int i=0;i<=15;i++)
if(a[i]!=s[i]) ans++;
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:10: error: 'a' was not declared in this scope
9 | gets(a);
| ^
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(a);
| ^~~~
| getw
|
s716969950
|
p03970
|
C++
|
#include<bits/stdc++.h>
using namespace std;
string s="CODEFESTIVAL2016a";
int ans=0;
int main()
{
getline(cin,a);
for(register ll i=0;i<=15i++)
if(a[i]!=s[i]) ans++;
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:17: error: 'a' was not declared in this scope
9 | getline(cin,a);
| ^
a.cc:10:18: error: 'll' does not name a type
10 | for(register ll i=0;i<=15i++)
| ^~
a.cc:10:25: error: expected ';' before 'i'
10 | for(register ll i=0;i<=15i++)
| ^
| ;
a.cc:10:25: error: 'i' was not declared in this scope
a.cc:10:31: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
10 | for(register ll i=0;i<=15i++)
| ~~~^~
a.cc:10:33: error: expected ';' before ')' token
10 | for(register ll i=0;i<=15i++)
| ^
| ;
|
s589717649
|
p03970
|
C++
|
#include<bits/stdc++.h>
using namespace std;
string s="CODEFESTIVAL2016a;
int ans=0;
int main()
{
getline(cin,a);
for(register ll i=0;i<=15i++)
if(a[i]!=s[i]) ans++;
cout<<ans<<endl;
return 0;
}
|
a.cc:4:10: warning: missing terminating " character
4 | string s="CODEFESTIVAL2016a;
| ^
a.cc:4:10: error: missing terminating " character
4 | string s="CODEFESTIVAL2016a;
| ^~~~~~~~~~~~~~~~~~~
a.cc:5:1: error: expected primary-expression before 'int'
5 | int ans=0;
| ^~~
a.cc: In function 'int main()':
a.cc:9:17: error: 'a' was not declared in this scope
9 | getline(cin,a);
| ^
a.cc:10:18: error: 'll' does not name a type
10 | for(register ll i=0;i<=15i++)
| ^~
a.cc:10:25: error: expected ';' before 'i'
10 | for(register ll i=0;i<=15i++)
| ^
| ;
a.cc:10:25: error: 'i' was not declared in this scope
a.cc:10:31: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
10 | for(register ll i=0;i<=15i++)
| ~~~^~
a.cc:10:33: error: expected ';' before ')' token
10 | for(register ll i=0;i<=15i++)
| ^
| ;
a.cc:11:24: error: 'ans' was not declared in this scope; did you mean 'abs'?
11 | if(a[i]!=s[i]) ans++;
| ^~~
| abs
a.cc:12:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
12 | cout<<ans<<endl;
| ^~~
| abs
|
s657603886
|
p03970
|
C++
|
#include <iostream>
#include <string>
#include <vector>
typedef unsigned int UINT;
using namespace std;
int main(void) {
const string CLECT = "CODEFESTIVAL2016";
string C;
cin >> C;
int ans = 0;
for (int index = 0; i < CLECT.length(); ++index) {
if (CLECT[index] != C[index])
ans++;
}
cout << ans << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:25: error: 'i' was not declared in this scope
13 | for (int index = 0; i < CLECT.length(); ++index) {
| ^
|
s690931103
|
p03970
|
C++
|
#include <iostream>
#include<string>
using namespace std;
int main() {
string s;cin>>s;
char s2[16]="CODEFESTIVAL2016";
int ans=0;
for(int i=0;i<16;i++){
if(s2!=s)ans++;
}
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:21: error: initializer-string for 'char [16]' is too long [-fpermissive]
7 | char s2[16]="CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
|
s452402799
|
p03970
|
C++
|
s1 = 'CODEFESTIVAL2016'
print s2
ans = 0
for i in range(len(s1)):
ans += [0, 1][s1[i] != s2[i]]
print ans
|
a.cc:1:6: warning: multi-character literal with 16 characters exceeds 'int' size of 4 bytes
1 | s1 = 'CODEFESTIVAL2016'
| ^~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 's1' does not name a type
1 | s1 = 'CODEFESTIVAL2016'
| ^~
|
s719022886
|
p03970
|
C++
|
#include<bits/stdc++.h>
using namespace std;
char s;
int ans=0;
int main()
{
cin>>s;
if(s!='C')ans++;
cin>>s;
if(s!='O')ans++;
cin>>s;
if(s!='D')ans++;
cin>>s;
if(s!='E')ans++;
cin>>s;
if(s!='F')ans++;
cin>>s;
if(s!='E')ans++;
cin>>s;
if(s!='S')ans++;
cin>>s;
if(s!='T')ans++;
cin>>s;
if(s!='I')ans++;
cin>>s;
if(s!='V')ans++;
cin>>s;
if(s!='A')ans++;
cin>>s;ODEFESTIVAL2016
if(s!='L')ans++;
cin>>s;
if(s!='2')ans++;
cin>>s;
if(s!='0')ans++;
cin>>s;
if(s!='1')ans++;
cin>>s;
if(s!='6')ans++;
cout<<ans;
}
|
a.cc: In function 'int main()':
a.cc:29:12: error: 'ODEFESTIVAL2016' was not declared in this scope
29 | cin>>s;ODEFESTIVAL2016
| ^~~~~~~~~~~~~~~
|
s564356208
|
p03970
|
C++
|
#include<bits/stdc++.h>
using namespace std;
string st,st1;
int main()
{
st1="CODEFESTIVAL2016";
cin>>st;
for(int i=0;i<st.size();i++)
if(st[i]!=st1[i])z++;
cout<<z<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:28: error: 'z' was not declared in this scope
9 | if(st[i]!=st1[i])z++;
| ^
a.cc:10:15: error: 'z' was not declared in this scope
10 | cout<<z<<endl;
| ^
|
s436304120
|
p03970
|
C++
|
#include <bits/stdc++.h>
//#include <Rem>
using namespace std;
string s,t="CODEFESTIVAL2016";
int count=0;
int main()
{
cin>>s;
for (int i=0; i<s.length(); i++)
if(s[i]!=t[i])
count++;
printf("%d\n",count);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:13: error: reference to 'count' is ambiguous
13 | count++;
| ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
4025 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
a.cc:6:5: note: 'int count'
6 | int count=0;
| ^~~~~
a.cc:14:19: error: reference to 'count' is ambiguous
14 | printf("%d\n",count);
| ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
4025 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
| ^~~~~
a.cc:6:5: note: 'int count'
6 | int count=0;
| ^~~~~
|
s084507616
|
p03970
|
C++
|
using namespace std;
#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define debug(x) cerr << #x << ":" << x << endl;
#define OK(ok) cout << (ok ? "Yes" : "No") << endl;
typedef long long ll;
void CINT(){}
template <class Head,class... Tail>
void CINT(Head&& head,Tail&&... tail) {
cin >> head; CINT(move(tail)...);
}
#define CIN(...) int __VA_ARGS__;CINT(__VA_ARGS__)
#define LCIN(...) ll __VA_ARGS__;CINT(__VA_ARGS__)
#define SCIN(...) string __VA_ARGS__;CINT(__VA_ARGS__)
const int INF = 1e9 + 1;
const int MOD = 1e9 + 7;
const int MAX_N = 1e5 + 1;
string raw = "CODEFESTIVAL2016";
string s;
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
cin >> s;
int ans = 0;
REP(i, s.size()) {
if (s[i] != raw[i]) ans++;
}
cout << ans << endl;
return 0;
}
|
a.cc: In function 'void CINT(Head&&, Tail&& ...)':
a.cc:18:3: error: 'cin' was not declared in this scope
18 | cin >> head; CINT(move(tail)...);
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 |
a.cc: At global scope:
a.cc:28:1: error: 'string' does not name a type
28 | string raw = "CODEFESTIVAL2016";
| ^~~~~~
a.cc:29:1: error: 'string' does not name a type
29 | string s;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:33:3: error: 'cin' was not declared in this scope
33 | cin.tie(0);
| ^~~
a.cc:33:3: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:3: error: 'ios' has not been declared
34 | ios::sync_with_stdio(false);
| ^~~
a.cc:36:10: error: 's' was not declared in this scope
36 | cin >> s;
| ^
a.cc:39:17: error: 'raw' was not declared in this scope
39 | if (s[i] != raw[i]) ans++;
| ^~~
a.cc:42:3: error: 'cout' was not declared in this scope
42 | cout << ans << endl;
| ^~~~
a.cc:42:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:42:18: error: 'endl' was not declared in this scope
42 | cout << ans << endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 |
|
s571123811
|
p03970
|
Java
|
import java.util.Scanner;
public class Signboard{
public static void main(String[] args)
{
Scanner sc =new Scanner(System.in);
String s=sc.next(); //入力された文字列
String test="CODEFESTIVAL2016";
int num=0; //書き換えるかい回数
//1文字ずつ一致しているか確認
for(int i=0;i<s.length();i++)
{
char s_c=s.charAt(i);
if(!(s_c==test.charAt(i))) num++;
}
//一致していない回数(=書き換える回数)を出力
System.out.println(num);
}
}
|
Main.java:3: error: class Signboard is public, should be declared in a file named Signboard.java
public class Signboard{
^
1 error
|
s021929734
|
p03970
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin >> s;
string str = "CODEFESTIVAL2016";
int num = 0;
for(int = 0;i < str.size();i++){
if(s[i] != str[i]){
num++;
}
}
cout << num << endl;
}
|
a.cc: In function 'int main()':
a.cc:11:11: error: expected unqualified-id before '=' token
11 | for(int = 0;i < str.size();i++){
| ^
a.cc:11:10: error: expected ';' before '=' token
11 | for(int = 0;i < str.size();i++){
| ^~
| ;
a.cc:11:11: error: expected primary-expression before '=' token
11 | for(int = 0;i < str.size();i++){
| ^
a.cc:11:15: error: 'i' was not declared in this scope
11 | for(int = 0;i < str.size();i++){
| ^
a.cc:11:29: error: expected ')' before ';' token
11 | for(int = 0;i < str.size();i++){
| ~ ^
| )
a.cc:11:30: error: 'i' was not declared in this scope
11 | for(int = 0;i < str.size();i++){
| ^
|
s162003317
|
p03970
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin >> s;
string str = "CODEFESTIVAL2016";
int num = 0;
REP(i,str.size()){
if(s[i] != str[i]){
num++;
}
}
cout << num << endl;
}
|
a.cc: In function 'int main()':
a.cc:11:7: error: 'i' was not declared in this scope
11 | REP(i,str.size()){
| ^
a.cc:11:3: error: 'REP' was not declared in this scope
11 | REP(i,str.size()){
| ^~~
|
s070605441
|
p03970
|
C
|
#include <iostream>
#include <string>
using namespace std;
int main(void){
string s,t;
int x=0,i;
cin>>s;
t="CODEFESTIVAL2016";
for(i=0;i<16;i++){
if(s[i]!=t[i]) x++;
}
cout<<x<<endl;
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s201068213
|
p03970
|
C
|
#include <iostream>
using namespace std;
int main(void){
string s,t;
int x=0,i;
cin>>s;
t="CODEFESTIVAL2016";
for(i=0;i<16;i++){
if(s[i]!=t[i]) x++;
}
cout<<x<<endl;
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s361024284
|
p03970
|
C++
|
#include <bits/stdc++.h>
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <cmath>
#include <iomanip>
#include <time.h>
#define dibs reserve
#define OVER9000 1234567890123456789LL
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define tisic 47
#define soclose 1e-8
#define chocolate win
// so much chocolate
#define patkan 9
#define ff first
#define ss second
#define abs(x) ((x < 0)?-(x):x)
#define uint unsigned int
#define dbl long double
#define pi 3.14159265358979323846
using namespace std;
// mylittledoge
typedef long long cat;
#ifdef DONLINE_JUDGE
// palindromic tree is better than splay tree!
#define lld I64d
#endif
int main() {
cin.sync_with_stdio(0);
cin.tie(0);
cout << fixed << setprecision(10);
string S, Sc ="CODEFESTIVAL2016";
cin >> S;
for(int i =0; i < (int)S.length(); i++) if(S[i] != Sc[i]) ans++;
cout << ans << "\n";
return 0;}
// look at my code
// my code is amazing
|
a.cc: In function 'int main()':
a.cc:47:67: error: 'ans' was not declared in this scope; did you mean 'abs'?
47 | for(int i =0; i < (int)S.length(); i++) if(S[i] != Sc[i]) ans++;
| ^~~
| abs
a.cc:48:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
48 | cout << ans << "\n";
| ^~~
| abs
|
s194121562
|
p03970
|
C++
|
#include<bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define vvi vector<vi>
#define vs vector<string>
#define pb push_back
#define P pair<int,int>
#define vp vector<P>
#define PP pair<P,int>
#define vpp vector<PP>
#define fi first
#define se second
#define INF 1e9
#define MOD 1000000007
#define REP(i,n) for(int i=0;i<n;i++)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define all(x) (x).begin(),(x).end()
int main(){
string t;
cin>>t;
string a="CODEFESTIVAL2016";
int ans=0;
REP(i,t.length()){
if(a[i]!=s[i])ans++;
}
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:25:18: error: 's' was not declared in this scope
25 | if(a[i]!=s[i])ans++;
| ^
|
s646040642
|
p03970
|
C
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <limits.h>
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0);
#define ll long long
#define INF 100000000
#define MOD 1000000007
#define SIZE 100005
#define FOR(i,a,n) for(i=(a);i<(n);i++)
int MAX(int a,int b){ return a>b?a:b; }
int MIN(int a,int b){ return a<b?a:b; }
int comp(const void* a,const void* b){
return *(int*)a-*(int*)b;
}
char s[17].t[17]="CODEFESTIVAL2016";
int main(void)
{
int i,ans=0;
scanf("%s",s);
FOR(i,0,16){
if(s[i]!=t[i]) ans++;
}
printf("%d\n",ans);
return 0;
}
|
main.c:18:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
18 | char s[17].t[17]="CODEFESTIVAL2016";
| ^
main.c: In function 'main':
main.c:22:20: error: 's' undeclared (first use in this function)
22 | scanf("%s",s);
| ^
main.c:22:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:26: error: 't' undeclared (first use in this function)
24 | if(s[i]!=t[i]) ans++;
| ^
|
s134781133
|
p03970
|
C++
|
#include <bits/stdc++.h>
using namespace std;
char b[17] = "CODEFESTIVAL2016";
int main(){
char a[17]; scanf("%s", a);
for(int i = 0; i < 16; i++) if(a[i] != b[i]) cnt++;
printf("%d\n", cnt);
}
|
a.cc: In function 'int main()':
a.cc:8:50: error: 'cnt' was not declared in this scope; did you mean 'int'?
8 | for(int i = 0; i < 16; i++) if(a[i] != b[i]) cnt++;
| ^~~
| int
a.cc:9:20: error: 'cnt' was not declared in this scope; did you mean 'int'?
9 | printf("%d\n", cnt);
| ^~~
| int
|
s241050762
|
p03970
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int b[17] = "CODEFESTIVAL2016";
int main(){
char a[17]; scanf("%s", a);
for(int i = 0; i < 16; i++) if(a[i] != b[i]) cnt++;
printf("%d\n", cnt);
}
|
a.cc:4:13: error: array must be initialized with a brace-enclosed initializer
4 | int b[17] = "CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:50: error: 'cnt' was not declared in this scope; did you mean 'int'?
8 | for(int i = 0; i < 16; i++) if(a[i] != b[i]) cnt++;
| ^~~
| int
a.cc:9:20: error: 'cnt' was not declared in this scope; did you mean 'int'?
9 | printf("%d\n", cnt);
| ^~~
| int
|
s227188211
|
p03970
|
C++
|
S = raw_input()
print sum(s!=t for s, t in zip(S, 'CODEFESTIVAL2016'))
|
a.cc:2:35: warning: multi-character literal with 16 characters exceeds 'int' size of 4 bytes
2 | print sum(s!=t for s, t in zip(S, 'CODEFESTIVAL2016'))
| ^~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'S' does not name a type
1 | S = raw_input()
| ^
|
s847892822
|
p03970
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t="CODEFESTIVAL2016";
cin>>s;
int sum=0;
for(int i=0;i<16;i++)if(s[I]!=t[I])sum++;
cout<<sum<<endl;
}
|
a.cc: In function 'int main()':
a.cc:7:27: error: 'I' was not declared in this scope
7 | for(int i=0;i<16;i++)if(s[I]!=t[I])sum++;
| ^
|
s016059992
|
p03970
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t="CODEFESTIVAL2016";
cin>>s;
int sum=0;
for(int I=0;i<16;i++)if(s[I]!=t[I])sum++;
cout<<sum<<endl;
}
|
a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
7 | for(int I=0;i<16;i++)if(s[I]!=t[I])sum++;
| ^
|
s756170478
|
p03970
|
C++
|
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)
//最大公約数
long gcd(long a, long b){
if (a%b==0){
return b;
}
else{
return gcd(b,a%b);
}
}
//最小公倍数
long lcm(long a, long b){
return (a*b) / gcd(a,b);
}
typedef long long ll;
char str[17];
int main(){
char s[] = {"CODEFESTIVAL2016"};
gets(str);
int cnt = 0;
REP(i,16){
if (str[i] != s[i]) cnt++;
}
cout << cnt << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:35:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
35 | gets(str);
| ^~~~
| getw
|
s296117326
|
p03970
|
C++
|
342
|
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 342
| ^~~
|
s486281618
|
p03970
|
C
|
#include<stdio.h>
int main(){
char *seikai="CODEFESTIVAL2016";
char in[256];
int i,j=sizeof(seikai);
int diff=0;
scanf("%s",in);
for(i=0;i<j;i++){
if(seikai[i]!=in[i]){
diff++;
}
}
printf("%d",diff)
return 0;
}
|
main.c: In function 'main':
main.c:16:26: error: expected ';' before 'return'
16 | printf("%d",diff)
| ^
| ;
17 | return 0;
| ~~~~~~
|
s313462973
|
p03970
|
Java
|
import java.util.Scanner;
/**
* Created by apple on 10/21/16.
*/
public class Main {
public static void main(String[] args) {
Scanner s1 = new Scanner(System.in);
int N = s1.nextInt();
int A = s2.nextInt();
int B = s3.nextInt();
String S = s4.nextLine();
int count = 0;
for(int i = 0; i < N; i++) {
if(S.charAt(i) == 'a' && count < A + B) {
count++;
System.out.println("Yes");
} else if(S.charAt(i) == 'b' && count < A + B && count <= B) {
count++;
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
}
|
Main.java:10: error: cannot find symbol
int A = s2.nextInt();
^
symbol: variable s2
location: class Main
Main.java:11: error: cannot find symbol
int B = s3.nextInt();
^
symbol: variable s3
location: class Main
Main.java:12: error: cannot find symbol
String S = s4.nextLine();
^
symbol: variable s4
location: class Main
3 errors
|
s929690977
|
p03970
|
Java
|
public class Main {
public static void main(String[] args) {
Scanner s1 = new Scanner(System.in);
int N = s1.nextInt();
if(N < 1 || N > 100000) {
throw new IllegalArgumentException();
}
Scanner s2 = new Scanner(System.in);
int A = s2.nextInt();
if(A < 1 || A > 100000) {
throw new IllegalArgumentException();
}
Scanner s3 = new Scanner(System.in);
int B = s3.nextInt();
if(B < 1 || B > 100000) {
throw new IllegalArgumentException();
}
Scanner s4 = new Scanner(System.in);
String S = s4.nextLine();
if(S.length() != N) {
throw new IllegalArgumentException();
}
int count = 0;
for(int i = 0; i < N; i++) {
if(S.charAt(i) == 'a' && count < A + B) {
count++;
System.out.println("Yes");
} else if(S.charAt(i) == 'b' && count < A + B && count <= B) {
count++;
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
}
|
Main.java:3: error: cannot find symbol
Scanner s1 = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner s1 = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:9: error: cannot find symbol
Scanner s2 = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:9: error: cannot find symbol
Scanner s2 = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:15: error: cannot find symbol
Scanner s3 = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:15: error: cannot find symbol
Scanner s3 = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:21: error: cannot find symbol
Scanner s4 = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:21: error: cannot find symbol
Scanner s4 = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
8 errors
|
s359808937
|
p03970
|
C++
|
#include <iostream>
#include <ctring>
using namespace std;
int main()
{
char* x="CODEFESTIVAL2016";
string a;
cin>>a;
int res = 0;
char b[16];
strcpy(b,a.c_str());
for(int i=0;i<16;i++){
if(x[i]!=b[i]){
res+=1;
}
}
cout<<res;
return 0;
}
|
a.cc:2:10: fatal error: ctring: No such file or directory
2 | #include <ctring>
| ^~~~~~~~
compilation terminated.
|
s588068095
|
p03970
|
C++
|
#include <iostream>
using namespace std;
int main()
{
char* x="CODEFESTIVAL2016";
string a;
cin>>a;
int res = 0;
char b[16];
strcpy(b,a.c_str());
for(int i=0;i<16;i++){
if(x[i]!=b[i]){
res+=1;
}
}
cout<<res;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
7 | char* x="CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
a.cc:12:5: error: 'strcpy' was not declared in this scope
12 | strcpy(b,a.c_str());
| ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 |
|
s527692202
|
p03970
|
C++
|
#include <iostream>
#include <string>
using namespace std;
int main(){
int num, a, b;
scanf("%d %d %d", &num, &a, &b);
char str[num+1];
scanf("%s", str);
for(int i = 0; i < std::strlen(str); i++){
if(str[i] == 'a'){
if(a > 0)
a--;
else if( b > 0)
b--;
else{
printf("No\n");
continue;
}
printf("Yes\n");
}
else if(str[i] == 'b'){
if(b > 0)
b--;
else{
printf("No\n");
continue;
}
printf("Yes\n");
}
else
printf("No\n");
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:29: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'?
13 | for(int i = 0; i < std::strlen(str); i++){
| ^~~~~~
| mbrlen
|
s410283014
|
p03970
|
C++
|
#include <iostream>
#include <string>
using namespace std;
int main(){
int num, a, b;
scanf("%d %d %d", &num, &a, &b);
char str[num+1];
scanf("%s", str);
for(int i = 0; i < strlen(str); i++){
if(str[i] == 'a'){
if(a > 0)
a--;
else if( b > 0)
b--;
else{
printf("No\n");
continue;
}
printf("Yes\n");
}
else if(str[i] == 'b'){
if(b > 0)
b--;
else{
printf("No\n");
continue;
}
printf("Yes\n");
}
else
printf("No\n");
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:24: error: 'strlen' was not declared in this scope
13 | for(int i = 0; i < strlen(str); i++){
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | #include <string>
|
s360996856
|
p03970
|
C++
|
#include <cstdio>
string str="CODEFESTIVAL2016";
int main(void){
string s;
cin >> s;
int cnt=0;
for(int i=0;i<16;i++){
if(s[i]!=str[i])cnt++;
}
printf("%d\n",cnt);
return 0;
}
|
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
3 | string str="CODEFESTIVAL2016";
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope; did you mean 'stdin'?
6 | string s;
| ^~~~~~
| stdin
a.cc:7:9: error: 'cin' was not declared in this scope
7 | cin >> s;
| ^~~
a.cc:7:16: error: 's' was not declared in this scope
7 | cin >> s;
| ^
a.cc:10:26: error: 'str' was not declared in this scope; did you mean 'std'?
10 | if(s[i]!=str[i])cnt++;
| ^~~
| std
|
s687203411
|
p03970
|
C++
|
#include<stdio.h>
#include <string.h>
int main(){
char a[17];
char b[17] ="CODEFESTIVAL2016";
int i;
int x;
scanf("%s",a);
for(i=0;i<=15;i++){
if(strcmp(a[i+1],b[i+1])==0){
x++;
}else{}
}
printf("%d",x);
}
|
a.cc: In function 'int main()':
a.cc:10:16: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
10 | if(strcmp(a[i+1],b[i+1])==0){
| ~~~~~^
| |
| char
In file included from a.cc:2:
/usr/include/string.h:156:32: note: initializing argument 1 of 'int strcmp(const char*, const char*)'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
a.cc:10:23: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
10 | if(strcmp(a[i+1],b[i+1])==0){
| ~~~~~^
| |
| char
/usr/include/string.h:156:50: note: initializing argument 2 of 'int strcmp(const char*, const char*)'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
|
s191706725
|
p03970
|
C++
|
#include<stdio.h>
int main(){
char a[17];
char b[17] ="CODEFESTIVAL2016";
int i;
int x;
scanf("%s",a);
for(i=0;i<=15;i++){
if(strcmp(a[i+1],b[i+1])==0){
x++;
}else{}
}
printf("%d",x);
}
|
a.cc: In function 'int main()':
a.cc:9:4: error: 'strcmp' was not declared in this scope
9 | if(strcmp(a[i+1],b[i+1])==0){
| ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<stdio.h>
+++ |+#include <cstring>
2 | int main(){
|
s942766598
|
p03970
|
C++
|
#include<stdio.h>
int main(){
char a[16];
char b[16] ="CODEFESTIVAL2016";
int i;
int x;
scanf("%s",&a);
for(i=0;i<=15;i++){
if(strcmp(a[i+1],b[i+1])==0){
x++;
}else{}
}
printf("%d",x);
}
|
a.cc: In function 'int main()':
a.cc:4:13: error: initializer-string for 'char [16]' is too long [-fpermissive]
4 | char b[16] ="CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
a.cc:9:4: error: 'strcmp' was not declared in this scope
9 | if(strcmp(a[i+1],b[i+1])==0){
| ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<stdio.h>
+++ |+#include <cstring>
2 | int main(){
|
s126441940
|
p03970
|
C++
|
#include <iostream>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long
#define ull unsigned ll
#define db double
#define INF 0x3f3f3f3f
#define MOD 1000000007
#define PII pair<int, int>
string str;
const string right = "CODEFESTIVAL2016";
int main() {
cin >> str;
int ans = 0;
for (int i = 0; i < right.size(); i++) {
if (right[i] != str[i]) {
ans++;
}
}
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:21:25: error: reference to 'right' is ambiguous
21 | for (int i = 0; i < right.size(); i++) {
| ^~~~~
In file included from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/bits/ios_base.h:1070:3: note: candidates are: 'std::ios_base& std::right(ios_base&)'
1070 | right(ios_base& __base)
| ^~~~~
a.cc:16:14: note: 'const std::string right'
16 | const string right = "CODEFESTIVAL2016";
| ^~~~~
a.cc:22:13: error: reference to 'right' is ambiguous
22 | if (right[i] != str[i]) {
| ^~~~~
/usr/include/c++/14/bits/ios_base.h:1070:3: note: candidates are: 'std::ios_base& std::right(ios_base&)'
1070 | right(ios_base& __base)
| ^~~~~
a.cc:16:14: note: 'const std::string right'
16 | const string right = "CODEFESTIVAL2016";
| ^~~~~
|
s502036580
|
p03970
|
Java
|
//セミコロンレスで書いた
class Main{
public static void main(String[] args){
for(String[] str : new String[][]{{"CODEFESTIVAL2016",
new java.util.Scanner(System.in).next()}}){
for(int[] var : new int[][]{{0, 0}}){
while(var[0] < str[0].length()){
if(str[0].charAt(var[0]) != str[1].charAt(var[0])){
var[1]++;
}
if(var[0]++ > 0){}
}
if(System.out.printf("%d\n", var[1]) == null){}
}
}
}
|
Main.java:17: error: reached end of file while parsing
}
^
1 error
|
s086011613
|
p03970
|
C++
|
#include<stdio.h>
int main()
{
char x[20]="C0DEFESTIVAL2O16";
char y[20];
scanf("%s",y);
int cnt=0;
for(int i=0;i<16;i++)
if(x[i]!=y[i])cnt++;
printf("%d",cnt);
return 0;
}
|
a.cc:2:1: error: extended character is not valid in an identifier
2 | int main()
| ^
a.cc:2:1: error: ISO C++ forbids declaration of 'int\U00003000main' with no type [-fpermissive]
2 | int main()
| ^~~~~~~~~
|
s118013920
|
p03970
|
Java
|
import java.util.*;
import java.io.*;
public class Main1 {
public static void main(String [] args)throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
int ans = 0;
String var = "CODEFESTIVAL2016";
for(int i = 0;i < str.length();i++){
if(str.charAt(i) != var.charAt(i))++ans;
}
System.out.print(ans);
}
}
|
Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
^
1 error
|
s822217541
|
p03970
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main(){
string str;
cin>>str;
long long ans=0;
string cf="CODEFESTIVAL2016";
for(int i=0;i<16;++i){
if(str[i]!=cfi]){
++ans;
}
}
cout<<ans<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:28: error: 'cfi' was not declared in this scope; did you mean 'cf'?
12 | if(str[i]!=cfi]){
| ^~~
| cf
a.cc:12:31: error: expected ')' before ']' token
12 | if(str[i]!=cfi]){
| ~ ^
| )
a.cc:12:31: error: expected primary-expression before ']' token
|
s433541869
|
p03970
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main(){
string str;
cin>>str;
string ans="CODEFESTIVAL2016";
int count=0;
for(int i=0;i<16;++i){
if(str[i]!=ans[i])
count++;
}
}
cout<<count<<endl;
return 0;
}
|
a.cc:16:1: error: 'cout' does not name a type
16 | cout<<count<<endl;
| ^~~~
a.cc:17:1: error: expected unqualified-id before 'return'
17 | return 0;
| ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s661481651
|
p03970
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main(){
string str;
cin>>str::
string ans="CODEFESTIVAL2016";
int count=0;
for(int i=0;i<16;++i){
if(str[i]!=ans[i])
count++;
}
}
cout<<count<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:6: error: 'str' is not a class, namespace, or enumeration
8 | cin>>str::
| ^~~
a.cc:12:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
12 | if(str[i]!=ans[i])
| ^~~
| abs
a.cc: At global scope:
a.cc:16:1: error: 'cout' does not name a type
16 | cout<<count<<endl;
| ^~~~
a.cc:17:1: error: expected unqualified-id before 'return'
17 | return 0;
| ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s847611646
|
p03970
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main()
{
string tmp;
cin>>tmp;
string s("CODEFESTIVAL2016");
int n = s.size();
int num = 0;
for(int i =0 ;i<n;++i)
if(tmp[i]!=s[i])num++
cout<<num<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:30: error: expected ';' before 'cout'
12 | if(tmp[i]!=s[i])num++
| ^
| ;
13 | cout<<num<<endl;
| ~~~~
|
s486565817
|
p03970
|
C
|
#include <stdio.h>
#include <stdlib.h>
#define STRINGSIZE 16
int main (){
int noCharacters = 0;
char string[STRINGSIZE];
char comparedTo[STRINGSIZE] = "CODEFESTIVAL2016";
scanf("%s",string);
int i;
for (i=0;i<STRINGSIZE;i++) {
if (string[i] != comparedTo[i]) {
noCharacters++;
}
}
/* if(string[3] == string[5]) {
if (string[3] != 'E'){
noCharacters--;
}*/
}
printf("%d",noCharacters);
return EXIT_SUCCESS;
}
|
main.c:23:12: error: expected declaration specifiers or '...' before string constant
23 | printf("%d",noCharacters);
| ^~~~
main.c:23:17: error: unknown type name 'noCharacters'
23 | printf("%d",noCharacters);
| ^~~~~~~~~~~~
main.c:24:5: error: expected identifier or '(' before 'return'
24 | return EXIT_SUCCESS;
| ^~~~~~
main.c:25:1: error: expected identifier or '(' before '}' token
25 | }
| ^
|
s992671693
|
p03970
|
C++
|
use std::io;
fn read_line() -> String {
let mut s = String::new();
io::stdin().read_line(&mut s).unwrap();
s.trim().to_owned()
}
fn main() {
let s = read_line();
let t = "CODEFESTIVAL2016";
let mut ans = 0;
for (c, d) in s.chars().zip(t.chars()) {
if c != d {
ans += 1
}
}
println!("{}", ans);
}
|
a.cc:1:1: error: 'use' does not name a type
1 | use std::io;
| ^~~
a.cc:3:1: error: 'fn' does not name a type
3 | fn read_line() -> String {
| ^~
a.cc:9:1: error: 'fn' does not name a type
9 | fn main() {
| ^~
|
s186810024
|
p03970
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int i,c=0;
char S[17];
char s[17] = {'C','O','D','E','F','E','S','T','I','V','A','L','2','0','1','6','\0'};
scanf("%s",S);
for(i=0;i<16;i++;){
if(S[i] != s[i]){c++;}
}
cout << c << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:21: error: expected ')' before ';' token
9 | for(i=0;i<16;i++;){
| ~ ^
| )
a.cc:9:22: error: expected primary-expression before ')' token
9 | for(i=0;i<16;i++;){
| ^
|
s514124066
|
p03970
|
C++
|
#include <iostream>
using namespace std;
int main()
{
long W,H;
int cost=0;
int lastcost=-1;
long long *P=new long long[W];
long long *Q=new long long[H];
cin >> W>>H;
int **data = new int*[W+1];
for(int i=0;i<W+1;i++){
data[i] = new int [H+1];
}
for(int i=0;i<W;i++){
cin >> P[i];
}
for(int i=0;i<H;i++){
cin >> Q[i];
}
for(int i=0;i<W+1;i++){
for(int c=0;c<H+1;c++){
data[i][c]=0;
}
}
for(int ii=0;ii<W+1;ii++){
for(int cc=0;cc<H+1;cc++){
for(int i=0;i<W+1;i++){
for(int c=0;c<H+1;c++){
data[i][c]=0;
}
}
data[ii][cc]=1;
while(1){
int tmpi=-1;
int tmpc=-1;
long long tmpcost=100000001;
int dir=0;
for(int i=0;i<W+1;i++){
for(int c=0;c<H+1;c++){
if(data[i][c]==1){
if(i>0){
if(data[i-1][c]==0){
if(P[i-1]<tmpcost){tmpcost=P[i-1];dir=1;tmpi=i;tmpc=c;}
}
}
if(i<W){
if(data[i+1][c]==0){
if(P[i]<tmpcost){tmpcost=P[i];dir=2;tmpi=i;tmpc=c;}
}
}
if(c>0){
if(data[i][c-1]==0){
if(Q[c-1]<tmpcost){tmpcost=Q[c-1];dir=3;}tmpi=i;tmpc=c;}
}
}
if(c<H){
if(data[i][c+1]==0){
if(Q[i]<tmpcost){tmpcost=Q[i];dir=4;tmpi=i;tmpc=c;}
}
}
if(tmpcost!=100000001){
if(dir==1) data[tmpi-1][tmpc]=1;
else if(dir==2)data[tmpi+1][tmpc]=1;
else if(dir==3)data[tmpi][tmpc-1]=1;
else if(dir==4)data[tmpi][tmpc+1]=1;
cost+=tmpcost;
tmpcost=100000001;dir=0;
}
}
}
}
int check = 0;
for(int i=0;i<W+1;i++){
for(int c=0;c<H+1;c++){
if(data[i][c]==0)check=1;
}
}
if(check==0)break;
}
if(ii==0&&cc==0)lastcost=cost;
else{
if(lastcost>cost)lastcost=cost;
}
cout<<ii<<cc<<":"<<cost<<endl;///////////////////////////////
cost=0;
}
}
cout<<lastcost<<endl;
for(int i=0;i<W+1;i++){
delete[] data[i];data[i]=0;
}
delete [] data;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:102:17: error: 'cc' was not declared in this scope
102 | if(ii==0&&cc==0)lastcost=cost;
| ^~
a.cc:106:17: error: 'cc' was not declared in this scope
106 | cout<<ii<<cc<<":"<<cost<<endl;///////////////////////////////
| ^~
a.cc: At global scope:
a.cc:112:3: error: 'cout' does not name a type
112 | cout<<lastcost<<endl;
| ^~~~
a.cc:113:3: error: expected unqualified-id before 'for'
113 | for(int i=0;i<W+1;i++){
| ^~~
a.cc:113:15: error: 'i' does not name a type
113 | for(int i=0;i<W+1;i++){
| ^
a.cc:113:21: error: 'i' does not name a type
113 | for(int i=0;i<W+1;i++){
| ^
a.cc:116:3: error: expected unqualified-id before 'delete'
116 | delete [] data;
| ^~~~~~
a.cc:117:3: error: expected unqualified-id before 'return'
117 | return 0;
| ^~~~~~
a.cc:118:1: error: expected declaration before '}' token
118 | }
| ^
|
s429690302
|
p03970
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int i,c=0;
char S[17];
char s[17] = {'C','O','D','E','F','E','S','T','I','V','A','L','2','0','1','6','\0'};
scanf("%s",S);
for(i=0;i<16;i++;){
if(S[i] == s[i]){c++;}
}
cout << c << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:21: error: expected ')' before ';' token
9 | for(i=0;i<16;i++;){
| ~ ^
| )
a.cc:9:22: error: expected primary-expression before ')' token
9 | for(i=0;i<16;i++;){
| ^
|
s584215401
|
p03970
|
C++
|
#include <bits/stuck++.h>
using namespace std;
int main(){
int i,c=0;
char S[17];
char s[17] = {'C','O','D','E','F','E','S','T','I','V','A','L','2','0','1','6','\0'};
scanf("%s",S);
for(i=0;i<16;i++;){
if(S[i] == s[i]){c++;}
}
cout << c << endl;
return 0;
}
|
a.cc:1:10: fatal error: bits/stuck++.h: No such file or directory
1 | #include <bits/stuck++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s000911772
|
p03970
|
C++
|
int main()
{
const string word = "CODEFESTIVAL2016";
string str;
cin >> str;
int count = 0;
for(int i = 0; i < word.size(); ++i) {
if(word[i] != str[i])
count++;
}
cout << count;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:3:15: error: 'string' does not name a type
3 | const string word = "CODEFESTIVAL2016";
| ^~~~~~
a.cc:5:9: error: 'string' was not declared in this scope
5 | string str;
| ^~~~~~
a.cc:7:9: error: 'cin' was not declared in this scope
7 | cin >> str;
| ^~~
a.cc:7:16: error: 'str' was not declared in this scope; did you mean 'std'?
7 | cin >> str;
| ^~~
| std
a.cc:10:28: error: 'word' was not declared in this scope
10 | for(int i = 0; i < word.size(); ++i) {
| ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'count'?
15 | cout << count;
| ^~~~
| count
|
s044800220
|
p03970
|
C++
|
#include <iostream>
#include <string>
using namespace std;
#define INF 1e9
int prime(int cur, bool* visit, int** graph, int m)
{
int index;
int sum = 0;
visit[cur] = true;
int* dist = new int[m];
for(int i = 0; i < m; i ++){
dist[i] = graph[cur][i];
}
for(int i = 1; i < m; i ++){
int mincost = INF;
for(int j = 0; j < m; j ++){
if(!visit[j] && dist[j] < mincost){
mincost = dist[j];
index = j;
}
}
visit[index] = true;
sum += mincost;
for(int j = 0; j < m; j ++){
if(!visit[j] && dist[j] > graph[index][j]){
dist[j] = graph[index][j];
}
}
}
return sum;
}
int main(){
int W, H;
cin >> W >> H;
int *p = new int[W];
int *q = new int[H];
for (int i = 0; i < W; i ++)
{
cin >> p[i];
}
for (int i = 0; i < H; i ++)
{
cin >> q[i];
}
int pointCount = (W+1)*(H+1);
bool *visit = new bool[pointCount];
memset(visit, false, sizeof(visit));
int **graph = new int*[pointCount*pointCount];
for (int i = 0; i < pointCount; i ++)
{
graph[i] = new int[pointCount];
for (int j = 0; j < pointCount; j ++)
{
graph[i][j] = INF;
}
}
for (int i = 0; i < pointCount; i ++)
{
for (int j = 0; j < pointCount; j ++)
{
int idxj = i / W;
int idxi = i % W;
int idxj2 = j / W;
int idxi2 = j % W;
if(idxi == idxi2 && (idxj == idxj2+1 || idxj == idxj2 - 1)){
graph[i][j] = q[idxi];
graph[j][i] = q[idxi];
}
if(idxj == idxj2 && (idxi == idxi2+1 || idxi == idxi2 - 1)){
graph[i][j] = p[idxj];
graph[j][i] = p[idxj];
}
}
}
cout << prime(0, visit, graph, pointCount) << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:52:9: error: 'memset' was not declared in this scope
52 | memset(visit, false, sizeof(visit));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring>
2 | #include <string>
|
s525992182
|
p03970
|
C++
|
#include<iostream>
using namespace std;
int main(){
char s[16];
char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
int i,count=0;
cin>>s;
for(i=0;i<=15;i++){
if(s[i]!=c[i]){
count++;
}
}
cout<<count<<"\n";
}
|
a.cc: In function 'int main()':
a.cc:8:21: error: 'C' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:23: error: 'O' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:25: error: 'D' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:27: error: 'E' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:29: error: 'F' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:33: error: 'S' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:35: error: 'T' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:37: error: 'I' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:39: error: 'V' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:41: error: 'A' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:43: error: 'L' was not declared in this scope
8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
|
s049661856
|
p03970
|
C++
|
#include <iostream>
#include <string>
using namespace std;
int main() {
string d = "CODEFESTIVAL2016";
string s;
cin >> s;
int ans = 0;
for (int i = 0; i < s.size(); i++) if (s[i] != d[i]) ans++;
cout << ans << endl;
return 0;
}
CODEFESTIVAL2016
|
a.cc:16:1: error: 'CODEFESTIVAL2016' does not name a type
16 | CODEFESTIVAL2016
| ^~~~~~~~~~~~~~~~
|
s242959130
|
p03970
|
C++
|
#include <iostream>
#include <string>
using namespace std;
int main() {
string d = "CODEFESTIVAL2016";
cin >> s;
int ans = 0;
for (int i = 0; i < s.size(); i++) if (s[i] != d[i]) ans++;
cout << ans << endl;
return 0;
}
CODEFESTIVAL2016
|
a.cc: In function 'int main()':
a.cc:7:10: error: 's' was not declared in this scope
7 | cin >> s;
| ^
a.cc: At global scope:
a.cc:15:1: error: 'CODEFESTIVAL2016' does not name a type
15 | CODEFESTIVAL2016
| ^~~~~~~~~~~~~~~~
|
s164860110
|
p03970
|
C++
|
#include <iostrem>
#include <string>
using namespace std;
int main() {
string d = "CODEFESTIVAL2016";
cin >> s;
int ans = 0;
for (int i = 0; i < s.size(); i++) if (s[i] != d[i]) ans++;
cout << ans << endl;
return 0;
}
CODEFESTIVAL2016
|
a.cc:1:10: fatal error: iostrem: No such file or directory
1 | #include <iostrem>
| ^~~~~~~~~
compilation terminated.
|
s920401849
|
p03970
|
C++
|
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
string input_string, ref = 'CODEFESTIVAL2016;
int len = 16;
// Read a full line of input from stdin (cin) and save it to our variable, input_string.
getline(cin, input_string);
int c = 0;
for (int i = 0; i < len; i++) {
if (input_string[i] != ref[i]) c++;
}
cout << c << endl;
return 0;
}
|
a.cc:10:32: warning: missing terminating ' character
10 | string input_string, ref = 'CODEFESTIVAL2016;
| ^
a.cc:10:32: error: missing terminating ' character
10 | string input_string, ref = 'CODEFESTIVAL2016;
| ^~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:5: error: expected primary-expression before 'int'
11 | int len = 16;
| ^~~
a.cc:17:25: error: 'len' was not declared in this scope
17 | for (int i = 0; i < len; i++) {
| ^~~
|
s464949009
|
p03970
|
C++
|
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#define MAX_N 100010
using namespace std;
int par[100010];
int rank[100010];
void init(int n){
int i;
for(i=0;i<n;i++){
par[i]=i;
rank[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((int)rank[x]<(int)rank[y]){
par[x]=y;
}else {
par[y]=x;
if(rank[x]==rank[y]) rank[x]++;
}
}
bool same(int x,int y)
{
return find(x)==find(y);
}
struct edge{int u,v,cost;};
bool comp(const edge& e1,const edge& e2){
return e1.cost<e2.cost;
}
edge es[MAX_N];
int V,E;
int kruskal(){
sort(es,es+E,comp);
init(V);
int res=0;
for(int i=0;i<E;i++){
edge e=es[i];
if(!same(e.u,e.v)){
unite(e.u,e.v);
res += e.cost;
}
}
return res;
}
int main(void){
string S;
int W,H;
int res;
cin>>W>>H;
int i,j;
vector<int> p(W);
vector<int> q(H);
int k=0;
for(i=0;i<W;i++) cin>>p[i];
for(i=0;i<H;i++) cin>>q[i];
V=(W+1)*(W+1);
E=((W+1)*H)+(W*(H+1));
k=0;
for(j=0;j<=H;j++){
for(i=0;i<=W;i++) {
if(i<W){
es[k].u=j*(W+1)+i;
es[k].v=j*(W+1)+i+1;
es[k].cost=p[i];
k++;
}
if(j<H){
es[k].u=j*(W+1)+i;
es[k].v=j*(W+1)+i+W+1;
es[k].cost=q[j];
k++;
}
}
}
res=kruskal();
cout<<res<<endl;
return 0;
}
|
a.cc: In function 'void init(int)':
a.cc:16:5: error: reference to 'rank' is ambiguous
16 | rank[i]=0;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank'
1437 | struct rank
| ^~~~
a.cc:10:5: note: 'int rank [100010]'
10 | int rank[100010];
| ^~~~
a.cc: In function 'void unite(int, int)':
a.cc:33:11: error: reference to 'rank' is ambiguous
33 | if((int)rank[x]<(int)rank[y]){
| ^~~~
/usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank'
1437 | struct rank
| ^~~~
a.cc:10:5: note: 'int rank [100010]'
10 | int rank[100010];
| ^~~~
a.cc:33:24: error: reference to 'rank' is ambiguous
33 | if((int)rank[x]<(int)rank[y]){
| ^~~~
/usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank'
1437 | struct rank
| ^~~~
a.cc:10:5: note: 'int rank [100010]'
10 | int rank[100010];
| ^~~~
a.cc:37:8: error: reference to 'rank' is ambiguous
37 | if(rank[x]==rank[y]) rank[x]++;
| ^~~~
/usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank'
1437 | struct rank
| ^~~~
a.cc:10:5: note: 'int rank [100010]'
10 | int rank[100010];
| ^~~~
a.cc:37:17: error: reference to 'rank' is ambiguous
37 | if(rank[x]==rank[y]) rank[x]++;
| ^~~~
/usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank'
1437 | struct rank
| ^~~~
a.cc:10:5: note: 'int rank [100010]'
10 | int rank[100010];
| ^~~~
a.cc:37:26: error: reference to 'rank' is ambiguous
37 | if(rank[x]==rank[y]) rank[x]++;
| ^~~~
/usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank'
1437 | struct rank
| ^~~~
a.cc:10:5: note: 'int rank [100010]'
10 | int rank[100010];
| ^~~~
|
s006580921
|
p03970
|
C++
|
#include <iostream>
using namespace std;
int main()
{
const string word = "CODEFESTIVAL2016"
string str;
cin >> str;
int count = 0;
for(int i = 0; i < word.size(); ++i) {
if(word[i] != str[i])
count++;
}
cout << count;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:9: error: expected ',' or ';' before 'string'
9 | string str;
| ^~~~~~
a.cc:11:16: error: 'str' was not declared in this scope; did you mean 'std'?
11 | cin >> str;
| ^~~
| std
|
s092602273
|
p03970
|
C++
|
#include<bits.stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
string str ="CODEFESTIVAL2016";
int res = 0;
for(int i =0 ;i<str.length();i++)
{
if(s[i]!=str[i])
{
res++;
}
}
cout<<res<<endl;
return 0;
}
|
a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory
1 | #include<bits.stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s674269176
|
p03970
|
C++
|
#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
int main(void)
{
string s,t="CODEFESTIVAL2016";
cin >> s;
answer=0;
REP(i,16) if(s[i]!=t[i]) ++answer;
cout << answer << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:3: error: 'answer' was not declared in this scope
13 | answer=0;
| ^~~~~~
|
s343622169
|
p03970
|
Java
|
import java.util.Scanner;
public class signboard {
private static final String str = "CODEFESTIVAL2016";
private static int count = 0;
public static void main(String[] args){
Scanner reader = new Scanner(System.in);
String str1 = reader.next();
for (int i=0;i<16;i++){
if (str1.charAt(i)!=str.charAt(i)){
count++;
}
}
System.out.println(count);
}
}
|
Main.java:4: error: class signboard is public, should be declared in a file named signboard.java
public class signboard {
^
1 error
|
s863233746
|
p03970
|
C++
|
S = input()
res = 0
target = "CODEFESTIVAL2016"
for index in range(len(S)):
if S[index] != target[index]:
res += 1
print(res)
|
a.cc:1:1: error: 'S' does not name a type
1 | S = input()
| ^
|
s001103369
|
p03970
|
Java
|
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
String s = "CODEFESTIVAL2016";
String tmp = in.nextLine();
int ans =0;
for(int i=0;i<s.length();i++)
if(tmp.charAt(i)!=s.charAt(i))
ans++;
System.out.print(ans);
}
}
|
Main.java:8: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:8: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s116957231
|
p03970
|
C
|
# include<stdio.h>
main()
{
char a[16]="CODEFESTIVAL2016";
char b[16];
int i,j=0;
gets(b);
for(i=0;a[i]!='\0';i++)
{while(a[i]!=b[i]&&a[i]!='\0') j++}
printf("%d",j);
}
end
|
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main()
| ^~~~
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
8 | gets(b);
| ^~~~
| fgets
main.c:10:39: error: expected ';' before '}' token
10 | {while(a[i]!=b[i]&&a[i]!='\0') j++}
| ^
| ;
main.c: At top level:
main.c:13:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
13 | end
| ^~~
|
s509381541
|
p03970
|
C
|
# include<stdio.h>
main()
{
char a[16]="CODEFESTIVAL2016";
char b[16];
int i,j=0;
gets(b);
for(i=0;a[i]!='\0';i++)
{while(a[i]!=b[i]&&a[i]!='\0') j++}
printf("%d",j);
}
|
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main()
| ^~~~
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
8 | gets(b);
| ^~~~
| fgets
main.c:10:39: error: expected ';' before '}' token
10 | {while(a[i]!=b[i]&&a[i]!='\0') j++}
| ^
| ;
|
s636605078
|
p03970
|
C++
|
# include<stdio.h>
main()
{
char a[16]="CODEFESTIVAL2016";
char b[16];
int i,j=0;
gets(b);
for(i=0;a[i]!='\0';i++)
{while(a[i]!=b[i]&&a[i]!='\0') j++}
printf("%d",j);
}
end
|
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:5:14: error: initializer-string for 'char [16]' is too long [-fpermissive]
5 | char a[16]="CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
a.cc:8:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(b);
| ^~~~
| getw
a.cc:10:39: error: expected ';' before '}' token
10 | {while(a[i]!=b[i]&&a[i]!='\0') j++}
| ^
| ;
a.cc: At global scope:
a.cc:13:1: error: 'end' does not name a type
13 | end
| ^~~
|
s110497480
|
p03970
|
C++
|
# include<stdio.h>
main()
{
char a[16]="CODEFESTIVAL2016";
char b[16];
int i,j=0;
gets(b);
for(i=0;a[i]!='\0';i++)
{while(a[i]!=b[i]&&a[i]!='\0') j++}
printf("%d",j);
}
|
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:5:14: error: initializer-string for 'char [16]' is too long [-fpermissive]
5 | char a[16]="CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
a.cc:8:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(b);
| ^~~~
| getw
a.cc:10:39: error: expected ';' before '}' token
10 | {while(a[i]!=b[i]&&a[i]!='\0') j++}
| ^
| ;
|
s599411785
|
p03970
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int count = 0;
String s = sc.next();
String sa[];
sa = new String[s.length()];
String c = "CODEFESTIVAL2016";
String ca[];
ca = new String[c.length()];
for(int i=0; i<c.length(); i++){
if(i == c.length - 1){
ca[i] = c.substring(i);
sa[i] = s.substring(i);
}
else{
ca[i] = c.substring(i, i+1);
sa[i] = s.substring(i, i+1);
}
if(ca[i] != sa[i]){
count = count + 1;
}
}
// 出力
System.out.println(count);
}
}
|
Main.java:13: error: cannot find symbol
if(i == c.length - 1){
^
symbol: variable length
location: variable c of type String
1 error
|
s167509595
|
p03970
|
C++
|
#include <studio.h>
#include <stdlib.h>
#define SIZE 12
int main(){
char s[SIZE] = {0};
scanf("%s",s);
char * a = "CODEFESTIVAL2016";
int x = 0;
int t =0;
while(x < SIZE){
if(s[x] != a[x]) t++;
x++;
}
printf("%d",t);
return 0;
}
|
a.cc:1:10: fatal error: studio.h: No such file or directory
1 | #include <studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s382386165
|
p03970
|
Java
|
public class Main{
public static void main(String[] args){
Scanner s = new Scanner(System.in);
String str = s.next();
String[] a = new String[16];
int result = 0;
a[0] = "C";
a[1] = "O";
a[2] = "D";
a[3] = "E";
a[4] = "F";
a[5] = "E";
a[6] = "S";
a[7] = "T";
a[8] = "I";
a[9] = "V";
a[10] = "A";
a[11] = "L";
a[12] = "2";
a[13] = "0";
a[14] = "1";
a[15] = "6";
for (int i = 0; i < 16;i++ ){
if(str.substring(i-1,i).equals(a[i])){
result ++;
}
}
System.out.println(16-result);
}
}
|
Main.java:4: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s350217669
|
p03970
|
C++
|
#include<stdio.h>
#include<string.h>
int main(){
char s[20];
char s2="CODEFESTIVAL2016";
int ans=0;
scanf("%s",s);
for (int i=0;i<16;i++)
if (s[i]!=s2[i]) ans++;
printf("%d",ans);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:9: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
5 | char s2="CODEFESTIVAL2016";
| ^~~~~~~~~~~~~~~~~~
| |
| const char*
a.cc:9:16: error: invalid types 'char[int]' for array subscript
9 | if (s[i]!=s2[i]) ans++;
| ^
|
s008905017
|
p03970
|
C++
|
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(){
string str1 = "CODEFESTIVAL2016";
string str2;
cin >> str2;
int ans = 0;
for(int i = 0; i < str1.size(); i++){
if(str[1] != str[2]){
ans++;
}
}
cout << ans << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:19:20: error: 'str' was not declared in this scope; did you mean 'str2'?
19 | if(str[1] != str[2]){
| ^~~
| str2
|
s405338994
|
p03970
|
Java
|
public class Main {
public static void Main(String[] args){
Scanner s = new Scanner(System.in);
String str = s.next();
String[] a = new String[16];
int result = 0;
a[0] = "C";
a[1] = "O";
a[2] = "D";
a[3] = "E";
a[4] = "F";
a[5] = "E";
a[6] = "S";
a[7] = "T";
a[8] = "I";
a[9] = "V";
a[10] = "A";
a[11] = "L";
a[12] = "2";
a[13] = "0";
a[14] = "1";
a[15] = "6";
for (int i = 0; i < 16;i++ ){
if(str.substring(i-1,i) == a[i]){
result ++;
}
}
System.out.println(16-result);
}
}
|
Main.java:4: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s436705913
|
p03970
|
C
|
#include<stdio.h>
int main(void){
int cnt = 0;
char b[16] ;
char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
scanf(%s,b);
for(i = 0; i>16; i++){
if(b[i] != c[i]){
b[i] = c[i];
cnt = cnt + 1;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:6:19: error: 'C' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:21: error: 'O' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:23: error: 'D' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:25: error: 'E' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:27: error: 'F' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:31: error: 'S' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:33: error: 'T' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:35: error: 'I' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:37: error: 'V' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:39: error: 'A' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:6:41: error: 'L' undeclared (first use in this function)
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
main.c:8:11: error: expected expression before '%' token
8 | scanf(%s,b);
| ^
main.c:10:9: error: 'i' undeclared (first use in this function)
10 | for(i = 0; i>16; i++){
| ^
|
s382824344
|
p03970
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int count = 0;
String s = sc.next();
String sa[];
sa = new String[s.length()];
String c = "CODEFESTIVAL2016";
String ca[];
ca = new String[c.length()];
for(i=0; i<c.length(); i++){
if(i < c.length() -1){
ca[i] = c.substring(i, i+1);
sa[i] = s.substring(i, i+1);
}
else{
ca[i] = c.substring(i);
sa[i] = s.substring(i);
}
if(ca[i] == sa[i]){
count = count + 1;
}
}
// 出力
System.out.println(s);
}
}
|
Main.java:12: error: cannot find symbol
for(i=0; i<c.length(); i++){
^
symbol: variable i
location: class Main
Main.java:12: error: cannot find symbol
for(i=0; i<c.length(); i++){
^
symbol: variable i
location: class Main
Main.java:12: error: cannot find symbol
for(i=0; i<c.length(); i++){
^
symbol: variable i
location: class Main
Main.java:13: error: cannot find symbol
if(i < c.length() -1){
^
symbol: variable i
location: class Main
Main.java:14: error: cannot find symbol
ca[i] = c.substring(i, i+1);
^
symbol: variable i
location: class Main
Main.java:14: error: cannot find symbol
ca[i] = c.substring(i, i+1);
^
symbol: variable i
location: class Main
Main.java:14: error: cannot find symbol
ca[i] = c.substring(i, i+1);
^
symbol: variable i
location: class Main
Main.java:15: error: cannot find symbol
sa[i] = s.substring(i, i+1);
^
symbol: variable i
location: class Main
Main.java:15: error: cannot find symbol
sa[i] = s.substring(i, i+1);
^
symbol: variable i
location: class Main
Main.java:15: error: cannot find symbol
sa[i] = s.substring(i, i+1);
^
symbol: variable i
location: class Main
Main.java:18: error: cannot find symbol
ca[i] = c.substring(i);
^
symbol: variable i
location: class Main
Main.java:18: error: cannot find symbol
ca[i] = c.substring(i);
^
symbol: variable i
location: class Main
Main.java:19: error: cannot find symbol
sa[i] = s.substring(i);
^
symbol: variable i
location: class Main
Main.java:19: error: cannot find symbol
sa[i] = s.substring(i);
^
symbol: variable i
location: class Main
Main.java:21: error: cannot find symbol
if(ca[i] == sa[i]){
^
symbol: variable i
location: class Main
Main.java:21: error: cannot find symbol
if(ca[i] == sa[i]){
^
symbol: variable i
location: class Main
16 errors
|
s361151773
|
p03970
|
C
|
#include<stdio.h>
int void(main){
int cnt = 0;
char b[16] ;
char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
scanf(%s,b);
for(i = 0; i>16; i++){
if(b[i] != c[i]){
b[i] = c[i];
cnt = cnt + 1;
}
}
return 0;
}
|
main.c:3:5: error: two or more data types in declaration specifiers
3 | int void(main){
| ^~~~
main.c:3:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
3 | int void(main){
| ^
|
s624948955
|
p03970
|
C++
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String g = "CODEGESTIVAL2016";
String rString = scanner.next();
int j = 0;
for (int i = 0; i < rString.length(); i++) {
if (g.charAt(i) != rString.charAt(i)) {
j++;
}
}
System.out.println(j);
}
}
|
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 {
| ^~~~~~
|
s256828291
|
p03970
|
C++
|
#include<stdio.h>
int void(main){
int cnt = 0;
char b[16] ;
char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
scanf(%s,b);
for(i = 0; i>16; i++){
if(b[i] != c[i]){
b[i] = c[i];
cnt = cnt + 1;
}
}
return 0;
}
|
a.cc:3:1: error: two or more data types in declaration of 'main'
3 | int void(main){
| ^~~
a.cc:4:5: error: expected primary-expression before 'int'
4 | int cnt = 0;
| ^~~
a.cc:4:5: error: expected '}' before 'int'
a.cc:3:15: note: to match this '{'
3 | int void(main){
| ^
a.cc:6:19: error: 'C' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:21: error: 'O' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:23: error: 'D' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:25: error: 'E' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:27: error: 'F' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:29: error: 'E' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:31: error: 'S' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:33: error: 'T' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:35: error: 'I' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:37: error: 'V' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:39: error: 'A' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:6:41: error: 'L' was not declared in this scope
6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6};
| ^
a.cc:8:10: error: expected constructor, destructor, or type conversion before '(' token
8 | scanf(%s,b);
| ^
a.cc:10:5: error: expected unqualified-id before 'for'
10 | for(i = 0; i>16; i++){
| ^~~
a.cc:10:16: error: 'i' does not name a type
10 | for(i = 0; i>16; i++){
| ^
a.cc:10:22: error: 'i' does not name a type
10 | for(i = 0; i>16; i++){
| ^
a.cc:17:5: error: expected unqualified-id before 'return'
17 | return 0;
| ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s535755360
|
p03970
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int count = 0;
String s = sc.next();
String sa[];
sa = new String[s.length()];
String c = "CODEFESTIVAL2016";
String ca[];
ca = new String[c.length()];
for(i=0; i++; i<c.length()){
if(i < c.length() -1){
ca[i] = c.substring(i, i+1);
sa[i] = s.substring(i, i+1);
}
else{
ca[i] = c.substring(i);
sa[i] = s.substring(i);
}
if(ca[i] == sa[i]){
count = count + 1;
}
}
// 出力
System.out.println(s);
}
}
|
Main.java:12: error: not a statement
for(i=0; i++; i<c.length()){
^
1 error
|
s318134519
|
p03970
|
C
|
#include <stdio.h>
int main(void)
{
int i,ans = 0;
char S[17],dash[17] = "CODEFESTIVAL2016";
fgets(S,sizeof(S),stdin);
for (i = 0,i < 16,i++) {
if (S[i] != dash[i]) ans++;
}
printf("%d\n",ans);
return 0;
}
|
main.c: In function 'main':
main.c:8:24: error: expected ';' before ')' token
8 | for (i = 0,i < 16,i++) {
| ^
| ;
main.c:8:24: error: expected expression before ')' token
|
s891561350
|
p03970
|
Java
|
import java.util.Scanner;
public class Signboard {
public static void main(String[] args) {
// TODO Auto-generated method stub
String compare = "CODEFESTIVAL2016";
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
while(sc.hasNext())
{
String compared = sc.nextLine();
System.out.println(needtochange(compare,compared));
}
}
public static int needtochange(String s1,String s2)
{
int sum = 0;
for(int i=0;i<s1.length();i++)
{
if(s1.charAt(i) != s2.charAt(i))
sum++;
}
return sum;
}
}
|
Main.java:2: error: class Signboard is public, should be declared in a file named Signboard.java
public class Signboard {
^
1 error
|
s183190541
|
p03970
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int count = 0;
String s = sc.next();
String sa[];
sa = new String[s.length()];
String c = "CODEFESTIVAL2016";
String ca[];
ca = new String[c.length()];
for(i=0; i++; i<c.length(){
if(i < c.length() -1){
ca[i] = c.substring(i, i+1);
sa[i] = s.substring(i, i+1);
}
else{
ca[i] = c.substring(i);
sa[i] = s.substring(i);
}
if(ca[i] == sa[i]){
count = count + 1;
}
}
// 出力
System.out.println(s);
}
}
|
Main.java:12: error: not a statement
for(i=0; i++; i<c.length(){
^
Main.java:12: error: ')' expected
for(i=0; i++; i<c.length(){
^
2 errors
|
s843668922
|
p03970
|
C++
|
/*input
FESTIVAL2016CODE
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
char s[32];
char r[] = "CODEFESTIVAL2016";
gets(s);
int ans = 0;
int n = strlen(s);
for (int i = 0; i < n; ++i)
{
ans += r[i] != s[i];
}
printf("%d\n", ans);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(s);
| ^~~~
| getw
|
s532090525
|
p03970
|
C++
|
#include <iostream>
#include <string>
#include <string.h>
using namespace std;
char CODE[17] = "CODEFESTIVAL2016";
int main(){
int cnt = 0;
char S[17];
for(int i = 0 ; i < 17 ; i++){
scanf_s("%c",&S[i]);
}
for(int i = 0 ; i < 17 ; i++){
if(!(CODE[i] == S[i])){
cnt++;
}
}
printf("%d\n",cnt - 1);
}
|
a.cc: In function 'int main()':
a.cc:14:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
14 | scanf_s("%c",&S[i]);
| ^~~~~~~
| scanf
|
s998330330
|
p03970
|
C++
|
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
int main(){
char s[20];
char t[20];
int count = 0;
cin >> s;
strcpy(t, "CODEFESTIVAL2016");
for(int i = 0; i < 16; i++){
if(s[i] != t[i]){
count++;
}
}
count << count << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
11 | cin >> s;
| ^~~
| std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:19:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
19 | count << count << 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)
| ^~~~
|
s655214882
|
p03970
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string s = Console.ReadLine();
string ss = "CODEFESTIVAL2016";
int ans = 0;
for (int i = 0; i < s.Length; i++)
{
if (s[i] != ss[i])
{
ans ++;
}
}
Console.WriteLine(ans);
Console.ReadLine();
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:10:26: error: 'string' has not been declared
10 | static void Main(string[] args)
| ^~~~~~
a.cc:10:35: error: expected ',' or '...' before 'args'
10 | static void Main(string[] args)
| ^~~~
a.cc:26:6: error: expected ';' after class definition
26 | }
| ^
| ;
a.cc: In static member function 'static void ConsoleApplication1::Program::Main(int*)':
a.cc:12:13: error: 'string' was not declared in this scope
12 | string s = Console.ReadLine();
| ^~~~~~
a.cc:13:20: error: expected ';' before 'ss'
13 | string ss = "CODEFESTIVAL2016";
| ^~
a.cc:15:33: error: 's' was not declared in this scope
15 | for (int i = 0; i < s.Length; i++)
| ^
a.cc:17:29: error: 'ss' was not declared in this scope
17 | if (s[i] != ss[i])
| ^~
a.cc:22:13: error: 'Console' was not declared in this scope
22 | Console.WriteLine(ans);
| ^~~~~~~
|
s297721928
|
p03970
|
C
|
#inlcude<stdio.h>
int main(){
char ,w[20],s[]={"C0DEFESTIVAL2O16"};
int i,j=0;
scanf("%s",w);
for(i=0;s[i];i++){
if(s[i]-w[i])j++;
}
printf("%d\n",j);
return 0;
}
|
main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:3:14: error: expected identifier or '(' before ',' token
3 | char ,w[20],s[]={"C0DEFESTIVAL2O16"};
| ^
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%s",w);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #inlcude<stdio.h>
main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
5 | scanf("%s",w);
| ^~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:20: error: 'w' undeclared (first use in this function)
5 | scanf("%s",w);
| ^
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:17: error: 's' undeclared (first use in this function)
6 | for(i=0;s[i];i++){
| ^
main.c:9:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
9 | printf("%d\n",j);
| ^~~~~~
main.c:9:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:9:9: note: include '<stdio.h>' or provide a declaration of 'printf'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.