submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s306560636 | p03793 | C++ | #include <iostream>
#include <vector>
#include <string.h>
#include <limits.h>
using namespace std;
int judge(char* str, int start, int end, int length){
for(int count = 0; count < length; count++){
int head = INT_MAX;
for(int i = start; i < end; i++){
char t_i = str[i];
char t_i1 = str[i+1];
// cout << t_i << ", " << t_i1 << endl;
if(t_i == t_i1){
head = i;
break;
}
}
// cout << "head: " << head+1 << endl;
// cout << "length: " << strlen(str) << endl;
if(head == INT_MAX || strlen(str) < 1)
break;
// else{
if(str[head] == 'z')
strcpy(str+head, str+head+2);
else{
str[head] = ((str[head] - 'a' + 1) % 26) + 'a';
strcpy(str+head+1, str+head+2);
}
// cout << "string: "<< str << endl;
// }
}
return strlen(str);
}
int main(int argc, char* argv[]){
string s;
int q = 0;
cin >> s;
cin >> q;
for(int i = 0; i < q; i++){
int l, r;
cin >> l >> r;
int count = r-l+1;
// char t[count+1];
// strncpy(t, s.c_str()+l-1, count);
// t[count] = '\0';
int size_ = judge(s.c_str(), l-1, r-1, count);
if(size_ > 0)
cout << "No" << endl;
else
cout << "Yes" << endl;
// cout << endl;
}
return 0;
}
| a.cc: In function 'int main(int, char**)':
a.cc:53:30: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
53 | int size_ = judge(s.c_str(), l-1, r-1, count);
| ~~~~~~~^~
| |
| const char*
a.cc:8:17: note: initializing argument 1 of 'int judge(char*, int, int, int)'
8 | int judge(char* str, int start, int end, int length){
| ~~~~~~^~~
|
s088725949 | p03793 | C++ | include <iostream>
#include <vector>
#include <string.h>
#include <limits.h>
using namespace std;
int judge(char* str, int length){
for(int count = 0; count < length; count++){
int head = INT_MAX;
for(int i = 0; i < strlen(str); i++){
char t_i = str[i];
char t_i1 = str[i+1];
cout << t_i << ", " << t_i1 << endl;
if(t_i == t_i1){
head = i;
break;
}
}
// cout << "head: " << head+1 << endl;
// cout << "length: " << strlen(str) << endl;
if(head == INT_MAX || strlen(str) < 1)
break;
// else{
if(str[head] == 'z')
strcpy(str+head, str+head+2);
else{
str[head] = ((str[head] - 'a' + 1) % 26) + 'a';
strcpy(str+head+1, str+head+2);
}
// cout << "string: "<< str << endl;
// }
}
return strlen(str);
}
int main(int argc, char* argv[]){
string s;
int q = 0;
cin >> s;
cin >> q;
for(int i = 0; i < q; i++){
int l, r;
cin >> l >> r;
int count = r-l+1;
char t[count+1];
strncpy(t, s.c_str()+l-1, count);
t[count] = '\0';
int size_ = judge(t, strlen(t));
if(size_ > 0)
cout << "No" << endl;
else
cout << "Yes" << endl;
// cout << endl;
}
return 0;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared
295 | template <typename _Tp, size_t = sizeof(_Tp)>
| ^~~~~~
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared
984 | template<typename _Tp, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope
985 | struct __is_array_known_bounds<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid
985 | struct __is_array_known_bounds<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope
1451 | : public integral_constant<size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
63 | #include <bits/version.h>
+++ |+#include <cstddef>
64 |
/usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid
1451 | : public integral_constant<size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared
1453 | template<typename _Tp, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope
1454 | struct extent<_Tp[_Size], 0>
| ^~~~~
/usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid
1454 | struct extent<_Tp[_Size], 0>
| ^
/usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope
1455 | : public integral_constant<size_t, _Size> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope
1455 | : public integral_constant<size_t, _Size> { };
| ^~~~~
/usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid
1455 | : public integral_constant<size_t, _Size> { };
| ^
/usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid
/usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared
1457 | template<typename _Tp, unsigned _Uint, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope
1458 | struct extent<_Tp[_Size], _Uint>
| ^~~~~
/usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid
1458 | struct extent<_Tp[_Size], _Uint>
| ^
/usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope
1463 | : public integral_constant<size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid
1463 | : public integral_constant<size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type
1857 | { static constexpr size_t __size = sizeof(_Tp); };
| ^~~~~~
/usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~~~~
/usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~
/usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp'
1860 | struct __select;
| ^~~~~~~~
/usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared
1862 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope
1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^~~
/usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid
1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^
/usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared
1866 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope
1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
| ^~~
/usr/include/c++/14/type_traits:1867:58: error: template argument 1 is invalid
1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
| |
s135595072 | p03793 | C++ | include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int moji(string s,long long int a,long long int b);
int main(){
string s;
long long int n;
long long int q[500000][2];
long long int i;
int how;
cin>>s;
cin>>n;
for(i=0;i<n;i++){
cin>>q[i][0]>>q[i][1];
}
for(i=0;i<n;i++){
how=moji(s,q[i][0],q[i][1]);
if(how==0){
cout<<"NO"<<endl;
}
if(how==1){
cout<<"YES"<<endl;
}
}
return 0;
}
int moji(string s,long long int a,long long int b){
char k[500000];
long long int i;
long long int j;
int sub;
sub=b-a;
for(i=0;i<=sub;i++){
k[i]=s[a-1+i];
}
for(i=0;i<=sub;i++){
if((k[i]==k[i+1])&&k[i]=='z'){
for(j=i;j<=sub-2;j++){
k[j]=k[j+2];
}
k[sub-1]='0';
k[sub]='0';
if(i>2){
i=i-2;
}else{
i=-1;
}
}else if((k[i]==k[i+1])&&k[i]!='0'){
k[i]=k[i]+0x01;
for(j=i+1;j<=sub-1;j++){
k[j]=k[j+1];
}
k[sub]='0';
if(i>2){
i=i-2;
}else{
i=-1;
}
}
if(k[0]=='0'){
return 1;
}
}
return 0;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include<stdio.h>
| ^~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:164:72: error: expected primary-expression before 'const'
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared
171 | void operator delete(void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared
173 | void operator delete[](void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
179 | _GLIBCXX_N |
s854600276 | p03793 | C++ | include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int moji(string s,long long int a,long long int b);
int main(){
string s;
long long int n;
long long int q[500000][2];
long long int i;
int how;
cin>>s;
cin>>n;
for(i=0;i<n;i++){
cin>>q[i][0]>>q[i][1];
}
for(i=0;i<n;i++){
how=moji(s,q[i][0],q[i][1]);
if(how==0){
cout<<"NO"<<endl;
}
if(how==1){
cout<<"YES"<<endl;
}
}
return 0;
}
int moji(string s,long long int a,long long int b){
char k[500000];
long long int i;
long long int j;
int sub;
sub=b-a;
for(i=0;i<=sub;i++){
k[i]=s[a-1+i];
}
for(i=0;i<=sub;i++){
if((k[i]==k[i+1])&&k[i]=='z'){
for(j=i;j<=sub-2;j++){
k[j]=k[j+2];
}
k[sub-1]='0';
k[sub]='0';
if(i>2){
i=i-2;
}else{
i=-1;
}
}else if((k[i]==k[i+1])&&k[i]!='0'){
k[i]=k[i]+0x01;
for(j=i+1;j<=sub-1;j++){
k[j]=k[j+1];
}
k[sub]='0';
if(i>2){
i=i-2;
}else{
i=-1;
}
}
for(j=0;j<=sub;j++){
cout<<k[j];
}
cout<<endl;
}
for(i=0;i<=sub;i++){
if(k[i]!='0'){
return 0;
}
}
return 1;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include<stdio.h>
| ^~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:164:72: error: expected primary-expression before 'const'
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared
171 | void operator delete(void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared
173 | void operator delete[](void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
179 | _GLIBCXX_N |
s656101878 | p03793 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf (int)1000000007
#define mod (int)1000000007
#define rep(i, n) for(int i = 0; i < (n); i++)
#define trep(i, n) for(int i = 0; i <= (n); i++)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define rtrep(i, n) for(int i = (n); i >= 0; i--)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define mfor(i, s, t) for(int i = (s); i < (t); i++)
#define tfor(i, s, t) for(int i = (s); i <= (t); i++)
#define rfor(i, s, t) for(int i = (t) - 1; i >= (s); i--)
string ds;
int dp[514514][27];
int solve(int p, int m) {
if(dp[p][m] < -1) {
int w = ds[p] - 'a';
if(m == 26) {
int now = p;
bool ok = true;
mfor(i, w, 26) {
if(now >= ds.size() - 1) {
dp[p][m] = -1;
ok = false;
break;
}
int t = solve(now + 1, i);
if(t < 0) {
dp[p][m] = -1;
ok = false;
break;
}
now = t;
}
if(ok) {
dp[p][m] = now;
}
}
else if(w == m) {
dp[p][m] = p;
}
else if(w < m) {
int t = solve(p, m - 1);
if(t < 0 || t == ds.size() - 1) {
dp[p][m] = -1;
}
else {
int u = solve(t + 1, m - 1);
if(u < 0) {
dp[p][m] = -1;
}
else {
dp[p][m] = u;
}
}
}
else {
int t = solve(p, 26);
if(t < 0 || t == ds.size() - 1) {
dp[p][m] = -1;
}
else {
int u = solve(t + 1, m);
if(u < 0) {
dp[p][m] = -1;
}
else {
dp[p][m] = u;
}
}
}
}
return dp[p][m];
}
bool trw[514514];
vector<int> tree[514514];
vector<pair<int, int>> ddq[514514];
bool ns[514514];
bool ans[114514];
void solve2(int p) {
for(auto i : ddq[p]) {
if(ns[i.first]) {
ans[i.second] = true;
}
else {
ans[i.second] = false;
}
}
ns[p] = true;
for(auto i : tree[p]) {
solve2(i, s);
}
ns[o] = false;
}
signed main() {
cin >> ds;
int dn = ds.size();
int dq;
cin >> dq;
rep(i, dn) {
rep(j, 27) {
dp[i][j] = -2;
}
}
trep(i, dn) {
trw[i] = false;
ns[i] = false;
}
rep(i, dn) {
if(!trw[i]) {
int a = i;
while(a < dn && solve(a, 26) > 0) {
trw[a] = true;
tree[solve(a, 26) + 1].push_back(a);
a = solve(a, 26) + 1;
}
}
}
rep(i, dq) {
int l, r;
cin >> l >> r;
l--;
ddq[l].push_back(make_pair(r, i));
}
trep(i, dn) {
if(!trw[i]) {
set<int> s;
solve2(i, s);
}
}
rep(i, dq) {
if(ans[i]) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
}
| a.cc: In function 'void solve2(long long int)':
a.cc:102:27: error: 's' was not declared in this scope
102 | solve2(i, s);
| ^
a.cc:104:12: error: 'o' was not declared in this scope
104 | ns[o] = false;
| ^
a.cc: In function 'int main()':
a.cc:140:31: error: too many arguments to function 'void solve2(long long int)'
140 | solve2(i, s);
| ~~~~~~^~~~~~
a.cc:91:6: note: declared here
91 | void solve2(int p) {
| ^~~~~~
|
s416109548 | p03793 | C++ | #include <bits/stdc++.h>
using namespace std;
#define mp(x, y) make_pair((x), (y))
typedef long long ll;
int n;
char s[500005];
int dp[500005][27];
int next[500005][21];
int nn[500005][26];
int main()
{
scanf("%s\n", s);
n=strlen(s);
for(int i=0; i<n; i++) s[i]-='a';
for(int i=0; i<n; i++) for(int j=0; j<27; j++) dp[i][j]=-1;
for(int i=0; i<n; i++) for(int j=0; j<26; j++) nn[i][j]=-1;
for(int i=0; i<n; i++) for(int j=0; j<21; j++) next[i][j]=-1;
for(int i=n-1; i>=0; i--) {
dp[i][s[i]]=i;
int cur=i+1;
for(int j=s[i]+1; j<27 && cur<n; j++) {
if(dp[cur][j-1]==-1) break;
dp[i][j]=dp[cur][j-1];
cur=dp[cur][j-1]+1;
}
if(dp[i][26]==-1 || dp[i][26]+1>=n) continue;
for(int j=0; j<26; j++) {
nn[i][j]=nn[dp[i][26]+1][j];
}
nn[i][s[dp[i][26]+1]]=dp[i][26];
for(int j=0; j<s[i]; j++) {
dp[i][j]=nn[i][j]+1;
}
}
for(int i=0; i<n; i++) {
next[i][0]=dp[i][26];
}
for(int j=1; j<21; j++) {
for(int i=0; i<n; i++) {
if(next[i][j-1]==-1 || next[i][j-1]+1>=n) continue;
next[i][j]=next[next[i][j-1]+1][j-1];
}
}
int Q;
scanf("%d\n", &Q);
for(int x=0; x<Q; x++) {
int l, r;
scanf("%d %d\n", &l, &r);
if(l==r) {
printf("No\n");
continue;
}
l-=2; r--;
for(int k=20; k>=0; k--) {
if(l+1<n && next[l+1][k]!=-1 && next[l+1][k]<=r) {
l=next[l+1][k];
}
}
if(l!=r && next[l][0]!=r) {
printf("No\n");
} else {
printf("Yes\n");
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:21:56: error: reference to 'next' is ambiguous
21 | for(int i=0; i<n; i++) for(int j=0; j<21; j++) next[i][j]=-1;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:40:17: error: reference to 'next' is ambiguous
40 | next[i][0]=dp[i][26];
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:44:28: error: reference to 'next' is ambiguous
44 | if(next[i][j-1]==-1 || next[i][j-1]+1>=n) continue;
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:44:48: error: reference to 'next' is ambiguous
44 | if(next[i][j-1]==-1 || next[i][j-1]+1>=n) continue;
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:45:25: error: reference to 'next' is ambiguous
45 | next[i][j]=next[next[i][j-1]+1][j-1];
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:45:36: error: reference to 'next' is ambiguous
45 | next[i][j]=next[next[i][j-1]+1][j-1];
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:45:41: error: reference to 'next' is ambiguous
45 | next[i][j]=next[next[i][j-1]+1][j-1];
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:59:37: error: reference to 'next' is ambiguous
59 | if(l+1<n && next[l+1][k]!=-1 && next[l+1][k]<=r) {
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:59:57: error: reference to 'next' is ambiguous
59 | if(l+1<n && next[l+1][k]!=-1 && next[l+1][k]<=r) {
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:60:35: error: reference to 'next' is ambiguous
60 | l=next[l+1][k];
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
a.cc:63:28: error: reference to 'next' is ambiguous
63 | if(l!=r && next[l][0]!=r) {
| ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
232 | next(_InputIterator __x, typename
| ^~~~
a.cc:11:5: note: 'int next [500005][21]'
11 | int next[500005][21];
| ^~~~
|
s826005886 | p03793 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define MOD @
#define ADD(X,Y) ((X) = ((X) + (Y)%MOD) % MOD)
typedef long long i64; typedef vector<int> ivec; typedef vector<string> svec;
char S[505050];
int N, Q;
int L[101010], R[101010];
int dp[505050][27];
/*
int uf[505050];
int root(int p)
{
return uf[p] < 0 ? p : (uf[p] = root(uf[p]));
}
void join(int p, int q)
{
p = root(p);
q = root(q);
if (p != q) {
uf[p] += uf[q];
uf[q] = p;
}
}
*/
vector<int> ch[505050];
int lf[505050], rg[505050];
int idx;
void visit(int p)
{
if (lf[p] != -1) return;
lf[p] = idx++;
for (int q : ch[p]) visit(q);
rg[p] = idx;
}
int main()
{
scanf("%s%d", S, &Q);
N = strlen(S);
for (int i = 0; i < Q; ++i) {
scanf("%d%d", L + i, R + i);
--L[i];
}
for (int i = N - 1; i >= 0; --i) {
for (int j = 0; j <= 26; ++j) {
dp[i][j] = N + 10;
}
dp[i][S[i] - 'a'] = i + 1;
for (int j = 1; j <= 26; ++j) {
if (dp[i][j - 1] < N) {
int ij = dp[i][j - 1];
dp[i][j] = min(dp[i][j], dp[ij][j - 1]);
}
}
int i26 = dp[i][26];
for (int j = 0; j <= 26; ++j) {
if (j > 0 && dp[i][j - 1] < N) {
int ij = dp[i][j - 1];
dp[i][j] = min(dp[i][j], dp[ij][j - 1]);
}
if (dp[i][26] < N) {
if (dp[i26][j] <= N) {
dp[i][j] = min(dp[i][j], dp[i26][j]);
}
}
}
}
}
// for (int i = 0; i < N; ++i) printf("%d: %d\n", i, dp[i][26]);
for (int i = 0; i < N; ++i) if (dp[i][26] <= N) {
ch[dp[i][26]].push_back(i);
}
idx = 0;
for (int i = 0; i <= N; ++i) lf[i] = -1;
for (int i = N; i >= 0; --i) visit(i);
for (int i = 0; i < Q; ++i) {
int l = L[i], r = R[i];
bool isok = lf[r] <= lf[l] && lf[l] <= rg[r];
puts(isok ? "Yes" : "No");
}
return 0;
}
| a.cc:87:9: error: expected unqualified-id before 'for'
87 | for (int i = 0; i < N; ++i) if (dp[i][26] <= N) {
| ^~~
a.cc:87:25: error: 'i' does not name a type
87 | for (int i = 0; i < N; ++i) if (dp[i][26] <= N) {
| ^
a.cc:87:32: error: expected unqualified-id before '++' token
87 | for (int i = 0; i < N; ++i) if (dp[i][26] <= N) {
| ^~
a.cc:90:9: error: 'idx' does not name a type
90 | idx = 0;
| ^~~
a.cc:91:9: error: expected unqualified-id before 'for'
91 | for (int i = 0; i <= N; ++i) lf[i] = -1;
| ^~~
a.cc:91:25: error: 'i' does not name a type
91 | for (int i = 0; i <= N; ++i) lf[i] = -1;
| ^
a.cc:91:33: error: expected unqualified-id before '++' token
91 | for (int i = 0; i <= N; ++i) lf[i] = -1;
| ^~
a.cc:92:9: error: expected unqualified-id before 'for'
92 | for (int i = N; i >= 0; --i) visit(i);
| ^~~
a.cc:92:25: error: 'i' does not name a type
92 | for (int i = N; i >= 0; --i) visit(i);
| ^
a.cc:92:33: error: expected unqualified-id before '--' token
92 | for (int i = N; i >= 0; --i) visit(i);
| ^~
a.cc:94:9: error: expected unqualified-id before 'for'
94 | for (int i = 0; i < Q; ++i) {
| ^~~
a.cc:94:25: error: 'i' does not name a type
94 | for (int i = 0; i < Q; ++i) {
| ^
a.cc:94:32: error: expected unqualified-id before '++' token
94 | for (int i = 0; i < Q; ++i) {
| ^~
a.cc:99:9: error: expected unqualified-id before 'return'
99 | return 0;
| ^~~~~~
a.cc:100:1: error: expected declaration before '}' token
100 | }
| ^
|
s655537863 | p03793 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#define MAXN 500005
using namespace std;
string s;
int n;
int pos[MAXN][26], vanish[MAXN];
int main() {
cin >> s;
n = s.size();
memset(pos, -1, sizeof pos);
memset(vanish, -1, sizeof vanish);
for (int i = 0; i < n; i++) {
s[i] -= 'a';
}
pos[n - 1][s[n - 1]] = n - 1;
for (int i = n - 2; i >= 0; i--) {
pos[i][s[i]] = i;
for (int j = s[i] + 1; j <= 26; j++) {
if (pos[i][j - 1] >= 0 && pos[pos[i][j - 1] + 1][j - 1] >= 0) {
pos[i][j] = pos[pos[i][j - 1] + 1][j - 1];
}
}
if (pos[i][26] >= 0 && pos[pos[i][26] + 1][26] >= 0) {
vanish[i] = pos[i][26];
}
if (vanish[i] >= 0) {
for (int j = 0; j < s[i]; j++) {
pos[i][j] = pos[vanish[i] + 1][j];
}
}
}
scanf("%d", &Q);
while (Q--) {
scanf("%d %d", &u, &v);
u--;
v--;
while (u < v) {
u = vanish[u] + 1;
}
if (u == v) {
printf("Yes\n");
} else {
printf("No\n");
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:39:22: error: 'Q' was not declared in this scope
39 | scanf("%d", &Q);
| ^
a.cc:41:33: error: 'u' was not declared in this scope
41 | scanf("%d %d", &u, &v);
| ^
a.cc:41:37: error: 'v' was not declared in this scope
41 | scanf("%d %d", &u, &v);
| ^
|
s640227924 | p03793 | C++ | #include <string>
#include <vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<functional>
#include<list>
#include<deque>
#include<bitset>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cstring>
#include<sstream>
#include<complex>
#include<iomanip>
#include<numeric>
#include<cassert>
#define X first
#define Y second
#define pb push_back
#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X))
#define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X))
#define repe(X,Y) for ((X) = 0;(X) < (Y);++(X))
#define peat(X,Y) for (;(X) < (Y);++(X))
#define all(X) (X).begin(),(X).end()
#define rall(X) (X).rbegin(),(X).rend()
#define eb emplace_back
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())
#define Endl endl
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
template<class T> using vv=vector<vector<T>>;
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
os<<"{"; rep(i,t.size()) {os<<t[i]<<",";} os<<"}"<<endl; return os;}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}
template<class T> inline bool MX(T &l,const T &r){return l<r?l=r,1:0;}
template<class T> inline bool MN(T &l,const T &r){return l>r?l=r,1:0;}
#define out(args...){vector<string> a_r_g_s=s_p_l_i_t(#args, ','); e_r_r(a_r_g_s.begin(), args); }
vector<string> s_p_l_i_t(const string& s, char c) { vector<string> v; stringstream ss(s); string x; while(getline(ss,x,c)) v.emplace_back(x); return move(v);}
void e_r_r(vector<string>::iterator it) {}
template<typename T, typename... Args> void e_r_r(vector<string>::iterator it, T a, Args... args){ if(*it==" 1"||*it=="1") cerr<<endl; else cerr << it -> substr((*it)[0] == ' ', it -> length()) << " = " << a << ", "; e_r_r(++it, args...);}
const ll MOD=1e9+7;
int ok[30][512345];
int dp[20][512345];
queue<int> qs[512345];
int main(){
ios_base::sync_with_stdio(false);
cout<<fixed<<setprecision(0);
string s;
cin>>s;
int n=s.size();
fill(ok[0],ok[30],MOD);
fill(dp[0],dp[20],MOD);
rep(i,n) ok[s[i]-'a'][i]=i+1;
rep(i,26)rep(j,n)if(ok[i][j]<n) MN(ok[i+1][j],ok[i][ok[i][j]]);
vector<int> ub(n+1,26);
rep(j,n)if(ok[26][j]==MOD){
int t=26;
while(ok[t][j]==MOD) --t;
ub[j]=t;
qs[ok[t][j]].push(j);
}
set<int> que;
rep(j,n)if(ok[26][j]<=n){
while(qs[jque].size()){
que.insert(qs[j].front());
qs[j].pop();
}
}
while(que.size()){
int j=*que.begin(); que.erase(*que.begin());
int &i=ub[j];
int f=i;
while(i<26){
int fl=0;
while(1){
if(ok[i][j]!=MOD && MN(ok[i+1][j],ok[i][ok[i][j]])) fl=1;
int f2=0;
while(ok[i][j]!=MOD && ok[26][ok[i][j]]!=MOD){
ok[i][j]=ok[26][ok[i][j]];
fl=1;
f2=1;
}
if(!f2) break;
}
if(fl==0) break;
++i;
}
if(f!=i){
while(qs[j].size()){
que.insert(qs[j].front());
qs[j].pop();
}
}
}
//reps(j,5,8){cout<<s[j];rep(i,27) cout<<ok[i][j]<<",";cout<<endl;}
rrep(i,n){
dp[0][i]=ok[26][i];
if(dp[0][i]!=MOD) continue;
int t=26;
while(ok[t][i]==MOD) --t;
}
rep(i,19)rep(j,n)if(dp[i][j]<n) MN(dp[i+1][j],dp[i][dp[i][j]]);
int q;
cin>>q;
while(q--){
int l,r;
cin>>l>>r; --l;
rrep(i,20)if(dp[i][l]<=r) l=dp[i][l];
cout<<(l==r?"Yes":"No")<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:77:14: error: 'jque' was not declared in this scope; did you mean 'que'?
77 | while(qs[jque].size()){
| ^~~~
| que
|
s638399064 | p03793 | C++ | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define inf 1000000005
#define all(a) (a).begin(), (a).end()
#define ms(a,x) memset(a, x, sizeof(a))
#define mod 1000000007
#define sz(a) ((ll)(a).size())
template<class T> int getbit(T s, int i) { return (s >> i) & 1; }
template<class T> T onbit(T s, int i) { return s | (T(1) << i); }
template<class T> T offbit(T s, int i) { return s & (~(T(1) << i)); }
template<class T> int cntbit(T s) { return __builtin_popcount(s);}
#define Rep(i,n) for(int i = 0; i < (n); ++i)
#define Repd(i,n) for(int i = (n)-1; i >= 0; --i)
#define For(i,a,b) for(int i = (a); i <= (b); ++i)
#define Ford(i,a,b) for(int i = (a); i >= (b); --i)
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
#define eps 1e-9
typedef pair<int, int> II;
typedef pair<ll, ll> LL;
template<class T> T gcd(T a, T b){ T r; while (b != 0) { r = a % b; a = b; b = r; } return a;}
template<class T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
#define PI (2 * acos((ld)0))
#define linf (1ll << 60)
#define y1 y32432
#define y0 y435346
#define maxn 500005
string s;
int a[maxn];
int f[maxn][30];
int nex[maxn][22];
int n, m;
int q, l, r;
void solve(){
// freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
ios::sync_with_stdio(0);
cin.tie(0);
m = 'z' - 'a' + 1;
cin >> s;
n = sz(s);
For(i, 1, n){
a[i] = s[i - 1] - 'a';
}
ms(f, 0x3f);
Ford(i, n, 1){
f[i][a[i]] = i + 1;
For(j, a[i], m - 1){
if(f[i][j] > n) f[i][j + 1] = n + 1;
else{
f[i][j + 1] = f[f[i][j]][j];
}
}
For(j, 0, a[i] - 1){
if(f[i][m] > n) f[i][j] = n + 1;
else f[i][j] = f[f[i][m]][j];
}
}
For(i, 1, n) nex[i][0] = f[i][m];
For(t, 0, 20) For(i, 1, n){
if(nex[i][t] > n) nex[i][t + 1] = n + 1;
else nex[i][t + 1] = nex[nex[i][t]][t];
}
cin >> q;
Rep(run, q){
cin >> l >> r;
r++;
int run = l;
Ford(i, 20, 0) {
if(run > r) break;
if(run == r){
break;
}
if(nex[run][i] <= r){
run = nex[run][i];
}
}
if(run == r) cout << "Yes\n";
else cout << "No\n";
}
}
int main()
{
solve();
return 0;
}
| a.cc: In function 'void solve()':
a.cc:81:13: error: redeclaration of 'int run'
81 | int run = l;
| ^~~
a.cc:78:9: note: 'int run' previously declared here
78 | Rep(run, q){
| ^~~
a.cc:17:26: note: in definition of macro 'Rep'
17 | #define Rep(i,n) for(int i = 0; i < (n); ++i)
| ^
|
s578163373 | p03793 | Java | import java.util.ArrayList;
import java.util.Scanner;
public class Main2 {
private static String input = "";
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
input = scanner.nextLine();
int countOfQuerries = Integer.parseInt(scanner.nextLine());
ArrayList<String> rawQuerries = new ArrayList<>();
for (int i = 0; i < countOfQuerries; i++) {
rawQuerries.add(scanner.nextLine());
}
for (int i = 0; i < countOfQuerries; i++) {
String[] pair = rawQuerries.get(i).split(" ");
int from = Integer.parseInt(pair[0]) - 1;
int to = Integer.parseInt(pair[1]) - 1;
String finalString = convert(from, to);
if (finalString.isEmpty()) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
private static String convert(int from, int to) {
char[] characters = input.toCharArray();
ArrayList<Character> charList = new ArrayList<>();
for (int i = from; i <= to; i++) {
charList.add(characters[i]);
}
charList = replace(charList, 0);
String result = "";
for (Character c : charList) result += c;
return result;
}
private static ArrayList<Character> replace(ArrayList<Character> input, int from) {
ArrayList<Character> characters = input;
if (characters.size() - from >= 2) {
if (characters.get(from).equals(characters.get(from + 1))) {
char keyChar = characters.get(from);
characters.remove(from);
characters.remove(from);
if (keyChar != 'z') {
keyChar++;
characters.add(from, keyChar);
}
return replace(characters, 0);
} else {
return replace(characters, ++from);
}
} else {
return input;
}
}
}
| Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s309069654 | p03794 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------
int N;
vector<vector<int>> E;
vector<int> D;
ll dp[1020][1020];
pair<int,int> farthest(vector<vector<int>>& E, int cur,int pre,int d,vector<int>& D) {
D[cur]=d;
pair<int,int> r={d,cur};
FORR(e,E[cur]) if(e!=pre) r=max(r, farthest(E,e,cur,d+1,D));
return r;
}
pair<int,vector<int>> diameter(vector<vector<int>>& E) { // diameter,center
vector<int> D[2];
D[0].resize(E.size());
D[1].resize(E.size());
auto v1=farthest(E,0,0,0,D[0]);
auto v2=farthest(E,v1.second,v1.second,0,D[0]);
farthest(E,v2.second,v2.second,0,D[1]);
pair<int,vector<int>> R;
R.first = v2.first;
for(int i=E.size()-1;i>=0;i--) if(D[0][i]+D[1][i]==R.first && abs(D[0][i]-D[1][i])<=1) R.second.push_back(i);
return R;
}
void dfs(int cur,int pre,int d,int md,int p) {
FORR(e,E[cur]) if(e!=pre) dfs(e,cur,d+1,md,p);
for(int x=-503;x<=503;x++) if((abs(x+p) <= md-d)&&(abs(x-p) <= md-d)){
dp[cur][505+x]=1;
FORR(e,E[cur]) if(e!=pre) (dp[cur][505+x] *= (dp[e][505+x+1]+dp[e][505+x-1]))%=mo;
}
}
void solve() {
int i,j,k,l,r,x,y; string s;
cin>>N;
E.resize(N);
FOR(i,N-1) {
cin>>x>>y;
E[x-1].push_back(y-1);
E[y-1].push_back(x-1);
}
auto dia = diameter(E);
if(dia.first%2==0) {
dfs(dia.second[0],-1,0,dia.first/2,0);
cout<< accumulate(dp[dia.second[0]],dp[dia.second[0]]+1010,0LL)%mo<<endl;
}
else {
ll ret=0;
dfs(dia.second[0],dia.second[1],0,dia.first/2,0);
dfs(dia.second[1],dia.second[0],0,dia.first/2+1,0);
for(x=3;x<=1008;x++) (ret += dp[dia.second[0]][x]*(dp[dia.second[1]][x+1]+dp[dia.second[1]][x-1]))%=mo;
ZERO(dp);
dfs(dia.second[0],dia.second[1],0,dia.first/2+1,0);
dfs(dia.second[1],dia.second[0],0,dia.first/2,0);
for(x=3;x<=1008;x++) (ret += dp[dia.second[0]][x]*(dp[dia.second[1]][x+1]+dp[dia.second[1]][x-1]))%=mo;
ZERO(dp);
dfs(dia.second[0],dia.second[1],0,dia.first/2,0);
dfs(dia.second[1],dia.second[0],0,dia.first/2,0);
for(i=3;i<=1008;i++) ret -= 2*dp[dia.second[0]][i]*dp[dia.second[1]][i]%mo;
for(i=3;i<=1008;i++) ret -= dp[dia.second[0]][i]*dp[dia.second[1]][i+2]%mo;
for(i=3;i<=1008;i++) ret -= dp[dia.second[0]][i]*dp[dia.second[1]][i-2]%mo;
cout<<(ret%mo+mo)%mo<<endl;
}
}
int main(int argc,char** argv){
string s;int i;
if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
FOR(i,argc-1) s+=argv[i+1],s+='\n';
FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
solve(); return 0;
}
| a.cc: In function 'void dfs(int, int, int, int, int)':
a.cc:44:96: error: 'mo' was not declared in this scope; did you mean 'md'?
44 | FORR(e,E[cur]) if(e!=pre) (dp[cur][505+x] *= (dp[e][505+x+1]+dp[e][505+x-1]))%=mo;
| ^~
| md
a.cc: In function 'void solve()':
a.cc:62:81: error: 'mo' was not declared in this scope
62 | cout<< accumulate(dp[dia.second[0]],dp[dia.second[0]]+1010,0LL)%mo<<endl;
| ^~
a.cc:68:117: error: 'mo' was not declared in this scope
68 | for(x=3;x<=1008;x++) (ret += dp[dia.second[0]][x]*(dp[dia.second[1]][x+1]+dp[dia.second[1]][x-1]))%=mo;
| ^~
a.cc:73:117: error: 'mo' was not declared in this scope
73 | for(x=3;x<=1008;x++) (ret += dp[dia.second[0]][x]*(dp[dia.second[1]][x+1]+dp[dia.second[1]][x-1]))%=mo;
| ^~
a.cc:78:89: error: 'mo' was not declared in this scope
78 | for(i=3;i<=1008;i++) ret -= 2*dp[dia.second[0]][i]*dp[dia.second[1]][i]%mo;
| ^~
a.cc:79:89: error: 'mo' was not declared in this scope
79 | for(i=3;i<=1008;i++) ret -= dp[dia.second[0]][i]*dp[dia.second[1]][i+2]%mo;
| ^~
a.cc:80:89: error: 'mo' was not declared in this scope
80 | for(i=3;i<=1008;i++) ret -= dp[dia.second[0]][i]*dp[dia.second[1]][i-2]%mo;
| ^~
a.cc:81:28: error: 'mo' was not declared in this scope
81 | cout<<(ret%mo+mo)%mo<<endl;
| ^~
|
s715733395 | p03794 | C++ | // ba mei zi !
#include<bits/stdc++.h>
#define HEAP priority_queue
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define per(i, n) for(int i = (n) - 1; i >= 0 ; --i)
#define forn(i, l, r) for(int i = (l); i <= (r); ++i)
#define nrof(i, r, l) for(int i = (r); i >= (l); --i)
#define FOR(a, b) for(auto (a): (b))
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define X first
#define Y second
#define eps 1e-6
#define pi 3.1415926535897932384626433832795
#define SZ(x) (int)x.size()
#define ALL(x) x.begin(), x.end()
#define FILL(a, b) memset((a), (b), sizeof((a)))
#define MCPY(a, b) memcpy((a), (b), sizeof((b)))
using namespace std;
typedef long long LL;
typedef double flt;
typedef vector<int> vi;
typedef vector<LL> vl;
typedef pair<int,int> pii;
typedef pair<int,LL> pil;
typedef pair<LL,int> pli;
typedef pair<LL,LL> pll;
typedef vector<pil> vil;
typedef vector<pii> vii;
typedef vector<pli> vli;
typedef vector<pll> vll;
const int iinf = 1e9 + 7;
const LL linf = 1ll << 60;
const flt dinf = 1e60;
template <typename T>
inline void scf(T &x)
{
bool f = 0; x = 0; char c = getchar();
while((c < '0' || c > '9') && c != '-') c = getchar();
if(c == '-') { f = 1; c = getchar(); }
while(c >= '0' && c <= '9') { x = x * 10 + c - '0'; c = getchar(); }
if(f) x = -x; return;
}
template <typename T1, typename T2>
void scf(T1 &x, T2 &y) { scf(x); return scf(y); }
template <typename T1, typename T2, typename T3>
void scf(T1 &x, T2 &y, T3 &z) { scf(x); scf(y); return scf(z); }
template <typename T1, typename T2, typename T3, typename T4>
void scf(T1 &x, T2 &y, T3 &z, T4 &w) { scf(x); scf(y); scf(z); return scf(w); }
inline char mygetchar(){ char c = getchar(); while(c == ' ' || c == '\n') c = getchar(); return c; }
template <typename T>
void chkmax(T &x, const T &y){ if(y > x) x = y; return; }
template <typename T>
void chkmin(T &x, const T &y){ if(y < x) x = y; return; }
#ifdef ONLINE_JUDGE
#define debug(x,c) ;
#else
#define DEBUG
#define debug(x,c) cerr<<#x<<"="<<x<<c;
#endif
//---------------------------head----------------------------
const int N = 1e3 + 100;
const int mod = 1e9 + 7;
int n, diameter_length, min_D;
int dp[N][N / 2], tag[N / 2][N], current_time;
vi g[N];
vi diameter_path;
namespace TREE
{
int par[N], dep[N];
void dfs(int u = 1, int fa = 0)
{
par[u] = fa;
dep[u] = dep[fa] + 1;
for(int v: g[u]) if(v != fa) dfs(v, u);
return;
}
void get_diameter()
{
dfs();
int mx = -1, S, T;
forn(i, 1, n) if(dep[i] > mx) mx = dep[i], S = i;
dfs(S);
mx = -1;
forn(i, 1, n) if(dep[i] > mx) mx = dep[i], T = i;
diameter_length = dep[T] - 1;
min_D = dep[T] >> 1;
int u = T;
while(u != S) diameter_path.pb(u), u = par[u];
diameter_path.pb(S);
return;
}
}
void MEI()
{
scf(n);
rep(i, n - 1)
{
int u, v;
scf(u, v);
g[u].pb(v);
g[v].pb(u);
}
TREE::get_diameter();
return;
}
namespace Bamboo
{
void solve()
{
dp[0][0] = 1;
forn(i, 1, n - 1)
{
dp[i][0] = dp[i][i] = 1;
forn(j, 1, i - 1) dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j]) % mod;
}
printf("%d\n", dp[n - 1][min_D] * 2 % mod);
return;
}
}
namespace Odd
{
int root1, root2, only_down, only_up;
void DP1(int u, int par, int max_down, int max_up)
{
if(tag[u][max_down] == current_time) return;
tag[u][max_down] = current_time;
int &t = dp[u][max_down];
t = 1;
for(int v: g[u]) if(v != par && v != root2)
{
int foo = 0;
if(max_down) DP1(v, u, max_down - 1, max_up), foo += dp[v][max_down - 1];
if(max_up) DP1(v, u, max_down, max_up - 1), foo += dp[v][max_down];
t = 1ll * t * foo % mod;
}
if(u == root1 && max_down)
{
DP1(root2, root1, max_down, max_up);
t = 1ll * t * dp[root2][max_down] % mod;
}
return;
}
void DP2(int u, int par, int max_down, int max_up)
{
if(tag[u][max_down] == current_time) return;
tag[u][max_down] = current_time;
int &t = dp[u][max_down];
t = 1;
for(int v: g[u]) if(v != par)
{
int foo = 0;
if(max_down && v != only_up) DP1(v, u, max_down - 1, max_up), foo += dp[v][max_down - 1];
if(max_up && v != only_down) DP1(v, u, max_down, max_up - 1), foo += dp[v][max_down];
t = 1ll * t * foo % mod;
}
return;
}
void solve()
{
int ans = 0;
root1 = diameter_path[min_D], root2 = diameter_path[min_D - 1];
rep(max_down, min_D)
{
current_time++;
DP1(root1, 0, max_down, min_D - 1 - max_down);
ans += dp[root1][max_down];
if(ans >= mod) ans -= mod;
}
g[diameter_path.back()].pb(n + 1);
only_up = n + 1; only_down = root2;
forn(max_down, 0, min_D)
{
current_time++;
DP2(root1, 0, max_down, min_D - max_down);
ans += dp[root1][max_down];
if(ans >= mod) ans -= mod;
}
printf("%d\n", ans * 2 % mod);
return;
}
}
namespace Even
{
void DP(int u, int par, int max_down, int max_up)
{
if(tag[u][max_down] == current_time) return;
tag[u][max_down] = current_time;
int &t = dp[u][max_down];
t = 1;
for(int v: g[u]) if(v != par)
{
int foo = 0;
if(max_down) DP(v, u, max_down - 1, max_up), foo += dp[v][max_down - 1];
if(max_up) DP(v, u, max_down, max_up - 1), foo += dp[v][max_down];
t = 1ll * t * foo % mod;
}
return;
}
void solve()
{
int root = diameter_path[min_D];
int ans = 0;
forn(max_down, 0, min_D)
{
current_time++;
DP(root, 0, max_down, min_D - max_down);
ans += dp[root][max_down];
if(ans >= mod) ans -= mod;
}
printf("%d\n", ans);
return;
}
}
void ZI()
{
if(diameter_length == n - 1) Bamboo::solve();
else if(diameter_length & 1) for(;;), Odd::solve();
else Even::solve();
return;
}
/*
Main
code
is
over
.
If
you
are
in
a
hurry
trying
to
hack
me
you
don't
need
to
read
the
part
left
.
Trust
me
.
It
is
useless
.
My
code
always
gets
a
failed
system
test
,
so
it
will
be
pretty
easy
for
you
to
hack
me
.
Just
find
a
test
case
and
hack
.
Wish
you
all
happy
hack
.
_____
/ \
| . . |
| |
| | |
| --- |
| \_/ |
\_____/
*/
#ifdef DEBUG
struct I{ int x; I(){} I(int y):x(y){} bool operator <(const I &a) const{ return x < a.x; }};
pair<I,LL> time_limit_exceeded;
const bool FLAG = 1;
static vector<I> wrong_answer;
I *RP=new I;
I FUCK=min(I{*RP}, I{0});
static int memory_limit_exceeded[10];
vi O(){cout<<FUCK.x<<endl; vi ert; int x=0;
x=(int)hypot(3.0, 4.0); ert.pb(x);
if(x&1)exit(0);
auto t=lower_bound(ALL(ert), 5);
static list<int> runtime_error_;
return ert;}
#endif // DEBUG
#define MEI int
#define ZI main
MEI ZI()
{
#undef MEI
#undef ZI
MEI();
ZI();
#define BA return
#define MEI 0
#define ZI ;
BA MEI ZI
#undef BA
#undef MEI
#undef ZI
} | a.cc: In function 'void ZI()':
a.cc:260:45: error: expected primary-expression before ',' token
260 | else if(diameter_length & 1) for(;;), Odd::solve();
| ^
|
s703190372 | p03794 | C++ | // ba mei zi !
#include<bits/stdc++.h>
#define HEAP priority_queue
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define per(i, n) for(int i = (n) - 1; i >= 0 ; --i)
#define forn(i, l, r) for(int i = (l); i <= (r); ++i)
#define nrof(i, r, l) for(int i = (r); i >= (l); --i)
#define FOR(a, b) for(auto (a): (b))
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define X first
#define Y second
#define eps 1e-6
#define pi 3.1415926535897932384626433832795
#define SZ(x) (int)x.size()
#define ALL(x) x.begin(), x.end()
#define FILL(a, b) memset((a), (b), sizeof((a)))
#define MCPY(a, b) memcpy((a), (b), sizeof((b)))
using namespace std;
typedef long long LL;
typedef double flt;
typedef vector<int> vi;
typedef vector<LL> vl;
typedef pair<int,int> pii;
typedef pair<int,LL> pil;
typedef pair<LL,int> pli;
typedef pair<LL,LL> pll;
typedef vector<pil> vil;
typedef vector<pii> vii;
typedef vector<pli> vli;
typedef vector<pll> vll;
const int iinf = 1e9 + 7;
const LL linf = 1ll << 60;
const flt dinf = 1e60;
template <typename T>
inline void scf(T &x)
{
bool f = 0; x = 0; char c = getchar();
while((c < '0' || c > '9') && c != '-') c = getchar();
if(c == '-') { f = 1; c = getchar(); }
while(c >= '0' && c <= '9') { x = x * 10 + c - '0'; c = getchar(); }
if(f) x = -x; return;
}
template <typename T1, typename T2>
void scf(T1 &x, T2 &y) { scf(x); return scf(y); }
template <typename T1, typename T2, typename T3>
void scf(T1 &x, T2 &y, T3 &z) { scf(x); scf(y); return scf(z); }
template <typename T1, typename T2, typename T3, typename T4>
void scf(T1 &x, T2 &y, T3 &z, T4 &w) { scf(x); scf(y); scf(z); return scf(w); }
inline char mygetchar(){ char c = getchar(); while(c == ' ' || c == '\n') c = getchar(); return c; }
template <typename T>
void chkmax(T &x, const T &y){ if(y > x) x = y; return; }
template <typename T>
void chkmin(T &x, const T &y){ if(y < x) x = y; return; }
#ifdef ONLINE_JUDGE
#define debug(x,c) ;
#else
#define DEBUG
#define debug(x,c) cerr<<#x<<"="<<x<<c;
#endif
//---------------------------head----------------------------
const int N = 1e3 + 100;
const int mod = 1e9 + 7;
int n, diameter_length, min_D;
int dp[N][N / 2], tag[N / 2][N], current_time;
vi g[N];
vi diameter_path;
namespace TREE
{
int par[N], dep[N];
void dfs(int u = 1, int fa = 0)
{
par[u] = fa;
dep[u] = dep[fa] + 1;
for(int v: g[u]) if(v != fa) dfs(v, u);
return;
}
void get_diameter()
{
dfs();
int mx = -1, S, T;
forn(i, 1, n) if(dep[i] > mx) mx = dep[i], S = i;
dfs(S);
mx = -1;
forn(i, 1, n) if(dep[i] > mx) mx = dep[i], T = i;
diameter_length = dep[T] - 1;
min_D = dep[T] >> 1;
int u = T;
while(u != S) diameter_path.pb(u), u = par[u];
diameter_path.pb(S);
return;
}
}
void MEI()
{
scf(n);
rep(i, n - 1)
{
int u, v;
scf(u, v);
g[u].pb(v);
g[v].pb(u);
}
TREE::get_diameter();
return;
}
namespace Bamboo
{
void solve()
{
dp[0][0] = 1;
forn(i, 1, n - 1)
{
dp[i][0] = dp[i][i] = 1;
forn(j, 1, i - 1) dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j]) % mod;
}
printf("%d\n", dp[n - 1][min_D] * 2 % mod);
return;
}
}
namespace Odd
{
int root1, root2, only_down, only_up;
void DP1(int u, int par, int max_down, int max_up)
{
if(tag[u][max_down] == current_time) return;
tag[u][max_down] = current_time;
int &t = dp[u][max_down];
t = 1;
for(int v: g[u]) if(v != par && v != root2)
{
int foo = 0;
if(max_down) DP1(v, u, max_down - 1, max_up), foo += dp[v][max_down - 1];
if(max_up) DP1(v, u, max_down, max_up - 1), foo += dp[v][max_down];
t = 1ll * t * foo % mod;
}
if(u == root1 && max_down)
{
DP1(root2, root1, max_down, max_up);
t = 1ll * t * dp[root2][max_down] % mod;
}
return;
}
void DP2(int u, int par, int max_down, int max_up)
{
if(tag[u][max_down] == current_time) return;
tag[u][max_down] = current_time;
int &t = dp[u][max_down];
t = 1;
for(int v: g[u]) if(v != par)
{
int foo = 0;
if(max_down && v != only_up) DP1(v, u, max_down - 1, max_up), foo += dp[v][max_down - 1];
if(max_up && v != only_down) DP1(v, u, max_down, max_up - 1), foo += dp[v][max_down];
t = 1ll * t * foo % mod;
}
return;
}
void solve()
{
int ans = 0;
root1 = diameter_path[min_D], root2 = diameter_path[min_D - 1];
rep(max_down, min_D)
{
current_time++;
DP1(root1, 0, max_down, min_D - 1 - max_down);
ans += dp[root1][max_down];
if(ans >= mod) ans -= mod;
}
g[diameter_path.back()].pb(n + 1);
only_up = n + 1; only_down = root2;
forn(max_down, 0, min_D)
{
current_time++;
DP2(root1, 0, max_down, min_D - max_down);
ans += dp[root1][max_down];
if(ans >= mod) ans -= mod;
}
printf("%d\n", ans * 2 % mod);
return;
}
}
namespace Even
{
void DP(int u, int par, int max_down, int max_up)
{
if(tag[u][max_down] == current_time) return;
tag[u][max_down] = current_time;
int &t = dp[u][max_down];
t = 1;
for(int v: g[u]) if(v != par)
{
int foo = 0;
if(max_down) DP(v, u, max_down - 1, max_up), foo += dp[v][max_down - 1];
if(max_up) DP(v, u, max_down, max_up - 1), foo += dp[v][max_down];
t = 1ll * t * foo % mod;
}
return;
}
void solve()
{
int root = diameter_path[min_D];
int ans = 0;
forn(max_down, 0, min_D)
{
current_time++;
DP(root, 0, max_down, min_D - max_down);
ans += dp[root][max_down];
if(ans >= mod) ans -= mod;
}
printf("%d\n", ans);
return;
}
}
void ZI()
{
if(diameter_length == n - 1) Bamboo::solve();
else if(diameter_length & 1) for(;;), Odd::solve();
else Even::solve();
return;
}
/*
Main
code
is
over
.
If
you
are
in
a
hurry
trying
to
hack
me
you
don't
need
to
read
the
part
left
.
Trust
me
.
It
is
useless
.
My
code
always
gets
a
failed
system
test
,
so
it
will
be
pretty
easy
for
you
to
hack
me
.
Just
find
a
test
case
and
hack
.
Wish
you
all
happy
hack
.
_____
/ \
| . . |
| |
| | |
| --- |
| \_/ |
\_____/
*/
#ifdef DEBUG
struct I{ int x; I(){} I(int y):x(y){} bool operator <(const I &a) const{ return x < a.x; }};
pair<I,LL> time_limit_exceeded;
const bool FLAG = 1;
static vector<I> wrong_answer;
I *RP=new I;
I FUCK=min(I{*RP}, I{0});
static int memory_limit_exceeded[10];
vi O(){cout<<FUCK.x<<endl; vi ert; int x=0;
x=(int)hypot(3.0, 4.0); ert.pb(x);
if(x&1)exit(0);
auto t=lower_bound(ALL(ert), 5);
static list<int> runtime_error_;
return ert;}
#endif // DEBUG
#define MEI int
#define ZI main
MEI ZI()
{
#undef MEI
#undef ZI
MEI();
ZI();
#define BA return
#define MEI 0
#define ZI ;
BA MEI ZI
#undef BA
#undef MEI
#undef ZI
} | a.cc: In function 'void ZI()':
a.cc:260:45: error: expected primary-expression before ',' token
260 | else if(diameter_length & 1) for(;;), Odd::solve();
| ^
|
s229878756 | p03794 | C++ | #include <bits/stdc++.h>
using namespace std;
int n;
int ver[1001] , nxt[2001] , to[2001] , tot;
void addedge(int from , int t)
{nxt[++tot] = ver[from];to[tot] = t;ver[from] = tot;}
const int mod = 1000000007;
int siz[1001];
map<pair<int,int> , int> f[1001];
int mid;
void dfs(int o)
{
siz[o] = 1;
map<pair<int,int> , int> g;
f[o][make_pair(0 , 0)] = 1;
for(int i = ver[o] ; i ; i = nxt[i])
{
if(!siz[to[i]])
{
dfs(to[i]);
for(auto x : f[o])
for(auto y : f[to[i]])
{
if(x.first.first + y.first.second + 1 <= mid && x.first.second + y.first.first <= mid)
{
make_pair<int,int> res = make_pair(max(x.first.first , y.first.first) , max(x.first.second , y.first.second + 1));
g[res] += (long long)x.second * y.second % mod;
if(g[res] >= mod)
g[res] -= mod;
}
if(x.first.first + y.first.second <= mid && x.first.second + y.first.first + 1 <= mid)
{
make_pair<int,int> res = make_pair(max(x.first.first , y.first.first + 1) , max(x.first.second , y.first.second));
g[res] += (long long)x.second * y.second % mod;
if(g[res] >= mod)
g[res] -= mod;
}
}
f[o] = g;
g.clear();
siz[o] += siz[to[i]];
}
}
}
int main()
{
scanf("%d" , &n);
for(int i = 1 ; i < n ; i++)
{
int a , b;scanf("%d%d" , &a , &b);
addedge(a , b);
addedge(b , a);
}
int ll = 0 , rr = n - 1;
while(ll + 1 < rr)
{
mid = (ll + rr) >> 1;
for(int i = 1 ; i <= n ; i++)
{
siz[i] = 0;
f[i].clear();
}
dfs(1);
if(f[1].size() > 0)
rr = mid;
else ll = mid;
}
mid = rr;
for(int i = 1 ; i <= n ; i++)
siz[i] = 0 , f[i].clear();
dfs(1);
int ans = 0;
for(auto x : f[1])
{
ans = (ans + x.second) % mod;
}
printf("%d\n" , ans);
return 0;
}
| a.cc: In function 'void dfs(int)':
a.cc:32:67: error: expected ';' before 'res'
32 | make_pair<int,int> res = make_pair(max(x.first.first , y.first.first) , max(x.first.second , y.first.second + 1));
| ^~~~
| ;
a.cc:33:51: error: 'res' was not declared in this scope
33 | g[res] += (long long)x.second * y.second % mod;
| ^~~
a.cc:39:67: error: expected ';' before 'res'
39 | make_pair<int,int> res = make_pair(max(x.first.first , y.first.first + 1) , max(x.first.second , y.first.second));
| ^~~~
| ;
a.cc:40:51: error: 'res' was not declared in this scope
40 | g[res] += (long long)x.second * y.second % mod;
| ^~~
|
s938632160 | p03794 | C++ | #include <bits/stdc++.h>
using namespace std;
int n;
int ver[1001] , nxt[2001] , to[2001] , tot;
void addedge(int from , int t)
{nxt[++tot] = ver[from];to[tot] = t;ver[from] = tot;}
const int mod = 1000000007;
int siz[1001];
map<pair<int,int> , int> f[1001];
int mid;
void dfs(int o)
{
siz[o] = 1;
map<pair<int,int> , int> g;
f[o][make_pair(0 , 0)] = 1;
for(int i = ver[o] ; i ; i = nxt[i])
{
if(!siz[to[i]])
{
dfs(to[i]);
for(auto x : f[o])
for(auto y : f[to[i]])
{
if(x.first.first + y.first.second + 1 <= mid && x.first.second + y.first.first <= mid)
{
make_pair<int,int> res = make_pair(max(x.first.first , y.first.first) , max(x.first.second , y.first.second + 1));
g[res] += (long long)x.second * y.second % mod;
if(g[res] >= mod)
g[res] -= mod;
}
if(x.first.first + y.first.second <= mid && x.first.second + y.first.first + 1 <= mid)
{
make_pair<int,int> res = make_pair(max(x.first.first , y.first.first + 1) , max(x.first.second , y.first.second));
g[res] += (long long)x.second * y.second % mod;
if(g[res] >= mod)
g[res] -= mod;
}
}
f[o] = g;
g.clear();
siz[o] += siz[to[i]];
}
}
}
int main()
{
scanf("%d" , &n);
for(int i = 1 ; i < n ; i++)
{
int a , b;scanf("%d%d" , &a , &b);
addedge(a , b);
addedge(b , a);
}
int ll = 0 , rr = n - 1;
while(ll + 1 < rr)
{
mid = (ll + rr) >> 1;
for(int i = 1 ; i <= n ; i++)
{
siz[i] = 0;
f[i].clear();
}
dfs(1);
if(f[1].size() > 0)
rr = mid;
else ll = mid;
}
mid = rr;
for(int i = 1 ; i <= n ; i++)
siz[i] = 0 , f[i].clear();
dfs(1);
int ans = 0;
for(auto x : f[1])
{
ans = (ans + x.second) % mod;
}
printf("%d\n" , ans);
return 0;
}
| a.cc: In function 'void dfs(int)':
a.cc:32:67: error: expected ';' before 'res'
32 | make_pair<int,int> res = make_pair(max(x.first.first , y.first.first) , max(x.first.second , y.first.second + 1));
| ^~~~
| ;
a.cc:33:51: error: 'res' was not declared in this scope
33 | g[res] += (long long)x.second * y.second % mod;
| ^~~
a.cc:39:67: error: expected ';' before 'res'
39 | make_pair<int,int> res = make_pair(max(x.first.first , y.first.first + 1) , max(x.first.second , y.first.second));
| ^~~~
| ;
a.cc:40:51: error: 'res' was not declared in this scope
40 | g[res] += (long long)x.second * y.second % mod;
| ^~~
|
s470228077 | p03795 | C++ | #include <iostream>
int main () {
int n, rest, divRes;
std::in >> n;
rest = n % 15;
divRes = (n - rest) / 15
std::out << n * 800 - divRes * 200 << std::endl;
} | a.cc: In function 'int main()':
a.cc:6:14: error: 'in' is not a member of 'std'; did you mean 'min'?
6 | std::in >> n;
| ^~
| min
a.cc:9:33: error: expected ';' before 'std'
9 | divRes = (n - rest) / 15
| ^
| ;
10 |
11 | std::out << n * 800 - divRes * 200 << std::endl;
| ~~~
|
s187751110 | p03795 | C | #include<stdio.h>
int main(){
int n;
scanf("%d",&n);
int sum=800*n-200*(n/15);
printf("%d\n",sum);
return
} | main.c: In function 'main':
main.c:10:1: error: expected expression before '}' token
10 | }
| ^
|
s027067069 | p03795 | C | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
#define txt freopen("ip.txt", "r", stdin); freopen("op.txt", "w", stdout)
#define a3 INT_MAX
#define i3 INT_MIN
#define a6 INT64_MAX
#define i6 INT64_MIN
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define quickie ios_base::sync_with_stdio(false); cin.tie(NULL);
#define div2(a) (!(a&1))
#define deb(x) cout<<(#x)<<" "<<(x)<<"\n";
#define newl cout<<"\n"
#define all(s) s.begin(),s.end()
#define pi 3.14159265358979323846
#define fp(x) fixed<<setprecision(x)<<
template<class T>
T mod(T a){
if(a < 0){
a += 1000000007;
}
return a%1000000007;
}
template<class T>
T addmod(T a, T b){
return (mod(a) + mod(b)) % 1000000007;
}
template<class T>
T prodmod(T a, T b){
return (mod(a) * mod(b)) % 1000000007;
}
template<class T>
T bin_exp(T a, T b)
{
T res = 1;
T temp = 1;
if (b <= 1)
return a;
if (b %2 == 0)
res = bin_exp(a * a, b / 2);
else
{
res *= a;
temp = bin_exp(a, --b);
}
return res * temp;
}
template<class T>
T bin_expmod(T a, T b)
{
T res = 1;
T temp = 1;
if (b <= 1)
return a;
if (b %2 == 0)
res = bin_expmod(prodmod(a,a), b / 2);
else
{
res = prodmod(a,res);
temp = bin_exp(a, --b);
}
return prodmod(res , temp);
}
template<class T>
int digit(T a)
{
vector<long long> dig = {
0,
9,
99,
999,
9999,
99999,
999999,
9999999,
99999999,
999999999,
9999999999,
99999999999,
999999999999,
9999999999999,
99999999999999,
999999999999999,
9999999999999999,
99999999999999999,
999999999999999999,
INT64_MAX};
auto it = lower_bound(dig.begin(), dig.end(), a);
int idx = (it - dig.begin());
return idx;
}
template<class T>
int sumAllInts(T n){
int a = 1;
int su = 0;
while(n){
su += n%10;
n/=10;
}
return su;
}
template<class T>
void split(char c,T s){
int n = s.size();
int i = 0;
while ((cout<<s[i],i+=1) && (i<n) && (cout<<c<<' '));
}
void solve(){
long long int N;
cin>>N;
cout<<(800*N)-((N/15)*200)<<endl;
}
int main(){
quickie;
int t=1;
while(t--){
solve();
newl;
}
return 0;
} | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s673926886 | p03795 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
cout << n * x + n / 15;
} | a.cc: In function 'int main()':
a.cc:9:21: error: 'x' was not declared in this scope
9 | cout << n * x + n / 15;
| ^
|
s195494230 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<n;++i)
#define exrep(i, a, b) for(ll i = a; i < b; i++)
#define out(x) cout << x << endl
#define EPS (1e-7)
#define gearup ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<bool> > vvb;
typedef vector<vector<double> > vvd;
typedef vector<vector<string> > vvs;
typedef vector<ll> vl;
typedef vector<vector<ll> > vvl;
typedef vector<vector<vector<ll> > > vvvl;
ll MOD = 1000000007;
const long long L_INF = 1LL << 60;
const int INF = 2147483647; // 2^31-1
const double PI = acos(-1);
//cout<<fixed<<setprecision(10);
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
template<class T> void debug(T v){rep(i,v.size()) cout<<v[i]<<" ";cout<<endl;}
const ll dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//以降 cin の入力元が 'input.txt' になる
//std::ifstream in("input.txt");
//std::cin.rdbuf(in.rdbuf());
signed main()
{
gearup;
ll n; cin >> n;
ll wa = n/15;
out(800*n - 200 * wa);
}#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<n;++i)
#define exrep(i, a, b) for(ll i = a; i < b; i++)
#define out(x) cout << x << endl
#define EPS (1e-7)
#define gearup ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<bool> > vvb;
typedef vector<vector<double> > vvd;
typedef vector<vector<string> > vvs;
typedef vector<ll> vl;
typedef vector<vector<ll> > vvl;
typedef vector<vector<vector<ll> > > vvvl;
ll MOD = 1000000007;
const long long L_INF = 1LL << 60;
const int INF = 2147483647; // 2^31-1
const double PI = acos(-1);
//cout<<fixed<<setprecision(10);
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
template<class T> void debug(T v){rep(i,v.size()) cout<<v[i]<<" ";cout<<endl;}
const ll dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//以降 cin の入力元が 'input.txt' になる
//std::ifstream in("input.txt");
//std::cin.rdbuf(in.rdbuf());
signed main()
{
gearup;
ll n; cin >> n;
ll wa = n/15;
out(800*n - 200 * wa);
}#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<n;++i)
#define exrep(i, a, b) for(ll i = a; i < b; i++)
#define out(x) cout << x << endl
#define EPS (1e-7)
#define gearup ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<bool> > vvb;
typedef vector<vector<double> > vvd;
typedef vector<vector<string> > vvs;
typedef vector<ll> vl;
typedef vector<vector<ll> > vvl;
typedef vector<vector<vector<ll> > > vvvl;
ll MOD = 1000000007;
const long long L_INF = 1LL << 60;
const int INF = 2147483647; // 2^31-1
const double PI = acos(-1);
//cout<<fixed<<setprecision(10);
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
template<class T> void debug(T v){rep(i,v.size()) cout<<v[i]<<" ";cout<<endl;}
const ll dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//以降 cin の入力元が 'input.txt' になる
//std::ifstream in("input.txt");
//std::cin.rdbuf(in.rdbuf());
signed main()
{
gearup;
ll n; cin >> n;
ll wa = n/15;
out(800*n - 200 * wa);
} | a.cc:53:2: error: stray '#' in program
53 | }#include <bits/stdc++.h>
| ^
a.cc:105:2: error: stray '#' in program
105 | }#include <bits/stdc++.h>
| ^
a.cc:53:3: error: 'include' does not name a type
53 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:83:4: error: redefinition of 'll MOD'
83 | ll MOD = 1000000007;
| ^~~
a.cc:31:4: note: 'll MOD' previously defined here
31 | ll MOD = 1000000007;
| ^~~
a.cc:84:17: error: redefinition of 'const long long int L_INF'
84 | const long long L_INF = 1LL << 60;
| ^~~~~
a.cc:32:17: note: 'const long long int L_INF' previously defined here
32 | const long long L_INF = 1LL << 60;
| ^~~~~
a.cc:85:11: error: redefinition of 'const long long int INF'
85 | const int INF = 2147483647; // 2^31-1
| ^~~
a.cc:33:11: note: 'const long long int INF' previously defined here
33 | const int INF = 2147483647; // 2^31-1
| ^~~
a.cc:86:14: error: redefinition of 'const double PI'
86 | const double PI = acos(-1);
| ^~
a.cc:34:14: note: 'const double PI' previously defined here
34 | const double PI = acos(-1);
| ^~
a.cc:89:31: error: redefinition of 'template<class T> bool chmin(T&, T)'
89 | template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
| ^~~~~
a.cc:37:31: note: 'template<class T> bool chmin(T&, T)' previously declared here
37 | template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
| ^~~~~
a.cc:90:31: error: redefinition of 'template<class T> bool chmax(T&, T)'
90 | template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
| ^~~~~
a.cc:38:31: note: 'template<class T> bool chmax(T&, T)' previously declared here
38 | template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
| ^~~~~
a.cc:91:24: error: redefinition of 'template<class T> void debug(T)'
91 | template<class T> void debug(T v){rep(i,v.size()) cout<<v[i]<<" ";cout<<endl;}
| ^~~~~
a.cc:39:24: note: 'template<class T> void debug(T)' previously declared here
39 | template<class T> void debug(T v){rep(i,v.size()) cout<<v[i]<<" ";cout<<endl;}
| ^~~~~
a.cc:92:10: error: redefinition of 'const ll dx [8]'
92 | const ll dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
| ^~
a.cc:40:10: note: 'const ll dx [8]' previously defined here
40 | const ll dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
| ^~
a.cc:93:10: error: redefinition of 'const ll dy [8]'
93 | const ll dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
| ^~
a.cc:41:10: note: 'const ll dy [8]' previously defined here
41 | const ll dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
| ^~
a.cc:99:8: error: redefinition of 'int main()'
99 | signed main()
| ^~~~
a.cc:47:8: note: 'int main()' previously defined here
47 | signed main()
| ^~~~
a.cc:105:3: error: 'include' does not name a type
105 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:135:4: error: redefinition of 'll MOD'
135 | ll MOD = 1000000007;
| ^~~
a.cc:31:4: note: 'll MOD' previously defined here
31 | ll MOD = 1000000007;
| ^~~
a.cc:136:17: error: redefinition of 'const long long int L_INF'
136 | const long long L_INF = 1LL << 60;
| ^~~~~
a.cc:32:17: note: 'const long long int L_INF' previously defined here
32 | const long long L_INF = 1LL << 60;
| ^~~~~
a.cc:137:11: error: redefinition of 'const long long int INF'
137 | const int INF = 2147483647; // 2^31-1
| ^~~
a.cc:33:11: note: 'const long long int INF' previously defined here
33 | const int INF = 2147483647; // 2^31-1
| ^~~
a.cc:138:14: error: redefinition of 'const double PI'
138 | const double PI = acos(-1);
| ^~
a.cc:34:14: note: 'const double PI' previously defined here
34 | const double PI = acos(-1);
| ^~
a.cc:141:31: error: redefinition of 'template<class T> bool chmin(T&, T)'
141 | template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
| ^~~~~
a.cc:37:31: note: 'template<class T> bool chmin(T&, T)' previously declared here
37 | template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
| ^~~~~
a.cc:142:31: error: redefinition of 'template<class T> bool chmax(T&, T)'
142 | template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
| ^~~~~
a.cc:38:31: note: 'template<class T> bool chmax(T&, T)' previously declared here
38 | template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
| ^~~~~
a.cc:143:24: error: redefinition of 'template<class T> void debug(T)'
143 | template<class T> void debug(T v){rep(i,v.size()) cout<<v[i]<<" ";cout<<endl;}
| ^~~~~
a.cc:39:24: note: 'template<class T> void debug(T)' previously declared here
39 | template<class T> void debug(T v){rep(i,v.size()) cout<<v[i]<<" ";cout<<endl;}
| ^~~~~
a.cc:144:10: error: redefinition of 'const ll dx [8]'
144 | const ll dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
| ^~
a.cc:40:10: note: 'const ll dx [8]' previously defined here
40 | const ll dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
| ^~
a.cc:145:10: error: redefinition of 'const ll dy [8]'
145 | const ll dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
| ^~
a.cc:41:10: note: 'const ll dy [8]' previously defined here
41 | const ll dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
| ^~
a.cc:151:8: error: redefinition of 'int main()'
151 | signed main()
| ^~~~
a.cc:47:8: note: 'int main()' previously defined here
47 | signed main()
| ^~~~
|
s559125180 | p03795 | C++ | include<iostream>
using namespace std;
int main()
{
int n;cin>>n;
cout<<800*n - (n/15)*200<<endl;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
6 | int n;cin>>n;
| ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
7 | cout<<800*n - (n/15)*200<<endl;
| ^~~~
a.cc:7:29: error: 'endl' was not declared in this scope
7 | cout<<800*n - (n/15)*200<<endl;
| ^~~~
|
s520089746 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin << n;
int ans;
ans = 800*n - n/15*200;
cout << ans;
} | a.cc: In function 'int main()':
a.cc:6:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin << n;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:7: note: candidate: 'operator<<(int, int)' (built-in)
6 | cin << n;
| ~~~~^~~~
a.cc:6:7: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:6:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
6 | cin << n;
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << n;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << n;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << n;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << n;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:6:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin << n;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 |
s554803833 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (int i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define pb push_back
using ll = long long;
using vin=vector<int>;
using vll=vector<ll>;
using vst=vector<string>;
using P = pair<int, int>;
const int inf=1e9+7;
const ll INF=1e18;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); }
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };
int main(){cout<<fixed<<setprecision(10);
int n;
cin>>n;
int x=n*800;
int y=n/15*200;
cout<<x-y<endl;
} | a.cc: In function 'int main()':
a.cc:28:21: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
28 | cout<<x-y<endl;
| ~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: couldn't deduce template parameter '_Bi_iter'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: couldn't deduce template parameter '_Bi_iter'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
28 | cout<<x-y<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
28 | cout<<x-y<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
28 | cout<<x-y<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: couldn't deduce template parameter '_CharT'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:28:22: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
28 | cout<<x-y<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_Ch |
s434196923 | p03795 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x;
cin >> x;
cout << x*800-x/15*200
} | a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before '}' token
6 | cout << x*800-x/15*200
| ^
| ;
7 | }
| ~
|
s888264506 | p03795 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x;
cin x;
cout << x*800-x/15*200
} | a.cc: In function 'int main()':
a.cc:5:6: error: expected ';' before 'x'
5 | cin x;
| ^~
| ;
a.cc:6:25: error: expected ';' before '}' token
6 | cout << x*800-x/15*200
| ^
| ;
7 | }
| ~
|
s685625621 | p03795 | C++ | # # Make IO faster
# import sys
# input = sys.stdin.readline
# # get single (or) multiple str
# X = input()
# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]
# from IPython import embed; embed(); exit();
# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
N = INT()
print(N * 800 - 200 * (N // 15))
| a.cc:1:3: error: invalid preprocessing directive ##
1 | # # Make IO faster
| ^
a.cc:2:3: warning: #import is a deprecated GCC extension [-Wdeprecated]
2 | # import sys
| ^~~~~~
a.cc:2:10: error: #import expects "FILENAME" or <FILENAME>
2 | # import sys
| ^~~
a.cc:3:3: error: invalid preprocessing directive #input
3 | # input = sys.stdin.readline
| ^~~~~
a.cc:5:3: error: invalid preprocessing directive ##
5 | # # get single (or) multiple str
| ^
a.cc:6:3: error: invalid preprocessing directive #X
6 | # X = input()
| ^
a.cc:8:3: error: invalid preprocessing directive ##
8 | # # get single int
| ^
a.cc:9:3: error: invalid preprocessing directive #N
9 | # N = int(input())
| ^
a.cc:10:3: error: invalid preprocessing directive ##
10 | # # get multiple int (e.g., 2)
| ^
a.cc:11:3: error: invalid preprocessing directive #X
11 | # X, Y = map(int, input().split())
| ^
a.cc:12:3: error: invalid preprocessing directive ##
12 | # # get multiple int (e.g., 2) for N lines
| ^
a.cc:13:3: error: invalid preprocessing directive #XY
13 | # XY = [list(map(int, input().split())) for _ in range(N)]
| ^~
a.cc:15:3: error: invalid preprocessing directive #from
15 | # from IPython import embed; embed(); exit();
| ^~~~
a.cc:17:3: error: invalid preprocessing directive #\U00005168\U000090e8\U00005165\U0000308a
17 | # 全部入り
| ^~~~~~~~
a.cc:36:13: warning: multi-character character constant [-Wmultichar]
36 | INF = float('inf')
| ^~~~~
a.cc:18:1: error: 'import' does not name a type
18 | import sys, re
| ^~~~~~
a.cc:18:1: note: C++20 'import' only available with '-fmodules-ts'
|
s952266443 | p03795 | C | #include<stdio.h>
int main(void){
int N = 0;
int x = 0,y = 0;
scanf("%d",&N);
x = N * 800;
y = 200*"N / 15";
printf("%d",x-y);
return 0;
}
| main.c: In function 'main':
main.c:7:12: error: invalid operands to binary * (have 'int' and 'char *')
7 | y = 200*"N / 15";
| ^
| |
| char *
|
s732440865 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, bayar;
int main () {
cin >> n;
bayar=800*n-200*(n/15)
cout << bayar << endl;
} | a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before 'cout'
8 | bayar=800*n-200*(n/15)
| ^
| ;
9 | cout << bayar << endl;
| ~~~~
|
s293930133 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int x, y, n, bayar;
int main () {
cin >> n;
x=800;
y=200;
bayar=(x*n)-y
cout << bayar << endl;
} | a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'cout'
10 | bayar=(x*n)-y
| ^
| ;
11 | cout << bayar << endl;
| ~~~~
|
s527285763 | p03795 | Java |
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x = 800 * n;
int y = (n - (n % 15)) / 15;
System.out.printlnn(x - y);
}
} | Main.java:11: error: cannot find symbol
System.out.printlnn(x - y);
^
symbol: method printlnn(int)
location: variable out of type PrintStream
1 error
|
s288317789 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A;
cin >> A;
B = A / 15;
cout << 800 * A - 200 * B << endl;
}
| a.cc: In function 'int main()':
a.cc:7:2: error: 'B' was not declared in this scope
7 | B = A / 15;
| ^
|
s728297983 | p03795 | C++ | #d
efine LOCAL
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define rrep(i, n) for(int i=(n-1); i>=0; --i)
#define rep2(i, s, n) for(int i=s; i<(n); ++i)
#define ALL(v) (v).begin(), (v).end()
#define memr(dp, val) memset(dp, val, sizeof(dp))
using namespace std;
typedef long long ll;
static const int INTINF = (INT_MAX >> 1); // 10^9 + 10^7
static const ll LLINF = (LLONG_MAX >> 1);
static const int MAX = 1e5+1;
static const ll MOD = 1e9+7;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T> inline bool int_ceil(T a, T b) { T res = a / b; if(a % b != 0) res++; return res; }
template<typename T>
using min_priority_queue = priority_queue<T, vector<T>, greater<T> >;
string to_string(string s) { return '"' + s + '"'; }
string to_string(bool b) { return b ? "true" : "false"; }
template <size_t N> string to_string(bitset<N> bs) {
string res;
for (size_t i = 0; i < N; ++i) res += '0' + bs[i];
return res;
}
string to_string(vector<bool> v) {
string res = "{";
for (bool e : v) res += to_string(e) + ", ";
return res += "}";
}
template <class T, class U> string to_string(pair<T, U> p);
template <class C> string to_string(C c) {
string res = "{";
for (auto e : c) res += to_string(e) + ", ";
return res += "}";
}
template <class T, class U> string to_string(pair<T, U> p) {
return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
void debug() { cerr << '\n'; }
template <class Head, class... Tail> void debug(Head head, Tail... tail) {
cerr << '\t' << to_string(head), debug(tail...);
}
#ifdef LOCAL
#define print(...) cerr << "[" << #__VA_ARGS__ << "]:", debug(__VA_ARGS__)
#else
#define print(...)
#endif
int main(int argc, const char * argv[]) {
std::cout << std::fixed << std::setprecision(15);
int n; cin >> n;
int ynum = n / 15;
cout << n * 800 - ynum * 200 << endl;
return 0;
}
| a.cc:1:2: error: invalid preprocessing directive #d
1 | #d
| ^
a.cc:2:1: error: 'efine' does not name a type
2 | efine LOCAL
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:3:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/cstddef:50,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_tempbuf.h:59,
from /usr/include/c++/14/bits/stl_algo.h:69,
from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__ |
s676943564 | p03795 | C++ | /**
* auther: moririn_cocoa
*/
// #pragma GCC target("avx") // CPU 処理並列化
// #pragma GCC optimize("O3") // CPU 処理並列化
// #pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす
// #define BEGIN_STACK_EXTEND(size) void * stack_extend_memory_ = malloc(size);void * stack_extend_origin_memory_;char * stack_extend_dummy_memory_ = (char*)alloca((1+(int)(((long long)stack_extend_memory_)&127))*16);*stack_extend_dummy_memory_ = 0;asm volatile("mov %%rsp, %%rbx\nmov %%rax, %%rsp":"=b"(stack_extend_origin_memory_):"a"((char*)stack_extend_memory_+(size)-1024));
// #define END_STACK_EXTEND asm volatile("mov %%rax, %%rsp"::"a"(stack_extend_origin_memory_));free(stack_extend_memory_)
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define fi first
#define se second
int main(int argc, char* argv[]) {
int N;
cin >> N;
if ( N < 15 ) {
cout << N * 800 << endl;
}
else if ( 15 <= N && N < 30 ) {
cout << N * 800 - 200 << endl;
}
else if ( 30 <= N && N < 45 ) {
cout << N * 800 - 400 << endl;
}
else if ( 45 <= N && N < 60 ) {
cout << N * 800 - 600 << endl;
}
else if ( 60 <= N && N < 75 ) {
cout << N * 800 - 800 << endl;
}
else if ( 75 <= N && N < 90 ) {
cout << N * 800 - 1000 << endl;
}
else {
cout << N * 800 - 1200 << endl;
return 0;
}
| a.cc: In function 'int main(int, char**)':
a.cc:84:2: error: expected '}' at end of input
84 | }
| ^
a.cc:43:34: note: to match this '{'
43 | int main(int argc, char* argv[]) {
| ^
|
s115669913 | p03795 | C++ | /**
* auther: moririn_cocoa
*/
// #pragma GCC target("avx") // CPU 処理並列化
// #pragma GCC optimize("O3") // CPU 処理並列化
// #pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす
// #define BEGIN_STACK_EXTEND(size) void * stack_extend_memory_ = malloc(size);void * stack_extend_origin_memory_;char * stack_extend_dummy_memory_ = (char*)alloca((1+(int)(((long long)stack_extend_memory_)&127))*16);*stack_extend_dummy_memory_ = 0;asm volatile("mov %%rsp, %%rbx\nmov %%rax, %%rsp":"=b"(stack_extend_origin_memory_):"a"((char*)stack_extend_memory_+(size)-1024));
// #define END_STACK_EXTEND asm volatile("mov %%rax, %%rsp"::"a"(stack_extend_origin_memory_));free(stack_extend_memory_)
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define fi first
#define se second
int main(void) {
int N;
cin >> N;
if ( N < 15 ) {
cout << N * 800 << endl;
}
else if ( 15 <= N < 30 ) {
cout << N * 800 - 200 << endl;
}
else if ( 30 <= N < 45 ) {
cout << N * 800 - 400 << endl;
}
else if ( 45 <= N < 60 ) {
cout << N * 800 - 600 << endl;
}
else if ( 60 <= N < 75 ) {
cout << N * 800 - 800 << endl;
}
else if ( 75 <= N < 90 ) {
cout << N * 800 - 1000 << endl;
}
else {
cout << N * 800 - 1200 << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:84:2: error: expected '}' at end of input
84 | }
| ^
a.cc:43:16: note: to match this '{'
43 | int main(void) {
| ^
|
s539034148 | p03795 | C++ | /**
* auther: moririn_cocoa
*/
// #pragma GCC target("avx") // CPU 処理並列化
// #pragma GCC optimize("O3") // CPU 処理並列化
// #pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす
// #define BEGIN_STACK_EXTEND(size) void * stack_extend_memory_ = malloc(size);void * stack_extend_origin_memory_;char * stack_extend_dummy_memory_ = (char*)alloca((1+(int)(((long long)stack_extend_memory_)&127))*16);*stack_extend_dummy_memory_ = 0;asm volatile("mov %%rsp, %%rbx\nmov %%rax, %%rsp":"=b"(stack_extend_origin_memory_):"a"((char*)stack_extend_memory_+(size)-1024));
// #define END_STACK_EXTEND asm volatile("mov %%rax, %%rsp"::"a"(stack_extend_origin_memory_));free(stack_extend_memory_)
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define fi first
#define se second
int main(int argc, char* argv[]) {
int N;
cin >> N;
if ( N < 15 ) {
cout << N * 800 << endl;
}
else if ( 15 <= N < 30 ) {
cout << N * 800 - 200 << endl;
}
else if ( 30 <= N < 45 ) {
cout << N * 800 - 400 << endl;
}
else if ( 45 <= N < 60 ) {
cout << N * 800 - 600 << endl;
}
else if ( 60 <= N < 75 ) {
cout << N * 800 - 800 << endl;
}
else if ( 75 <= N < 90 ) {
cout << N * 800 - 1000 << endl;
}
else {
cout << N * 800 - 1200 << endl;
return 0;
} | a.cc: In function 'int main(int, char**)':
a.cc:84:2: error: expected '}' at end of input
84 | }
| ^
a.cc:43:34: note: to match this '{'
43 | int main(int argc, char* argv[]) {
| ^
|
s794941288 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin>>N;
int sum =800*N-200(N/15);
cout<<sum<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:21: error: expression cannot be used as a function
7 | int sum =800*N-200(N/15);
| ~~~^~~~~~
|
s722520660 | p03795 | Java | import java.util.Scanner;
public class Main {
public static void main ( String[] args {
Scanner sc = new Scanner ( System.in );
int N = sc.nextInt();
x = 800 * N;
y = 200 * (N / 15);
System.out.println(x-y);
}
} | Main.java:4: error: ',', ')', or '[' expected
public static void main ( String[] args {
^
1 error
|
s956847205 | p03795 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int sc.nextInt(),x=0,y=0;
for(int i=1;i<n;i++){
x+=800;
if(i%15==0){
y+=200;
}
}
System.out.println(x-y);
}
}
| Main.java:7: error: ';' expected
int sc.nextInt(),x=0,y=0;
^
Main.java:7: error: ';' expected
int sc.nextInt(),x=0,y=0;
^
Main.java:7: error: ';' expected
int sc.nextInt(),x=0,y=0;
^
3 errors
|
s926431472 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, x, y;
cin >> N;
x = N*800
y = N/15*200
cout << x-y << endl;
}
| a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'y'
8 | x = N*800
| ^
| ;
9 | y = N/15*200
| ~
|
s659771303 | p03795 | C | #include<stdio.h>
int main(void)
{
int N;
int x=800*N;
int y=N/15;
int z=0;
printf("何食分食べましたか?");
scanf("%d",&N);
if(N<1&&N>100){
printf("1~100で入力しください。");
}
else(y<1){
printf("z=x¥n",z);
}
else(y>=1&&2<y){
printf("z=x-200",z);
}
else(y>=2&&3<y){
printf("z=x-400",z);
}
else(y>=3&&4<y){
printf("z=x-600",z);
}
else(y>=4&&5<y){
printf("z=x-800",z);
}
else(y>=5&&6<y){
printf("z=x-1000",z);
}
else(y>=6&&7<y){
printf("z=x-1200",z);
}
return(0);
}
| main.c: In function 'main':
main.c:14:12: error: expected ';' before '{' token
14 | else(y<1){
| ^
| ;
|
s914307625 | p03795 | C | #include<stdio.h>
int main(){
int N, x, y;
scanf("%d",&N);
x = 800*N;
y = N/15*200;
printf("%d",&(x-y));
return 0;
} | main.c: In function 'main':
main.c:11:17: error: lvalue required as unary '&' operand
11 | printf("%d",&(x-y));
| ^
|
s262417044 | p03795 | C | #include<stdio.h>
int main(){
int N, x, y, A;
scanf("%d",N);
A = 800*N-N/15*200;
printf("%d",A);
return0;
} | main.c: In function 'main':
main.c:11:5: error: 'return0' undeclared (first use in this function)
11 | return0;
| ^~~~~~~
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
|
s059299274 | p03795 | C | include<stdio.h>
int main(){
int N, x, y, A;
scanf("%d",N);
A = 800*N-N/15*200;
printf("%d",A);
return0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s103271309 | p03795 | Java |
package javaapplication127;
import java.util.*;
public class JavaApplication127 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int cost = n*800;
int ref = (n/15)*200;
int y = cost-ref;
System.out.println(y);
}
}
| Main.java:5: error: class JavaApplication127 is public, should be declared in a file named JavaApplication127.java
public class JavaApplication127 {
^
1 error
|
s812178039 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int a=N/15;
cout << N*800-a*200 <, endl;
}
| a.cc: In function 'int main()':
a.cc:10:24: error: expected primary-expression before ',' token
10 | cout << N*800-a*200 <, endl;
| ^
|
s977932610 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i, n) for(int i = 0; i < n; i++)
#define sort(v) sort((v).begin(), (v).end())
using vi = vector<int>;
const int MOD = 1e9+7;
bool IsPrime(int num){
if (num < 2) return false;
else if (num == 2) return true;
else if (num % 2 == 0) return false; // 偶数はあらかじめ除く
double sqrtNum = sqrt(num);
for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) return false; }
return true;
}
int main() {
int N;
cin N;
int x,y;
x = 800*N;
y = 200*(N/15);
cout << x-y << endl;
} | a.cc: In function 'int main()':
a.cc:21:12: error: expected ';' before 'N'
21 | cin N;
| ^~
| ;
|
s833028275 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i, n) for(int i = 0; i < n; i++)
#define sort(v) sort((v).begin(), (v).end())
using vi = vector<int>;
const int MOD = 1e9+7;
bool IsPrime(int num){
if (num < 2) return false;
else if (num == 2) return true;
else if (num % 2 == 0) return false; // 偶数はあらかじめ除く
double sqrtNum = sqrt(num);
for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) return false; }
return true;
}
int main() {
int N;
cin N;
int x,y;
x = 800*N;
y = 200*(N/15)
cout << x-y << endl;
} | a.cc: In function 'int main()':
a.cc:21:12: error: expected ';' before 'N'
21 | cin N;
| ^~
| ;
a.cc:24:23: error: expected ';' before 'cout'
24 | y = 200*(N/15)
| ^
| ;
25 | cout << x-y << endl;
| ~~~~
|
s716198259 | p03795 | Java | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(800 * n - 200 * (n / 15);
}
} | Main.java:7: error: ')' or ',' expected
System.out.println(800 * n - 200 * (n / 15);
^
1 error
|
s719965720 | p03795 | C++ | #include <cstdio>
#include <cstring>
#include <cmath>
#include <utility>
#include <iostream>
#include <functional>
#include <bitset>
#include <algorithm>
#include <vector>
#include <forward_list>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <numeric>
#define ll long long int
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int mx4[] = {0,1,0,-1};
int my4[] = {1,0,-1,0};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int main(){
int n; cin >> n;
int o = n / 15;
int x = 800 * n;
int y = o * 200;
cour << x - y << endl;
}
| a.cc: In function 'int main()':
a.cc:31:5: error: 'cour' was not declared in this scope
31 | cour << x - y << endl;
| ^~~~
|
s990176656 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long int a,b,c,x,y;
long long int result
cin>>a>>b>>c>>x>>y;
cout<<x-y>>endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'cin'
8 | cin>>a>>b>>c>>x>>y;
| ^~~
a.cc:11:14: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
11 | cout<<x-y>>endl;
| ~~~~~~~~~^~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: couldn't deduce template parameter '_IntegerType'
11 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: couldn't deduce template parameter '_Tp'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:11:16: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout<<x- |
s676211533 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int y=200*(N/15);
int x=N*800;
cout<<x-y>>endl;
} | a.cc: In function 'int main()':
a.cc:10:14: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
10 | cout<<x-y>>endl;
| ~~~~~~~~~^~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: couldn't deduce template parameter '_IntegerType'
10 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: couldn't deduce template parameter '_Tp'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:10:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Get_money<_MoneyT>)'
271 | operator>>(basic_istream<_CharT, _Trait |
s311235401 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
cin>>N;
int y=200*(N/15);
int x=N*800;
cout<<x-y>>endl;
} | a.cc: In function 'int main()':
a.cc:6:10: error: 'N' was not declared in this scope
6 | cin>>N;
| ^
a.cc:9:14: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
9 | cout<<x-y>>endl;
| ~~~~~~~~~^~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: couldn't deduce template parameter '_IntegerType'
9 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: couldn't deduce template parameter '_Tp'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, |
s715715061 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
cin>>N;
int y=200*(N/15);
int x=N*800;
cout<<x-y>>endl;
} | a.cc: In function 'int main()':
a.cc:6:10: error: 'N' was not declared in this scope
6 | cin>>N;
| ^
a.cc:9:14: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
9 | cout<<x-y>>endl;
| ~~~~~~~~~^~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: couldn't deduce template parameter '_IntegerType'
9 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: couldn't deduce template parameter '_Tp'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, |
s156020511 | p03795 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
cin>>N;
int y=200*(N/15);
int x=N*800;
cout<<x-y>>endl;
} | a.cc: In function 'int main()':
a.cc:5:10: error: 'N' was not declared in this scope
5 | cin>>N;
| ^
a.cc:8:14: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
8 | cout<<x-y>>endl;
| ~~~~~~~~~^~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: couldn't deduce template parameter '_IntegerType'
8 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: couldn't deduce template parameter '_Tp'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, |
s828038846 | p03795 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
cin>>N;
int y=200*(N/15);
int x=N*800;
cout<<x-y>>endl;
} | a.cc: In function 'int main()':
a.cc:6:10: error: 'N' was not declared in this scope
6 | cin>>N;
| ^
a.cc:9:14: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
9 | cout<<x-y>>endl;
| ~~~~~~~~~^~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: couldn't deduce template parameter '_IntegerType'
9 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: couldn't deduce template parameter '_Tp'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:9:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<x-y>>endl;
| ^~~~
/usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, |
s974731124 | p03795 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
System.out.println(N*800-N/15*200);
}
} | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s568593879 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >>N;
int x,y;
x = 800*N;
y = (N/15)*200
cout << x-y << endl;
}
| a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before 'cout'
9 | y = (N/15)*200
| ^
| ;
10 | cout << x-y << endl;
| ~~~~
|
s850945609 | p03795 | C++ | #include <bits/stdc++.h>
int main() {
int N;
cin >> N;
int a = N / 15;
cout << 800 * N - 200 * a << endl;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> N;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout << 800 * N - 200 * a << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout << 800 * N - 200 * a << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s728003980 | p03795 | C++ | #include<bits/stdc++.h>
using namespace std
int main()
{
int n;
cin >> n;
cout << n*800 - (n/15)*200;
return 0;
}
| a.cc:3:20: error: expected ';' before 'int'
3 | using namespace std
| ^
| ;
4 |
5 | int main()
| ~~~
|
s548595810 | p03795 | C | #include <iostream>
using namespace std;
int main(){
int n;
cin >> n;
cout<<n*800-(n/15)*200<<endl;
}
#include<stdio.h>
int main(void){
int n;
scanf("%d",&n);
int ans=n*800-(n/15)*200;
printf("%d",ans);
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s896241398 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,
cin >> n;
cout << 800 * n - ( n / 15 ) * 200 << endl;
} | a.cc: In function 'int main()':
a.cc:7:7: error: expected initializer before '>>' token
7 | cin >> n;
| ^~
|
s852847724 | p03795 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner stdIn.new Scanner(System.in);
int n=stdIn.nextInt();
int y=(n/15)*200;
int x=n*800;
System.out.println(x-y);
}
}
| Main.java:4: error: ';' expected
Scanner stdIn.new Scanner(System.in);
^
1 error
|
s442433038 | p03795 | C++ | #include<iostream>
using namespace std;
int main()
{
int n, int s;
cin >> n;
s = n * 800 - n * 200 / 15;
cout << s;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before 'int'
5 | int n, int s;
| ^~~
a.cc:7:3: error: 's' was not declared in this scope
7 | s = n * 800 - n * 200 / 15;
| ^
|
s007519317 | p03795 | C++ | import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]
#本当に貪欲法か? DP法では??
#本当に貪欲法か? DP法では??
#本当に貪欲法か? DP法では??
n=ii()
print(n*800-(n//15)*200) | a.cc:12:13: warning: multi-character character constant [-Wmultichar]
12 | inf = float('inf')
| ^~~~~
a.cc:13:15: warning: multi-character character constant [-Wmultichar]
13 | ninf = -float('inf')
| ^~~~~
a.cc:15:2: error: invalid preprocessing directive #\U00006574\U00006570input
15 | #整数input
| ^~~~~~~~~
a.cc:16:53: error: stray '#' in program
16 | def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
| ^
a.cc:18:33: error: stray '#' in program
18 | def limii(): return list(mii()) #list(map(int,input().split()))
| ^
a.cc:21:2: error: invalid preprocessing directive #\U00006587\U00005b57\U00005217input
21 | #文字列input
| ^~~~~~~~~~~
a.cc:22:48: error: stray '#' in program
22 | def ss(): return sys.stdin.readline().rstrip() #input()
| ^
a.cc:24:33: error: stray '#' in program
24 | def limss(): return list(mss()) #list(input().split())
| ^
a.cc:28:2: error: invalid preprocessing directive #\U0000672c\U00005f53\U0000306b\U00008caa\U00006b32\U00006cd5\U0000304b\U0000ff1f
28 | #本当に貪欲法か? DP法では??
| ^~~~~~~~~~~~~~~~
a.cc:29:2: error: invalid preprocessing directive #\U0000672c\U00005f53\U0000306b\U00008caa\U00006b32\U00006cd5\U0000304b\U0000ff1f
29 | #本当に貪欲法か? DP法では??
| ^~~~~~~~~~~~~~~~
a.cc:30:2: error: invalid preprocessing directive #\U0000672c\U00005f53\U0000306b\U00008caa\U00006b32\U00006cd5\U0000304b\U0000ff1f
30 | #本当に貪欲法か? DP法では??
| ^~~~~~~~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s369111365 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int ans = n*800 - (n/15)*200;
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:7:13: error: expected initializer before '\U0000ff1d'
7 | int ans = n*800 - (n/15)*200;
| ^~
a.cc:8:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
8 | cout << ans << endl;
| ^~~
| abs
|
s762377175 | p03795 | C++ | #include<iostream>
#include<math>
using namespace std;
int main()
{
int a;
cin >> a ;
cout << ((800*a)-((a*200)/15)) << endl ;
return 0;
} | a.cc:2:9: fatal error: math: No such file or directory
2 | #include<math>
| ^~~~~~
compilation terminated.
|
s731398590 | p03795 | C++ | #include<bits\stdc++.h>
#include<iostream>
using namespace std;
#define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++)
#define rf(i,a,b) for(int i=(int)(b);i>=(int)(a);i--)
#define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++)
#define llrf(i,a,b) for(long long int i=(long long int)(b);i>=(long long int)(a);i--)
#define ll long long
#define fi first
#define se second
#define pb push_back
#define pop pop_back
#define mem(ara) memset((ara),0,sizeof(ara))
#define memn(ara) memset((ara),-1,sizeof(ara))
#define b begin()
#define e end()
#define em emplace
#define eb emplace_back
#define si set<int>
#define sd set<double>
#define sll set<long long int>
#define ss set<string>
#define sc set<char>
#define pii pair<int,int>
#define pli pair<long long int,int>
#define pil pair<int,long long int>
#define pll pair<long long int,long long int>
#define pci pair<char,int>
#define pic pair<int,char>
#define pcl pair<char,long long int>
#define plc pair<long long int,char>
#define pss pair<string,string>
#define pcc pair<char,char>
#define pis pair<int,string>
#define psi pair<string,int>
#define pls pair<long long int,string>
#define psl pair<string,long long int>
#define pdd pair<double,double>
#define pcs pair<char,string>
#define psc pair<string,char>
#define vi vector<int>
#define vll vector<long long int>
#define vd vector<double>
#define vs vector<string>
#define vc vector<char>
#define vii vector<pii>
#define mod 1000000007
#define mx (1<<30)-1
#define llmx (1ll<<62)
#define n_size 100005
#define g_size 10000005
double PI=acos(-1);
///unsigned int uMAX=4294967295;
///unsigned ll int ullMAX=18446744073709551615;
int arr[g_size];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n,m,T,res;
int maxi=mx,mini=-mx,count=0;
int i,j,k;
string s1,s2;
char s[100000];
int ara1[n_size],ara2[n_size];
cin>>n;
cout<<(n*800)-(n/15)*200<<endl;
}
| a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s516229840 | p03795 | C++ | //#include<bits\stdc++.h>
#include<iostream>
using namespace std;
#define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++)
#define rf(i,a,b) for(int i=(int)(b);i>=(int)(a);i--)
#define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++)
#define llrf(i,a,b) for(long long int i=(long long int)(b);i>=(long long int)(a);i--)
#define ll long long
#define fi first
#define se second
#define pb push_back
#define pop pop_back
#define mem(ara) memset((ara),0,sizeof(ara))
#define memn(ara) memset((ara),-1,sizeof(ara))
#define b begin()
#define e end()
#define em emplace
#define eb emplace_back
#define si set<int>
#define sd set<double>
#define sll set<long long int>
#define ss set<string>
#define sc set<char>
#define pii pair<int,int>
#define pli pair<long long int,int>
#define pil pair<int,long long int>
#define pll pair<long long int,long long int>
#define pci pair<char,int>
#define pic pair<int,char>
#define pcl pair<char,long long int>
#define plc pair<long long int,char>
#define pss pair<string,string>
#define pcc pair<char,char>
#define pis pair<int,string>
#define psi pair<string,int>
#define pls pair<long long int,string>
#define psl pair<string,long long int>
#define pdd pair<double,double>
#define pcs pair<char,string>
#define psc pair<string,char>
#define vi vector<int>
#define vll vector<long long int>
#define vd vector<double>
#define vs vector<string>
#define vc vector<char>
#define vii vector<pii>
#define mod 1000000007
#define mx (1<<30)-1
#define llmx (1ll<<62)
#define n_size 100005
#define g_size 10000005
double PI=acos(-1);
///unsigned int uMAX=4294967295;
///unsigned ll int ullMAX=18446744073709551615;
int arr[g_size];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n,m,T,res;
int maxi=mx,mini=-mx,count=0;
int i,j,k;
string s1,s2;
char s[100000];
int ara1[n_size],ara2[n_size];
cin>>n;
cout<<(n*800)-(n/15)*200<<endl;
}
| a.cc:72:11: error: 'acos' was not declared in this scope
72 | double PI=acos(-1);
| ^~~~
|
s018986145 | p03795 | C++ | #include<bits\stdc++.h>
using namespace std;
#define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++)
#define rf(i,a,b) for(int i=(int)(b);i>=(int)(a);i--)
#define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++)
#define llrf(i,a,b) for(long long int i=(long long int)(b);i>=(long long int)(a);i--)
#define ll long long
#define fi first
#define se second
#define pb push_back
#define pop pop_back
#define mem(ara) memset((ara),0,sizeof(ara))
#define memn(ara) memset((ara),-1,sizeof(ara))
#define b begin()
#define e end()
#define em emplace
#define eb emplace_back
#define si set<int>
#define sd set<double>
#define sll set<long long int>
#define ss set<string>
#define sc set<char>
#define pii pair<int,int>
#define pli pair<long long int,int>
#define pil pair<int,long long int>
#define pll pair<long long int,long long int>
#define pci pair<char,int>
#define pic pair<int,char>
#define pcl pair<char,long long int>
#define plc pair<long long int,char>
#define pss pair<string,string>
#define pcc pair<char,char>
#define pis pair<int,string>
#define psi pair<string,int>
#define pls pair<long long int,string>
#define psl pair<string,long long int>
#define pdd pair<double,double>
#define pcs pair<char,string>
#define psc pair<string,char>
#define vi vector<int>
#define vll vector<long long int>
#define vd vector<double>
#define vs vector<string>
#define vc vector<char>
#define vii vector<pii>
#define mod 1000000007
#define mx (1<<30)-1
#define llmx (1ll<<62)
#define n_size 100005
#define g_size 10000005
double PI=acos(-1);
///unsigned int uMAX=4294967295;
///unsigned ll int ullMAX=18446744073709551615;
int arr[g_size];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n,m,T,res;
int maxi=mx,mini=-mx,count=0;
int i,j,k;
string s1,s2;
char s[100000];
int ara1[n_size],ara2[n_size];
cin>>n;
cout<<(n*800)-(n/15)*200<<endl;
}
| a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s690827003 | p03795 | C++ | n = int(input())
print(800*n - 200*(n//15)) | a.cc:1:1: error: 'n' does not name a type
1 | n = int(input())
| ^
|
s105993956 | p03795 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int y = 200 * (N / 15);
int x = 800 * N ;
int receivedPrice = x - y;
System.out.println(receivedPrice);
}
}
| Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s074038329 | p03795 | Java | public class Restaurant {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int y = 200 * (N / 15);
int x = 800 * N ;
int receivedPrice = x - y;
System.out.println(receivedPrice);
}
}
| Main.java:1: error: class Restaurant is public, should be declared in a file named Restaurant.java
public class Restaurant {
^
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Restaurant
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Restaurant
3 errors
|
s099079045 | p03795 | C++ | #include <bits/stdc++.h>
#define FOR(i, a, n) for(int (i) = (int)(a); (i) < (int)(n); ++(i))
#define FORe(i, a, n) for(int (i) = (int)(a); (i) <= (int)(n); ++(i))
#define rFOR(i, a, n) for(int (i) = (int)(n)-1; (i) >= (int)(a); --(i))
#define REP(i, n) FOR((i), 0, (n))
#define REPe(i, n) FORe((i), 0, (n))
#define rREP(i, n) rFOR((i), 0, (n))
#define all(v) (v).begin(), (v).end()
using namespace std;
using ll = long long;
using P = pair<int,int>;
int main() {
int n;
cin >> n;
int x = 800*n;
int y += n/15*200;
cout << x-y << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:17:9: error: expected initializer before '+=' token
17 | int y += n/15*200;
| ^~
a.cc:18:13: error: 'y' was not declared in this scope
18 | cout << x-y << endl;
| ^
|
s198222456 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int N;
cin >> N;
int x=N*800
cin >> x;
int y=N/15*20
cin >> y;
cout << x-y << endl;
| a.cc:5:3: error: 'cin' does not name a type
5 | cin >> N;
| ^~~
a.cc:7:3: error: expected ',' or ';' before 'cin'
7 | cin >> x;
| ^~~
a.cc:9:3: error: expected ',' or ';' before 'cin'
9 | cin >> y;
| ^~~
a.cc:11:3: error: 'cout' does not name a type
11 | cout << x-y << endl;
| ^~~~
|
s183356217 | p03795 | Java | public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = Integer.parseInt(in.nextLine());
int mealPrice = 800;
int discount = 200;
int discountPoint = 15;
int x = n * mealPrice;
int y = (n / discountPoint) * discount;
System.out.println(x - y);
}
| Main.java:12: error: reached end of file while parsing
}
^
1 error
|
s526414138 | p03795 | Java | public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = Integer.parseInt(in.nextLine());
int mealPrice = 800;
int discount = 200;
int discountPoint = 15;
int x = n * mealPrice;
int y = (n / discountPoint) * discount;
System.out.println(x - y);
} | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s168552482 | p03795 | C++ | #include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<map>
#include<string.h>
#include<complex>
#include<math.h>
#include<queue>
#include <functional>
#include<time.h>
#include <stack>
#include<iomanip>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(n);i++)
#define ll long long
#define llint long long int
#define sort(s) sort(s.begin(),s.end())
#define reverse(v) reverse(v.begin(), v.end());
#define Yes(ans) if(ans)cout<<"Yes"<<endl; else cout<<"No"<<endl;
#define YES(ans) if(ans)cout<<"YES"<<endl; else cout<<"NO"<<endl;
#define hei(a) vector<a>
#define whei(a) vector<vector<a>>
#define UF UnionFind
#define rt0 return 0
#define INF 100000000
constexpr auto mod = 1000000007;
//辞書順はnext_permutation( begin( v ), end( v ) );やで!
//2のn乗を求めるよ!!!
int ni(int n) {
if (n == 0)return 1;
int x = ni(n / 2);
x *= x;
if (n % 2 == 1)x *= 2;
return x;
}
//フィボナッチ数列のx番目を求めるよ!
llint f(int x, vector<llint>& s) {
if (x == 0)return 0;
if (x == 1)return 1;
if (s[x] != 0)return s[x];
return s[x] = f(x - 1, s) + f(x - 2, s);
}
//aとbの最大公約数を求めるよ!
llint gcd(llint a, llint b) {
if (a < b)swap(a, b);
if (b == 0)return a;
return gcd(b, a % b);
}
// a^n mod を計算する
long long modpow(long long a, long long n, long long mod) {
long long res = 1;
while (n > 0) {
if (n & 1) res = res * a % mod;
a = a * a % mod;
n >>= 1;
}
return res;
}
// mod. m での a の逆元 a^{-1} を計算するよ!
long long modinv(long long a, long long m) {
long long b = m, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b; swap(a, b);
u -= t * v; swap(u, v);
}
u %= m;
if (u < 0) u += m;
return u;
}
//aCbをmod.mで割った余りを求める
ll int c(ll int a, ll int b, ll int m) {
ll int ans = 1;
for (ll int i = 0; i < b; i++) {
ans *= a - i;
ans %= m;
}
for (ll int i = 1; i <= b; i++) {
ans *= modinv(i, m);
ans %= m;
}
return ans;
}
//m進数のn桁を全列挙やで
int dfs(int m, int n,vector<int> a,vector<int> s) {
int MIN=100000000;
stack<string> st;
st.push("");
while (!st.empty()) {
string now = st.top();
st.pop();
if (now.size() == n){
int x[3]={0};
int y[3]={0};
for(int i=0;i<n;i++){
if(now[i]-'0'!=3){
x[now[i]-'0']+=s[i];
y[now[i]-'0']++;
}
}
int sum=0;
int ng=0;
for(int i=0;i<3;i++){
if(x[i]==0)ng=1;
sum+=abs(x[i]-a[i]);
if(y[i]>1)sum+=10*(y[i]-1);
}
if(ng==0)MIN=min(MIN,sum);
}
else {
for (int i = m - 1; i >= 0; i--) {
string next = now + to_string(i);
st.push(next);
}
}
}
return MIN;
}
//迷路やで
void bfs(){
int sx,sy;
int gx,gy;
int h,w;
cin>>h>>w;
cin>>sx>>sy>>gx>>gy;
sx--;sy--;gx--;gy--;
whei(char) a(h,vector<char>(w));
whei(int) d(h,vector<int>(w,INF));
rep(i,0,h)rep(j,0,w){
cin>>a[i][j];
}
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
d[sx][sy]=0;
queue<pair<int,int>> que;
que.push(pair<int,int>(sx,sy));
while(que.size()){
pair<int,int>p=que.front();
que.pop();
if(p.first==gx&&p.second==gy)break;
for(int i=0;i<4;i++){
int nx=p.first+dx[i];
int ny=p.second+dy[i];
if(0<=nx&&0<=ny&&nx<h&&ny<w&&a[nx][ny]!='#'&&d[nx][ny]==INF){
que.push(pair<int,int>(nx,ny));
d[nx][ny]=d[p.first][p.second]+1;
}
}
}
cout<<d[gx][gy]<<endl;
}
void press(vector<int>& v) { v.erase(unique((v).begin(), (v).end()), v.end()); }
void press(vector<char>& v) { v.erase(unique((v).begin(), (v).end()), v.end()); }
llint min(llint a, llint b) {
if (a < b)return a;
return b;
}
llint max(llint a, llint b) {
if (a < b)swap(a, b);
return a;
}
llint p(int n) {
if (n == 1)return 1;
return n * p(n - 1);
}
struct UnionFind {
vector<int> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2
UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
for (int i = 0; i < N; i++) par[i] = i;
}
int size(int a) {
return par[root(a)];
}
int root(int x) { // データxが属する木の根を再帰で得る:root(x) = {xの木の根}
if (par[x] == x) return x;
return par[x] = root(par[x]);
}
void unite(int x, int y) { // xとyの木を併合
int rx = root(x); //xの根をrx
int ry = root(y); //yの根をry
if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時:xの根rxをyの根ryにつける
}
bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
int rx = root(x);
int ry = root(y);
return rx == ry;
}
};
int main(){
nt a;
cin>>a;
int ans=(a*800)-(a/15)*200;
cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:212:2: error: 'nt' was not declared in this scope; did you mean 'ni'?
212 | nt a;
| ^~
| ni
a.cc:213:8: error: 'a' was not declared in this scope
213 | cin>>a;
| ^
|
s099410884 | p03795 | C++ | #include <iostream>
using namespace std;
int main(void){
int a;
cin >> a;
int b==a/15
cout << "800*a-200*b" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:10: error: expected initializer before '==' token
11 | int b==a/15
| ^~
|
s690359790 | p03795 | C++ | #include<iostream>
using namespace std;
int main ()
{
int x,z,a,b;
cin>>x;
z=x*800;
if (x>15){
a=x/15;
b=z-(a*200);
cout<<b;
else
cout<<z;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:3: error: expected '}' before 'else'
13 | else
| ^~~~
a.cc:9:12: note: to match this '{'
9 | if (x>15){
| ^
|
s323626164 | p03795 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
System.out.println(800 * n - (n/15 *200));
}
}
| Main.java:10: error: cannot find symbol
n = sc.nextInt();
^
symbol: variable n
location: class Main
Main.java:12: error: cannot find symbol
System.out.println(800 * n - (n/15 *200));
^
symbol: variable n
location: class Main
Main.java:12: error: cannot find symbol
System.out.println(800 * n - (n/15 *200));
^
symbol: variable n
location: class Main
3 errors
|
s331073070 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string A;
cin >> A;
cout << A*800-A%15*200 << endl;
}
}
f | a.cc: In function 'int main()':
a.cc:9:18: error: no match for 'operator*' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
9 | cout << A*800-A%15*200 << endl;
| ~^~~~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<char>}
In file included 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/complex:400:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator*(const complex<_Tp>&, const complex<_Tp>&)'
400 | operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:400:5: note: template argument deduction/substitution failed:
a.cc:9:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>'
9 | cout << A*800-A%15*200 << endl;
| ^~~
/usr/include/c++/14/complex:409:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator*(const complex<_Tp>&, const _Tp&)'
409 | operator*(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:409:5: note: template argument deduction/substitution failed:
a.cc:9:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>'
9 | cout << A*800-A%15*200 << endl;
| ^~~
/usr/include/c++/14/complex:418:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator*(const _Tp&, const complex<_Tp>&)'
418 | operator*(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:418:5: note: template argument deduction/substitution failed:
a.cc:9:19: note: mismatched types 'const std::complex<_Tp>' and 'int'
9 | cout << A*800-A%15*200 << endl;
| ^~~
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:9:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
9 | cout << A*800-A%15*200 << endl;
| ^~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:9:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
9 | cout << A*800-A%15*200 << endl;
| ^~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:9:19: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
9 | cout << A*800-A%15*200 << endl;
| ^~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:9:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
9 | cout << A*800-A%15*200 << endl;
| ^~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:9:19: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
9 | cout << A*800-A%15*200 << endl;
| ^~~
/usr/include/c++/14/valarray:1198:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__multiplies, _Tp>::result_type> std::operator*(const valarray<_Tp>&, const valarray<_Tp>&)'
1198 | _DEFINE_BINARY_OPERATOR(*, __multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1198:1: note: template argument deduction/substitution failed:
a.cc:9:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>'
9 | cout << A*800-A%15*200 << endl;
| ^~~
/usr/include/c++/14/valarray:1198:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__multiplies, _Tp>::result_type> std::operator*(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1198 | _DEFINE_BINARY_OPERATOR(*, __multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1198:1: note: template argument deduction/substitution failed:
a.cc:9:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>'
9 | cout << A*800-A%15*200 << endl;
| ^~~
/usr/include/c++/14/valarray:1198:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__multiplies, _Tp>::result_type> std::operator*(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1198 | _DEFINE_BINARY_OPERATOR(*, __multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1198:1: note: template argument deduction/substitution failed:
a.cc:9:19: note: mismatched types 'const std::valarray<_Tp>' and 'int'
9 | cout << A*800-A%15*200 << endl;
| ^~~
a.cc:9:24: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
9 | cout << A*800-A%15*200 << endl;
| ~^~~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<char>}
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:9:25: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
9 | cout << A*800-A%15*200 << endl;
| ^~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:9:25: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
9 | cout << A*800-A%15*200 << endl;
| |
s710272224 | p03795 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
using namespace std;
inline int read(){
int s=0,w=1,ch=getchar();
while(ch<'0'||ch>'9')if(ch=='-')w=-1,ch=getchar();
while(ch>='0'&&ch<='9')s=s*10+ch-'0',ch=getchar();
return s*w;
}
inline void write(int x)
{
char F[16]={};int cnt=0;
if(x==0)
{
putchar('0');
return;
}
if(x<0)putchar('-');
while(x)
{
F[cnt++]=x%10+'0';
x/=10;
}
while(cnt>0)putchar(F[--cnt]);
}
void freopen_init(){
freopen(".in","r",stdin);freopen(".out","w",stdout);}
int main()
{
//freopen_init();
int reads=read()
write(reads*800-reads/15*200);
putchar('\n');
return 0;
}
| a.cc: In function 'int main()':
a.cc:41:9: error: expected ',' or ';' before 'write'
41 | write(reads*800-reads/15*200);
| ^~~~~
|
s976614519 | p03795 | Java | #include <string>
#include <vector>
#include <stdlib.h>
#include <iostream>
int main(int argc, char** argv) {
int n;
std::cin >> n;
int spent = n * 800;
int tmpn = n;
int discountFactor = 0;
while (tmpn > 15){
tmpn /= 15;
discountFactor++;
}
std::cout << spent - 200*discountFactor << std::endl;
return 0;
}
| Main.java:1: error: illegal character: '#'
#include <string>
^
Main.java:2: error: illegal character: '#'
#include <vector>
^
Main.java:3: error: illegal character: '#'
#include <stdlib.h>
^
Main.java:4: error: illegal character: '#'
#include <iostream>
^
Main.java:8: error: class, interface, enum, or record expected
std::cin >> n;
^
Main.java:9: error: unnamed classes are a preview feature and are disabled by default.
int spent = n * 800;
^
(use --enable-preview to enable unnamed classes)
Main.java:12: error: class, interface, enum, or record expected
while (tmpn > 15){
^
Main.java:14: error: class, interface, enum, or record expected
discountFactor++;
^
Main.java:15: error: class, interface, enum, or record expected
}
^
Main.java:17: error: class, interface, enum, or record expected
return 0;
^
Main.java:18: error: class, interface, enum, or record expected
}
^
11 errors
|
s889641856 | p03795 | Java | #include <stdio.h>
#include <string>
#include <vector>
#include <stdlib.h>
#include <iostream>
int main(int argc, char** argv) {
int n;
std::cin >> n;
int spent = n * 800;
int tmpn = n;
int discountFactor = 0;
while (tmpn > 15){
tmpn /= 15;
discountFactor++;
}
std::cout << spent - 200*discountFactor << std::endl;
return 0;
}
| Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:2: error: illegal character: '#'
#include <string>
^
Main.java:3: error: illegal character: '#'
#include <vector>
^
Main.java:4: error: illegal character: '#'
#include <stdlib.h>
^
Main.java:5: error: illegal character: '#'
#include <iostream>
^
Main.java:9: error: class, interface, enum, or record expected
std::cin >> n;
^
Main.java:10: error: unnamed classes are a preview feature and are disabled by default.
int spent = n * 800;
^
(use --enable-preview to enable unnamed classes)
Main.java:13: error: class, interface, enum, or record expected
while (tmpn > 15){
^
Main.java:15: error: class, interface, enum, or record expected
discountFactor++;
^
Main.java:16: error: class, interface, enum, or record expected
}
^
Main.java:18: error: class, interface, enum, or record expected
return 0;
^
Main.java:19: error: class, interface, enum, or record expected
}
^
13 errors
|
s383867373 | p03795 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
n*=800;
if(n>=15)n-=200;
cout<<n;
retrun 0;
} | a.cc: In function 'int main()':
a.cc:9:4: error: 'retrun' was not declared in this scope
9 | retrun 0;
| ^~~~~~
|
s242667106 | p03795 | C++ | #include<bits/stdc++.h>
sing namespace std;
int n,x,y;
int main()
{
cin>>n;
x=n*800;
y=(n/15)*200;
cout<<x-y<<endl;
return 0;
} | a.cc:2:1: error: 'sing' does not name a type
2 | sing namespace std;
| ^~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>n;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout<<x-y<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout<<x-y<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s881391760 | p03795 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a;
cin << a;
int b = a/15;
cout << a*800-200*b << endl;
} | a.cc: In function 'int main()':
a.cc:5:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
5 | cin << a;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:5:7: note: candidate: 'operator<<(int, int)' (built-in)
5 | cin << a;
| ~~~~^~~~
a.cc:5:7: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:5:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
5 | cin << a;
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin << a;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin << a;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin << a;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
5 | cin << a;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:5:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
5 | cin << a;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 |
s837685780 | p03795 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
ios_bas::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n;
cin >> n;
cout << n * 800 - int(n/15) * 200 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'ios_bas' has not been declared
6 | ios_bas::sync_with_stdio(0); cin.tie(0); cout.tie(0);
| ^~~~~~~
|
s035816021 | p03795 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABC055A
{
class Program
{
static void Main(string[] args)
{
int a,x,y;
x = 0;
a = int.Parse(Console.ReadLine());
x = 800 * a;
y = a / 15 * 200;
Console.WriteLine(x - y);
Console.ReadKey();
}
}
}
| 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:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:11:34: error: 'string' has not been declared
11 | static void Main(string[] args)
| ^~~~~~
a.cc:11:43: error: expected ',' or '...' before 'args'
11 | static void Main(string[] args)
| ^~~~
a.cc:21:10: error: expected ';' after class definition
21 | }
| ^
| ;
a.cc: In static member function 'static void ABC055A::Program::Main(int*)':
a.cc:15:29: error: expected primary-expression before 'int'
15 | a = int.Parse(Console.ReadLine());
| ^~~
a.cc:18:25: error: 'Console' was not declared in this scope
18 | Console.WriteLine(x - y);
| ^~~~~~~
|
s051397470 | p03795 | C++ | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)
#define ll long long
using namespace std;
int y{
if(n < 15){
return 0;
}else if(15 <= n <30){
return 1;
}else if(30 <= n <45){
return 2;
}else if(45 <= n <60){
return 3;
}else if(60 <= n <75){
return 4;
}else if(75 <= n <= 100){
return 5;
}
}
int main(){
int n;
cin >> n;
int x = 800 * n;
int y();
cout << x - y <<endl;
} | a.cc:32:5: error: expected primary-expression before 'if'
32 | if(n < 15){
| ^~
a.cc:32:5: error: expected '}' before 'if'
a.cc:30:6: note: to match this '{'
30 | int y{
| ^
a.cc:34:6: error: expected unqualified-id before 'else'
34 | }else if(15 <= n <30){
| ^~~~
a.cc:36:6: error: expected unqualified-id before 'else'
36 | }else if(30 <= n <45){
| ^~~~
a.cc:38:6: error: expected unqualified-id before 'else'
38 | }else if(45 <= n <60){
| ^~~~
a.cc:40:6: error: expected unqualified-id before 'else'
40 | }else if(60 <= n <75){
| ^~~~
a.cc:42:6: error: expected unqualified-id before 'else'
42 | }else if(75 <= n <= 100){
| ^~~~
a.cc:45:1: error: expected declaration before '}' token
45 | }
| ^
a.cc: In function 'int main()':
a.cc:54:10: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
54 | int y();
| ^~
a.cc:54:10: note: remove parentheses to default-initialize a variable
54 | int y();
| ^~
| --
a.cc:54:10: note: or replace parentheses with braces to value-initialize a variable
a.cc: At global scope:
a.cc:54:11: error: 'int y()' redeclared as different kind of entity
54 | int y();
| ^
a.cc:30:5: note: previous declaration 'int y'
30 | int y{
| ^
a.cc: In function 'int main()':
a.cc:56:15: error: invalid operands of types 'int' and 'int()' to binary 'operator-'
56 | cout << x - y <<endl;
| ~ ^ ~
| | |
| int int()
|
s611073793 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
/**** Type Define ****/
typedef long long ll;
int main(){
int N;
cin>>N;
cout<<N*800-(N/15)*200>>endl;
} | a.cc: In function 'int main()':
a.cc:9:24: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
9 | cout<<N*800-(N/15)*200>>endl;
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: couldn't deduce template parameter '_IntegerType'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: couldn't deduce template parameter '_Tp'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout<<N*800-(N/15)*200>>endl;
| ^~~~
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:9:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
|
s790152792 | p03795 | C++ | #include <iostream>
#include <string>
int main() {
int a,b,c;
std::cin>>a;
cout << (a*800)-(a/15)*200;
} | a.cc: In function 'int main()':
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout << (a*800)-(a/15)*200;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s706381048 | p03795 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t,n,d=0,n1,i=0;
cin>>n;
d=n/15;
sum=(n*800)-(d*200);
cout<<sum;
} | a.cc: In function 'int main()':
a.cc:11:5: error: 'sum' was not declared in this scope
11 | sum=(n*800)-(d*200);
| ^~~
|
s258750722 | p03795 | C | #include <stdio.h>
#include <stdlib.h>
int main()
{
int n,x,y,k;
scanf("%d",&n);
x=n/800;
y=x/15;
k=800*n-y*200;
printf("%d',k);
return 0;
}
| main.c: In function 'main':
main.c:10:8: warning: missing terminating " character
10 | printf("%d',k);
| ^
main.c:10:8: error: missing terminating " character
10 | printf("%d',k);
| ^~~~~~~~
main.c:11:1: error: expected expression before 'return'
11 | return 0;
| ^~~~~~
main.c:11:10: error: expected ';' before '}' token
11 | return 0;
| ^
| ;
12 | }
| ~
|
s689268782 | p03795 | C++ | include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << (n * 800-(n/15)*200) << endl;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin >> n;
| ^~~
a.cc:7:5: error: 'cout' was not declared in this scope
7 | cout << (n * 800-(n/15)*200) << endl;
| ^~~~
a.cc:7:37: error: 'endl' was not declared in this scope
7 | cout << (n * 800-(n/15)*200) << endl;
| ^~~~
|
s203207555 | p03795 | C++ | #include<iostream>
using namespace std;
int main(){
int n,cin>>n;
cout<<n*800-(n/15)*200<<endl;
} | a.cc: In function 'int main()':
a.cc:4:18: error: expected initializer before '>>' token
4 | int n,cin>>n;
| ^~
|
s131353457 | p03795 | C++ | #include<bits/stdc++.h>
using namesace std;
int main(){
int n;cin>>n;cout<<(n*800-n/15*200)<<endl;
} | a.cc:2:7: error: expected nested-name-specifier before 'namesace'
2 | using namesace std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | int n;cin>>n;cout<<(n*800-n/15*200)<<endl;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:4:16: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
4 | int n;cin>>n;cout<<(n*800-n/15*200)<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:4:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
4 | int n;cin>>n;cout<<(n*800-n/15*200)<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s173324568 | p03795 | C | #include<stdio.h>
int main (void) {
int eatCount;
int count = 15;
int yen = 800;
int reyen = 200;
do {
printf(eatCount:); scanf("%d", &eatCount);
} while (eatCount < 1 && eatCount > 100);
printf("%d", (eatCount * yen) - (eatCount / count * reyen) );
return 0;
} | main.c: In function 'main':
main.c:10:18: error: expected ')' before ':' token
10 | printf(eatCount:); scanf("%d", &eatCount);
| ~ ^
| )
main.c:10:10: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
10 | printf(eatCount:); scanf("%d", &eatCount);
| ^~~~~~~~
| |
| int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
s504105049 | p03795 | C | #inclede<stdio.h>
int main (void) {
int eatCount;
int count = 15;
int yen = 800;
int reyen = 200;
do {
printf(eatCount:); scanf("%d", &eatCount);
} while (eatCount < 1 && eatCount > 100);
printf("%d", (eatCount * yen) - (eatCount / count * reyen) );
return 0;
} | main.c:1:2: error: invalid preprocessing directive #inclede; did you mean #include?
1 | #inclede<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:10:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
10 | printf(eatCount:); scanf("%d", &eatCount);
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | #inclede<stdio.h>
main.c:10:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
10 | printf(eatCount:); scanf("%d", &eatCount);
| ^~~~~~
main.c:10:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:18: error: expected ')' before ':' token
10 | printf(eatCount:); scanf("%d", &eatCount);
| ~ ^
| )
main.c:10:10: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
10 | printf(eatCount:); scanf("%d", &eatCount);
| ^~~~~~~~
| |
| int
main.c:10:10: note: expected 'const char *' but argument is of type 'int'
main.c:10:22: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
10 | printf(eatCount:); scanf("%d", &eatCount);
| ^~~~~
main.c:10:22: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:22: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:10:22: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:12:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
12 | printf("%d", (eatCount * yen) - (eatCount / count * reyen) );
| ^~~~~~
main.c:12:3: 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.