submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s884229699 | p03852 | C++ | c = raw_input()
if c in "aeiou":
print "vowel"
else:
print "consonant"
| a.cc:1:1: error: 'c' does not name a type
1 | c = raw_input()
| ^
|
s839142625 | p03852 | C++ | #include <cstdio>
int main()
{
char c;
scanf("%c", c);
std::string s("aeiou");
printf("%s\n", s.find(c) ? "vowel" : "consonant");
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:8: error: 'string' is not a member of 'std'
7 | std::string s("aeiou");
| ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
1 | #include <cstdio>
+++ |+#include <string>
2 |
a.cc:8:18: error: 's' was not declared in this scope
8 | printf("%s\n", s.find(c) ? "vowel" : "consonant");
| ^
|
s985409389 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0; i<n; i++)
#define out(x) cout<<(x)<<"\n"
int main(){
char c;
cin>>c;
if(c=="a" || c=="i" || c=="e" || c=="o" || c=="u"){
out("vowel");
}
else{
out("consonant");
}
} | a.cc: In function 'int main()':
a.cc:9:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(c=="a" || c=="i" || c=="e" || c=="o" || c=="u"){
| ~^~~~~
a.cc:9:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(c=="a" || c=="i" || c=="e" || c=="o" || c=="u"){
| ~^~~~~
a.cc:9:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(c=="a" || c=="i" || c=="e" || c=="o" || c=="u"){
| ~^~~~~
a.cc:9:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(c=="a" || c=="i" || c=="e" || c=="o" || c=="u"){
| ~^~~~~
a.cc:9:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(c=="a" || c=="i" || c=="e" || c=="o" || c=="u"){
| ~^~~~~
|
s488655339 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0; i<n; i++)
#define out(x) cout<<(x)<<"\n"
int main(){
cin>>c;
if(c=="a" || c=="i" || c=="e" || c=="o" || c=="u"){
out("vowel");
}
else{
out("consonant");
}
} | a.cc: In function 'int main()':
a.cc:7:8: error: 'c' was not declared in this scope
7 | cin>>c;
| ^
|
s931806272 | p03852 | C++ | //ABC 050-C
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
#include <stdlib.h>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cstring>
#include <numeric>
#include <string>
#include <map>
#include <sstream>
using namespace std;
int main() {
char c;
cin >> c;
if (c == "a") cout << "vowel" << endl;
if (c == "i") cout << "vowel" << endl;
if (c == "u") cout << "vowel" << endl;
if (c == "e") cout << "vowel" << endl;
if (c == "o") cout << "vowel" << endl;
else if cout << "consonant" << endl;
}
| a.cc: In function 'int main()':
a.cc:21:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
21 | if (c == "a") cout << "vowel" << endl;
| ~~^~~~~~
a.cc:22:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
22 | if (c == "i") cout << "vowel" << endl;
| ~~^~~~~~
a.cc:23:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
23 | if (c == "u") cout << "vowel" << endl;
| ~~^~~~~~
a.cc:24:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
24 | if (c == "e") cout << "vowel" << endl;
| ~~^~~~~~
a.cc:25:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
25 | if (c == "o") cout << "vowel" << endl;
| ~~^~~~~~
a.cc:26:17: error: expected '(' before 'cout'
26 | else if cout << "consonant" << endl;
| ^~~~
| (
|
s605332487 | p03852 | C | [A]
#include<stdio.h>
int main(void)
{
char c;
scanf("%s",&c);
if (c=="a" || c=="i" || c=="u" || c=="e" || c=="o"){
puts("vowel");
}else{
puts("consonant");
}
return 0;
} | main.c:1:1: error: expected identifier or '(' before '[' token
1 | [A]
| ^
In file included from /usr/include/stdio.h:47,
from main.c:2:
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t'
28 | size_t __nbytes);
| ^~~~~~
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:1:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
+++ |+#include <stddef.h>
1 | /* Copyright (C) 1991-2025 Free Software Foundation, Inc.
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:37:44: error: unknown type name 'size_t'
37 | size_t __nbytes);
| ^~~~~~
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:37:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:57:3: error: unknown type name 'cookie_read_function_t'; did you mean 'cookie_seek_function_t'?
57 | cookie_read_function_t *read; /* Read bytes. */
| ^~~~~~~~~~~~~~~~~~~~~~
| cookie_seek_function_t
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:58:3: error: unknown type name 'cookie_write_function_t'; did you mean 'cookie_close_function_t'?
58 | cookie_write_function_t *write; /* Write bytes. */
| ^~~~~~~~~~~~~~~~~~~~~~~
| cookie_close_function_t
/usr/include/stdio.h:314:35: error: unknown type name 'size_t'
314 | extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
| ^~~~~~
/usr/include/stdio.h:130:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
129 | #include <bits/stdio_lim.h>
+++ |+#include <stddef.h>
130 |
/usr/include/stdio.h:320:47: error: unknown type name 'size_t'
320 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW
| ^~~~~~
/usr/include/stdio.h:320:47: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:340:34: error: unknown type name 'size_t'
340 | int __modes, size_t __n) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/stdio.h:340:34: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:346:24: error: unknown type name 'size_t'
346 | size_t __size) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/stdio.h:346:24: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:385:44: error: unknown type name 'size_t'
385 | extern int snprintf (char *__restrict __s, size_t __maxlen,
| ^~~~~~
/usr/include/stdio.h:385:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:389:45: error: unknown type name 'size_t'
389 | extern int vsnprintf (char *__restrict __s, size_t __maxlen,
| ^~~~~~
/usr/include/stdio.h:389:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:690:30: error: unknown type name 'size_t'
690 | size_t *__restrict __n, int __delimiter,
| ^~~~~~
/usr/include/stdio.h:690:30: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:693:28: error: unknown type name 'size_t'
693 | size_t *__restrict __n, int __delimiter,
| ^~~~~~
/usr/include/stdio.h:693:28: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:698:27: error: unknown type name 'size_t'
698 | size_t *__restrict __n,
| ^~~~~~
/usr/include/stdio.h:698:27: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:728:8: error: unknown type name 'size_t'
728 | extern size_t fread (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:728:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:728:46: error: unknown type name 'size_t'
728 | extern size_t fread (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:728:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:729:22: error: unknown type name 'size_t'
729 | size_t __n, FILE *__restrict __stream) __wur
| ^~~~~~
/usr/include/stdio.h:729:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:735:8: error: unknown type name 'size_t'
735 | extern size_t fwrite (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:735:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:735:53: error: unknown type name 'size_t'
735 | extern size_t fwrite (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:735:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:736:23: error: unknown type name 'size_t'
736 | size_t __n, FILE *__restrict __s) __nonnull((4));
| ^~~~~~
/usr/include/stdio.h:736:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:756:8: error: unknown type name 'size_t'
756 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:756:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:756:55: error: unknown type name 'size_t'
756 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:756:55: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:757:31: error: unknown type name 'size_t'
757 | size_t __n, FILE *__restrict __stream) __wur
| ^~~~~~
/usr/include/stdio.h:757:31: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:759:8: error: unknown type name 'size_t'
759 | extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:759:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:759:62: error: unknown type name 'size_t'
759 | extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
| ^~~~~~
/usr/include/stdio.h:759:62: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdio.h:760:32: error: unknown type name 'size_t'
760 | size_t __n, FILE *__restrict __stream)
| ^~~~~~
/usr/include/stdio.h:760:32: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
main.c: In function 'main':
main.c:11:14: warning: comparison between pointer and integer
11 | if (c=="a" || c=="i" || c=="u" || c=="e" || c=="o"){
| ^~
main.c:11:24: warning: comparison between pointer and integer
11 | if (c=="a" || c=="i" || c=="u" || c=="e" || c=="o"){
| ^~
main.c:11:34: warning: comparison between pointer and integer
11 | if (c=="a" || c=="i" || c=="u" || c=="e" || c=="o"){
| ^~
main.c:11:44: warning: comparison between pointer and integer
11 | if (c=="a" || c=="i" || c=="u" || c=="e" || c=="o"){
| ^~
main.c:11:54: warning: comparison between pointer and integer
11 | if (c=="a" || c=="i" || c=="u" || c=="e" || c=="o"){
| ^~
|
s071312024 | p03852 | C++ | #include <iostream>
int main() {
char c;
cin >> c;
std:cout << ((c == 'a' || c == 'i' || c=='u'||c=='e'||c=='o') ? "vowel" : "consonant") << std:endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | std:cout << ((c == 'a' || c == 'i' || c=='u'||c=='e'||c=='o') ? "vowel" : "consonant") << std:endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:6:94: error: found ':' in nested-name-specifier, expected '::'
6 | std:cout << ((c == 'a' || c == 'i' || c=='u'||c=='e'||c=='o') ? "vowel" : "consonant") << std:endl;
| ^
| ::
|
s524587075 | p03852 | C++ | #include <iostream>
int main() {
char c;
std::cin >> c;
std::cout << ((c == 'a' || c == 'i' || c=='u'||c=='e'||e=='o') ? "vowel" : "consonant") << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:56: error: 'e' was not declared in this scope
6 | std::cout << ((c == 'a' || c == 'i' || c=='u'||c=='e'||e=='o') ? "vowel" : "consonant") << std::endl;
| ^
|
s270894088 | p03852 | C++ | #include <iostream>
int main() {
char c;
cin >> c;
std:cout << ((c == 'a' || c == 'i' || c=='u'||c=='e'||e=='o') ? "vowel" : "consonant") << std:endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | std:cout << ((c == 'a' || c == 'i' || c=='u'||c=='e'||e=='o') ? "vowel" : "consonant") << std:endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:6:55: error: 'e' was not declared in this scope
6 | std:cout << ((c == 'a' || c == 'i' || c=='u'||c=='e'||e=='o') ? "vowel" : "consonant") << std:endl;
| ^
a.cc:6:94: error: found ':' in nested-name-specifier, expected '::'
6 | std:cout << ((c == 'a' || c == 'i' || c=='u'||c=='e'||e=='o') ? "vowel" : "consonant") << std:endl;
| ^
| ::
|
s290151139 | p03852 | Java | class Test{
public static void main(String args[])
throws java.io.IOException{
int c;
c=System.in.read();
if(c='a'or'i'or'u'or'e'or'o'){
System.out.println("vowel");
}else{
System.out.println("consonant");
}
}
}
| Main.java:6: error: ')' expected
if(c='a'or'i'or'u'or'e'or'o'){
^
Main.java:6: error: ';' expected
if(c='a'or'i'or'u'or'e'or'o'){
^
Main.java:6: error: not a statement
if(c='a'or'i'or'u'or'e'or'o'){
^
Main.java:6: error: ';' expected
if(c='a'or'i'or'u'or'e'or'o'){
^
Main.java:6: error: not a statement
if(c='a'or'i'or'u'or'e'or'o'){
^
Main.java:6: error: ';' expected
if(c='a'or'i'or'u'or'e'or'o'){
^
Main.java:6: error: not a statement
if(c='a'or'i'or'u'or'e'or'o'){
^
Main.java:6: error: ';' expected
if(c='a'or'i'or'u'or'e'or'o'){
^
Main.java:8: error: 'else' without 'if'
}else{
^
9 errors
|
s206869950 | p03852 | C++ | #include <iostream>
using namespace std;
void main()
{
char c;
cin >> c;
switch(c)
{
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
cout << "vowel" << endl;
break;
default:
cout << "consonant" << endl;
break;
}
return;
} | a.cc:4:1: error: '::main' must return 'int'
4 | void main()
| ^~~~
a.cc: In function 'int main()':
a.cc:21:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
21 | return;
| ^~~~~~
|
s735225539 | p03852 | C++ | #include <iostream>
using namespace std;
int main()
{
string mozi;
bool flag;
cin >> mozi;
for (int i; i < mozi.size();i++) {
if (char[i] == "a" || char[i] == "i" || char[i] == "u" || char[i] == "e" || char[i] == "o") {
flag = true;
}
}
if (flag) {
cout << "vowel";
}
else {
cout << "consonant";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:25: error: expected unqualified-id before '[' token
11 | if (char[i] == "a" || char[i] == "i" || char[i] == "u" || char[i] == "e" || char[i] == "o") {
| ^
|
s268439368 | p03852 | C++ | #include <iostream>
using namespace std;
char [] vowel = {'a', 'i', 'u', 'e', 'o'};
int main(){
char c;
cin >> c;
int j = 0;
for(int i = 0; i < (sizeof vowel)/sizeof char; i++){
if(vowel[i]==c)j=1;
}
if(j)cout << "consonant" << endl;
else cout << "consonant" << endl;
}
| a.cc:4:6: error: structured binding declaration cannot have type 'char'
4 | char [] vowel = {'a', 'i', 'u', 'e', 'o'};
| ^~
a.cc:4:6: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:4:6: error: empty structured binding declaration
a.cc:4:9: error: expected initializer before 'vowel'
4 | char [] vowel = {'a', 'i', 'u', 'e', 'o'};
| ^~~~~
a.cc: In function 'int main()':
a.cc:9:31: error: 'vowel' was not declared in this scope
9 | for(int i = 0; i < (sizeof vowel)/sizeof char; i++){
| ^~~~~
a.cc:9:45: error: expected primary-expression before 'char'
9 | for(int i = 0; i < (sizeof vowel)/sizeof char; i++){
| ^~~~
a.cc:9:44: error: expected ';' before 'char'
9 | for(int i = 0; i < (sizeof vowel)/sizeof char; i++){
| ^~~~~
| ;
a.cc:9:45: error: expected primary-expression before 'char'
9 | for(int i = 0; i < (sizeof vowel)/sizeof char; i++){
| ^~~~
a.cc:9:44: error: expected ')' before 'char'
9 | for(int i = 0; i < (sizeof vowel)/sizeof char; i++){
| ~ ^~~~~
| )
a.cc:9:45: error: declaration does not declare anything [-fpermissive]
9 | for(int i = 0; i < (sizeof vowel)/sizeof char; i++){
| ^~~~
a.cc:9:51: error: 'i' was not declared in this scope
9 | for(int i = 0; i < (sizeof vowel)/sizeof char; i++){
| ^
|
s169386071 | p03852 | C++ | #include<iostream>
using namespace std;
int main()
{
char qwe;
while(cin >> qwe)
{
if(qwe=='a'||qwe=='e'||qwe=='i'||qwe=='o'||qwe=='u')
printf("vowel\n");
else
printf("consonant\n")
}
} | a.cc: In function 'int main()':
a.cc:11:22: error: expected ';' before '}' token
11 | printf("consonant\n")
| ^
| ;
12 | }
| ~
|
s460084408 | p03852 | C++ | int main(){
char *str;
scanf("%s",str);
switch (str)
case "a":
case "i":
case "u":
case "e":
case "o":
printf("vowel\n");
break;
default:
printf("consonant\n");
return 0
}
| a.cc: In function 'int main()':
a.cc:5:1: error: 'scanf' was not declared in this scope
5 | scanf("%s",str);
| ^~~~~
a.cc:7:9: error: switch quantity not an integer
7 | switch (str)
| ^~~
a.cc:13:1: error: 'printf' was not declared in this scope
13 | printf("vowel\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main(){
a.cc:14:1: error: break statement not within loop or switch
14 | break;
| ^~~~~
a.cc:15:1: error: case label not within a switch statement
15 | default:
| ^~~~~~~
a.cc:16:1: error: 'printf' was not declared in this scope
16 | printf("consonant\n");
| ^~~~~~
a.cc:16:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:9: error: expected ';' before '}' token
17 | return 0
| ^
| ;
18 | }
| ~
|
s301824780 | p03852 | C | #include"stdio.h"
void main(){
char x; scanf("%c",&x);
switch(x){
case 'a':
case 'i':
case 'u':
case 'e':
case 'o':
print("vowel");
break;
default:
print("consonant");
break;
}} | main.c: In function 'main':
main.c:10:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
10 | print("vowel");
| ^~~~~
| printf
|
s703020439 | p03852 | C | #include"studio.h"
void main(){
char x; scanf("%c",&x);
switch(x){
case 'a':
case 'i':
case 'u':
case 'e':
case 'o':
print("vowel");
break;
default:
print("consonant");
break;
}} | main.c:1:9: fatal error: studio.h: No such file or directory
1 | #include"studio.h"
| ^~~~~~~~~~
compilation terminated.
|
s891221336 | p03852 | C++ | puts /[aiueo]/ =~ gets ? 'vowel' : 'consonant'
| a.cc:1:26: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
1 | puts /[aiueo]/ =~ gets ? 'vowel' : 'consonant'
| ^~~~~~~
a.cc:1:36: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
1 | puts /[aiueo]/ =~ gets ? 'vowel' : 'consonant'
| ^~~~~~~~~~~
a.cc:1:1: error: 'puts' does not name a type
1 | puts /[aiueo]/ =~ gets ? 'vowel' : 'consonant'
| ^~~~
|
s729443664 | p03852 | Java | import java.io.*;
public class Atcoder {
public static void main(String[] args)throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str=br.readLine();
if(str.equals("a")||str.equals("i")||str.equals("u")||str.equals("e")||str.equals("o")){
System.out.println("vowel");
}
else System.out.println("consonant");
}
} | Main.java:2: error: class Atcoder is public, should be declared in a file named Atcoder.java
public class Atcoder {
^
1 error
|
s308779230 | p03852 | Java | import java.io.*;
class UOAI{
public static void main(String[] args)throws IOExeption{
BufferedReader br=new BufferedReader(new Input StreamReader(System.in));
String str=br.readine();
if(str=='a'||str=='i'||str=='u'||str=='e'||str=='o')
System.out.println("vowel");
else System.out.println("consonant");
}
}
| Main.java:4: error: '(' or '[' expected
BufferedReader br=new BufferedReader(new Input StreamReader(System.in));
^
Main.java:4: error: ';' expected
BufferedReader br=new BufferedReader(new Input StreamReader(System.in));
^
2 errors
|
s029288159 | p03852 | Java | import java.io.*;
class UOAI{
public static void main(String[] args){
BufferedReader br=
new BufferReader(new Input StreamReader(System.in));
String str=br.readine();
if(str=='a'||str=='i'||str=='u'||str=='e'||str=='o')
System.out.println("vowel")
else System.out.println("consonant");
}
} | Main.java:5: error: '(' or '[' expected
new BufferReader(new Input StreamReader(System.in));
^
Main.java:5: error: ';' expected
new BufferReader(new Input StreamReader(System.in));
^
Main.java:9: error: ';' expected
System.out.println("vowel")
^
3 errors
|
s834124471 | p03852 | Java | public static void main(String[] args){
BufferedReader br=
new BufferReader(new Input StreamReader(System.in));
String str=br.readine();
if(str=='a'||str=='i'||str=='u'||str=='e'||str=='o')
System.out.println("vowel")
else System.out.println("consonant");
}
| 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)
Main.java:3: error: '(' or '[' expected
new BufferReader(new Input StreamReader(System.in));
^
Main.java:3: error: ';' expected
new BufferReader(new Input StreamReader(System.in));
^
Main.java:7: error: ';' expected
System.out.println("vowel")
^
4 errors
|
s127849197 | p03852 | C++ | Class UOIAUAI{
public static void main(String[] args){
BufferedReader br=
new BufferReader(new Input StreamReader(System.in));
String str=br.readine();
if(str=='a'||str=='i'||str=='u'||str=='e'||str=='o')
System.out.println("vowel")
else System.out.println("consonant");
}
}
| a.cc:1:1: error: 'Class' does not name a type; did you mean 'class'?
1 | Class UOIAUAI{
| ^~~~~
| class
|
s833935875 | p03852 | C++ | Class UOIAUAI{
public static void main(String[] args){
BufferedReader br=
new BufferReader(new Input StreamReaer(System.in));
String str=br.readine();
if(str=='a'||str=='i'||str=='u'||str=='e'||str=='o')
System.out.println("vowel")
else System.out.println("consonant");
}
}
} | a.cc:1:1: error: 'Class' does not name a type; did you mean 'class'?
1 | Class UOIAUAI{
| ^~~~~
| class
a.cc:13:1: error: expected declaration before '}' token
13 | }
| ^
|
s919087880 | p03852 | C++ | #include <bits/stdc++.h>
int main() {
char c; std::cin >> c;
std::cout << (std::string("aiueo").find(c) != string::npos ? "vowel" : "consonant") << "\n";
} | a.cc: In function 'int main()':
a.cc:4:47: error: 'string' has not been declared
4 | std::cout << (std::string("aiueo").find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~~~
|
s718095097 | p03852 | C++ | #include <bits/stdc++.h>
int main() {
char c; std::cin >> c;
std::cout << (string("aiueo").find(c) != string::npos ? "vowel" : "consonant") << "\n";
} | a.cc: In function 'int main()':
a.cc:4:15: error: 'string' was not declared in this scope
4 | std::cout << (string("aiueo").find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~~~
a.cc:4:15: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:4:42: error: 'string' is not a class, namespace, or enumeration
4 | std::cout << (string("aiueo").find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~~~
|
s677289267 | p03852 | C++ | #include <bits/stdc++.h>
int main() {
char c; std::cin >> c;
std::cout << (("aiueo").find(c) != string::npos ? "vowel" : "consonant") << "\n";
} | a.cc: In function 'int main()':
a.cc:4:25: error: request for member 'find' in '("aiueo")', which is of non-class type 'const char [6]'
4 | std::cout << (("aiueo").find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~
a.cc:4:36: error: 'string' has not been declared
4 | std::cout << (("aiueo").find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~~~
|
s584130225 | p03852 | C++ | #include <bits/stdc++.h>
int main() {
char c; std::cin >> c;
std::cout << ("aiueo".find(c) != string::npos ? "vowel" : "consonant") << "\n";
} | a.cc: In function 'int main()':
a.cc:4:23: error: request for member 'find' in '"aiueo"', which is of non-class type 'const char [6]'
4 | std::cout << ("aiueo".find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~
a.cc:4:34: error: 'string' has not been declared
4 | std::cout << ("aiueo".find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~~~
|
s208161016 | p03852 | C++ | int main() {
char c; cin >> c;
std::cout << ("aiueo".find(c) != string::npos ? "vowel" : "consonant") << "\n";
} | a.cc: In function 'int main()':
a.cc:2:9: error: 'cin' was not declared in this scope
2 | char c; cin >> c;
| ^~~
a.cc:3:6: error: 'cout' is not a member of 'std'
3 | std::cout << ("aiueo".find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int main() {
a.cc:3:23: error: request for member 'find' in '"aiueo"', which is of non-class type 'const char [6]'
3 | std::cout << ("aiueo".find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~
a.cc:3:34: error: 'string' has not been declared
3 | std::cout << ("aiueo".find(c) != string::npos ? "vowel" : "consonant") << "\n";
| ^~~~~~
|
s420318536 | p03852 | C++ | #include <iostream>
using namespece std;
int main()
{
char input;
cin >> input;
if(input == 'a' || input == 'e' || input == 'i' || input == 'o' || input == 'u')
{
cout << "vowel" << endl;
}
else
{
cout << "consonant" << endl;
}
}
| a.cc:3:7: error: expected nested-name-specifier before 'namespece'
3 | using namespece std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> input;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:12:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | cout << "vowel" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:12:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
12 | cout << "vowel" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:16:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
16 | cout << "consonant" << 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:16:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
16 | cout << "consonant" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s949401142 | p03852 | C++ | #include <iostream>
using namespece std;
int main()
{
char input;
cin >> input;
if(input == 'a' || input == 'e' ||
input == 'i' || input == 'o' || input == 'u')
{
cout << "vowel" << endl;
}
else
{
cout << "consonant" << endl;
}
}
| a.cc:3:7: error: expected nested-name-specifier before 'namespece'
3 | using namespece std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> input;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:13:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout << "vowel" << 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:13:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout << "vowel" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:17:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | cout << "consonant" << 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:17:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
17 | cout << "consonant" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s258223107 | p03852 | C++ | #include <iostream>
using namespce std;
int main()
{
char input;
cin >> input;
if(input == 'a' || input == 'e' ||
input == 'i' || input == 'o' || input == 'u')
{
cout << "vowel" << endl;
}
else
{
cout << "consonant" << endl;
}
}
| a.cc:3:7: error: expected nested-name-specifier before 'namespce'
3 | using namespce std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> input;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:13:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout << "vowel" << 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:13:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout << "vowel" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:17:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | cout << "consonant" << 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:17:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
17 | cout << "consonant" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s407728068 | p03852 | C++ | use strict;
use warnings;
my $buf = <>;
chomp $buf;
if("aiueo" =~ m/$buf/){
print "YES\n";
}else{
print "NO\n";
}
| a.cc:1:1: error: 'use' does not name a type
1 | use strict;
| ^~~
a.cc:2:1: error: 'use' does not name a type
2 | use warnings;
| ^~~
a.cc:4:1: error: 'my' does not name a type
4 | my $buf = <>;
| ^~
a.cc:5:1: error: 'chomp' does not name a type
5 | chomp $buf;
| ^~~~~
a.cc:6:1: error: expected unqualified-id before 'if'
6 | if("aiueo" =~ m/$buf/){
| ^~
a.cc:8:2: error: expected unqualified-id before 'else'
8 | }else{
| ^~~~
|
s622058677 | p03852 | C++ | qqq | a.cc:1:1: error: 'qqq' does not name a type
1 | qqq
| ^~~
|
s576807060 | p03852 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<map>
#include<list>
#include<stack>
#include<queue>
#include<climits> //INT_MIN/MAX
typedef int long long;
using namespace std;
#define FOR(i,s,e) for(int (i)=(s);(i)<(e);(i)++)
#define FORR(i,s,e) for(int (i)=(s);(i)>(e);(i)--)
#define MOD 1000000007
#define llong long long
#define debug(x) cout<<#x<<": "<<x<<endl
#define non -1
llong n;
int color1[200001];
int color2[200001];
vector<int> G1[200001];
vector<int> G2[200001];
llong City[200001];
void dfs1(int r, int c, int color[200001], vector<int> G[200001]) {//r
stack<int>S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
FOR(i, 0, G[u].size()) {
int v = G[u][i];
if (color[v] == non) {
color[v] = c;
S.push(v);
}
}
}
}
void assigncolor1(int color[200001], vector<int>G[200001]) {
int id = 1;
FOR(i, 1, n + 1)
color[i] = non;
FOR(u, 1, n + 1) {
if (color[u] == non)
dfs1(u, id++, color, G);
}
}
signed main()
{
cin.tie(0);
ios_base::sync_with_stdio(false);
int k, l;
cin >> n >> k >> l;
bool visit1[200001];
bool visit2[200001];
bool CityP[200001];
FOR(i, 1, n+1) {
visit1[i] = false;
visit2[i] = false;
City[i] = 1;
CityP[i] = false;
color1[i] = non;
color2[i] = non;
}
FOR(i, 0, k) {
int s, t;
cin >> s >> t;
G1[s].push_back(t);
G1[t].push_back(s);
}
FOR(i, 0, l) {
int s, t;
cin >> s >> t;
G2[s].push_back(t);
G2[t].push_back(s);
}
assigncolor1(color1, G1);
/*
FOR(i, 1, n + 1) {
cout << "color1 : v" << i << ": " << color1[i] << endl;
}*/
assigncolor1(color2, G2);
/*FOR(i, 1, n + 1) {
cout << "color2 : v" << i << ": " << color2[i] << endl;
}
*/
FOR(v, 1, n + 1) {
if (visit1[v] == true)continue;
int count = 1;
queue<int >Q;
queue<int >Q2;
Q.push(v);
Q2.push(v);
while (!Q.empty()) {
int u = Q.front();
Q.pop();
visit1[u] = true;
FOR(i, 0, G2[u].size()) {
int p = G2[u][i];
if(visit1[p]==false)
if (color1[u]==color1[p]&&color2[u]==color2[p]) {
count++;
/* debug(count);
debug(u);
debug(p);
*/
Q.push(p);
Q2.push(p);
visit1[p] = true;
}
}
}
while (!Q2.empty()) {
int u = Q2.front();
Q2.pop();
City[u] = count;
}
}
FOR(i, 1, n) {
cout << City[i] << " ";
}
cout << City[n] << endl;
return 0;
}
| a.cc:14:18: error: declaration does not declare anything [-fpermissive]
14 | typedef int long long;
| ^~~~
|
s495814208 | p03852 | Java | import java.util.*;
public class ProblemA {
private static String VOWELS = "ueoai";
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
if (VOWELS.indexOf(s) > 0 ) {
System.out.println("vowel");
} else {
System.out.println("consonant");
}
}
}
| Main.java:3: error: class ProblemA is public, should be declared in a file named ProblemA.java
public class ProblemA {
^
1 error
|
s923567017 | p03852 | C++ | #include <iostream>
int main(){
char c;
cin>>c;
if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o') cout<<"vowel<<endl;
else cout<<"consonant"<<endl;} | a.cc:6:51: warning: missing terminating " character
6 | if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o') cout<<"vowel<<endl;
| ^
a.cc:6:51: error: missing terminating " character
6 | if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o') cout<<"vowel<<endl;
| ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:45: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o') cout<<"vowel<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:1: error: expected primary-expression before 'else'
7 | else cout<<"consonant"<<endl;}
| ^~~~
|
s908004862 | p03852 | C++ | #include <iostream.h>
int main()
{
char ch;
cin >> ch;
if(ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u')
cout << "vowel";
else
cout << "consonant";
return 0;
} | a.cc:1:10: fatal error: iostream.h: No such file or directory
1 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s593140618 | p03852 | C++ | #include <iostream>
int main() {
char c;
cin >> c;
char *s = "aiueo";
for (int i = 0; i < 5; ++i) if (c != s[i]) {
cout << "consonant" << endl;
return 0;
}
cout << "vowel" << endl;
} | a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin >> c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:5:11: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
5 | char *s = "aiueo";
| ^~~~~~~
a.cc:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout << "consonant" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | cout << "consonant" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout << "vowel" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | cout << "vowel" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s269976268 | p03852 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
cout<<"vowel";
else
cout<<"consonant";
} | a.cc: In function 'int main()':
a.cc:6:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/regex.h:1199: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>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/regex.h:1274: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>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
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/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
6 | if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u')
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Tr |
s309623247 | p03852 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String c = sc.next();
char d = c.charAt(0);
if(d=='a'||d=='i'||d=='u'||d=='e'||d=='o'){
System.out.println("vowel");
}else{
System.out.println("consonant");
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s888487598 | p03852 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Strine s = args[0];
if(s.equals('a') || s.equals('i') || s.equals('u') || s.equals('e') || s.equals('o') ){
System.out.println("vowel");
}else{
System.out.println("consonant");
}
}
} | Main.java:4: error: cannot find symbol
Strine s = args[0];
^
symbol: class Strine
location: class Main
1 error
|
s572235844 | p03852 | Java | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class atc {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
List<String> moji = new ArrayList<String>();
moji.add("a");
moji.add("i");
moji.add("u");
moji.add("e");
moji.add("o");
String c=sc.next();
if(moji.contains(c))System.out.println("vowel");
else System.out.println("consonant");
}
} | Main.java:6: error: class atc is public, should be declared in a file named atc.java
public class atc {
^
1 error
|
s116584122 | p03852 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Strine s = args[0];
if(s.equals('a') || s.equals('i') || s.equals('u') || s.equals('e') || s.equals('o') ||){
System.out.println("vowel");
}else{
System.out.println("consonant");
}
}
} | Main.java:5: error: illegal start of expression
if(s.equals('a') || s.equals('i') || s.equals('u') || s.equals('e') || s.equals('o') ||){
^
1 error
|
s383879076 | p03852 | C++ | #include<iostream>
using namespace std;
int main(){
int W,H;
char C[101][101]={};
cin>>H>>W;
for(int i=0;i<H;i++)
for(int j=0;j<W;j++)
cin>>C[i][j];
for(int i=H;i<2H;i++)
for(int j=0;j<W;j++)
C[i][j]=C[(i+1)/2][j];
for(int i=0;i<2H;i++){
for(int j=0;j<W;j++)
cout<<C[i][j];
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:15: error: unable to find numeric literal operator 'operator""H'
11 | for(int i=H;i<2H;i++)
| ^~
a.cc:15:15: error: unable to find numeric literal operator 'operator""H'
15 | for(int i=0;i<2H;i++){
| ^~
|
s194841548 | p03852 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
char a = sc.next().charAr(0);
if( (a == 'a')||(a=='i')||(a=='u')||(a=='e')||(a=='o')){
System.out.println("vowel");
}else{
System.out.println("consonent");
}
return;
}
} | Main.java:6: error: cannot find symbol
char a = sc.next().charAr(0);
^
symbol: method charAr(int)
location: class String
1 error
|
s600171940 | p03852 | C | int main()
{
char a;
scanf("%c",a);
if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u')
printf("vowel\n");
else
printf("consonant\n");
return 0;
} | main.c: In function 'main':
main.c:4:2: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%c",a);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main()
main.c:4:2: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | scanf("%c",a);
| ^~~~~
main.c:4:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:5: error: 'c' undeclared (first use in this function)
5 | if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u')
| ^
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
6 | printf("vowel\n");
| ^~~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
8 | printf("consonant\n");
| ^~~~~~
main.c:8:3: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s897560965 | p03852 | C | #include <stdio.h>
int main(){
char c;
scanf("%s",c);
for(i=0;i<26;i++){
if(c='a'&&c='i'&&c='u'&&c='e'&&c='o'){
printf("vowel\n");
}else{
printf("vowel\n");
}
}
}
| main.c: In function 'main':
main.c:6:9: error: 'i' undeclared (first use in this function)
6 | for(i=0;i<26;i++){
| ^
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:41: error: lvalue required as left operand of assignment
7 | if(c='a'&&c='i'&&c='u'&&c='e'&&c='o'){
| ^
|
s712761305 | p03852 | C | #include <stdio.h>
int main(void)
{
char ch;
scanf("%c",ch)
if(ch == ('a'||'e'||'i'||'o'||'u'))
printf("vowel\n");
else
printf("consonant\n");
return 0;
} | main.c: In function 'main':
main.c:7:23: error: expected ';' before 'if'
7 | scanf("%c",ch)
| ^
| ;
8 |
9 | if(ch == ('a'||'e'||'i'||'o'||'u'))
| ~~
main.c:11:9: error: 'else' without a previous 'if'
11 | else
| ^~~~
|
s392366594 | p03852 | C++ | character = str(input())
vowels = ["a","i","u","e","o"]
fin = False
if character in vowels:
print("vowel")
else:
print("consonant")
| a.cc:1:1: error: 'character' does not name a type
1 | character = str(input())
| ^~~~~~~~~
|
s885381911 | p03852 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin>>s;
if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
cout<<"vowel"<<endl;
}else{
cout<<"consonant"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
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:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629: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> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/string_view:644: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>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3755: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>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'const _CharT*' and 'char'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived f |
s520034919 | p03852 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin>>s;
if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
cout<<"vowel"<<endl;
}else
cout<<"consonant"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
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:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629: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> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/string_view:644: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>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3755: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>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'const _CharT*' and 'char'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived f |
s717382686 | p03852 | C++ | using System;
public class Test
{
public static void Main()
{
string line;
line = Console.ReadLine();
char c = Convert.ToChar(line);
if(c == 'a'||c=='i'||c=='u'||c=='e'||c=='o'){
Console.WriteLine("vowel");
} else {
Console.WriteLine("consonant");
}
}
} | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Test
| ^~~~~~
|
s339715301 | p03852 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin>>s;
if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
cout<<"YES"<<endl;
}else
cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<char>}
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:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629: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> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/string_view:644: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>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'char'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3755: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>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'const _CharT*' and 'char'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::tuple<_UTypes ...>'
10 | if(s=='a'||s=='i'||s=='u'||s=='e'||s=='o'){
| ^~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:10:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived f |
s983047790 | p03852 | C++ | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
char s;
cin>>s;
if(s=='a'or s=='e' or s=='i' or s=='o' or s=='u' ) cout<<"vowel"<<endl;
else cout<<"consonant"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:11: error: unable to find character literal operator 'operator""or' with 'char' argument
13 | if(s=='a'or s=='e' or s=='i' or s=='o' or s=='u' ) cout<<"vowel"<<endl;
| ^~~~~
a.cc:13:16: error: expected ')' before 's'
13 | if(s=='a'or s=='e' or s=='i' or s=='o' or s=='u' ) cout<<"vowel"<<endl;
| ~ ^~
| )
|
s681713216 | p03852 | C++ | #include <stdio.h>
int main(){
int c;
c = getc();
switch(c){
case 'a':
case 'i':
case 'u':
case 'e':
case 'o':
printf("vowel");
break;
default:
printf("consonant");
}
} | a.cc: In function 'int main()':
a.cc:5:11: error: too few arguments to function 'int getc(FILE*)'
5 | c = getc();
| ~~~~^~
In file included from a.cc:1:
/usr/include/stdio.h:576:12: note: declared here
576 | extern int getc (FILE *__stream) __nonnull ((1));
| ^~~~
|
s521586411 | p03852 | C++ | #include <iostream>
#include <vector>
#include <array>
#include <cmath>
using namespace std;
#define ll long long
int main_()
{
// Value
string c = "";
string result;
// Input
cin >> c;
//cin>>N>>x;
//ll size = 2*N-1;
// Cal
if(c=="a" || c=="i" || c=="u" || c=="e" || c=="o"){
result = "vowel";
}else{
result = "consonant";
}
// Output
cout << result << endl;
// Fin
return 0;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s690562735 | p03852 | C++ | #include <iostream>
using namespace std;
int main(){
stirng c;
cin >>c;
if(c == "a")
cout <<"vowel" <<endl;
else if(c == "i")
cout <<"vowel" <<endl;
else if(c == "u")
cout <<"vowel" <<endl;
else if(c == "e")
cout <<"vowel" <<endl;
else if(c == "o")
cout <<"vowel" <<endl;
else
cout <<"consonant" <<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'stirng' was not declared in this scope
5 | stirng c;
| ^~~~~~
a.cc:7:15: error: 'c' was not declared in this scope
7 | cin >>c;
| ^
|
s453049971 | p03852 | Java | import java.util.Scanner;
public class Main01 {
public static void main(String[] args) {
new Main01().solve(new Scanner(System.in));
}
public void solve(Scanner sc) {
String c = sc.next();
if(c.matches("[aeiou]")) {
System.out.println("vowel");
} else {
System.out.println("consonant");
}
}
}
| Main.java:3: error: class Main01 is public, should be declared in a file named Main01.java
public class Main01 {
^
1 error
|
s451419320 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin >> c;
if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
else cout << "consonaut" << endl;
return 0;
}
| a.cc:6:21: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
6 | if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~~
a.cc:6:34: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
6 | if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~
a.cc:6:46: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
6 | if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~
a.cc:6:58: warning: missing terminating ' character
6 | if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^
a.cc:6:58: error: missing terminating ' character
6 | if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:21: error: unable to find character literal operator 'operator""u' with 'int' argument
6 | if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~~
a.cc:8:1: error: expected primary-expression before 'return'
8 | return 0;
| ^~~~~~
a.cc:7:34: error: expected ')' before 'return'
7 | else cout << "consonaut" << endl;
| ^
| )
8 | return 0;
| ~~~~~~
a.cc:6:3: note: to match this '('
6 | if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^
|
s516902346 | p03852 | C++ | #include <ioostream>
using namespace std;
int main(){
stirng c;
cin >>c;
if(c == "a")
cout <<"vowel" <<endl;
else if(c == "i")
cout <<"vowel" <<endl;
else if(c == "u")
cout <<"vowel" <<endl;
else if(c == "e")
cout <<"vowel" <<endl;
else if(c == "o")
cout <<"vowel" <<endl;
else
cout <<"consonant" <<endl;
return 0;
} | a.cc:1:10: fatal error: ioostream: No such file or directory
1 | #include <ioostream>
| ^~~~~~~~~~~
compilation terminated.
|
s854816710 | p03852 | Java | import java.util.Scanner;
import java.util.ArrayList;
import java.util.HashMap;
import java.lang.Integer;
import java.lang.StringBuilder;
import java.lang.Math;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String c = in.next();
switch (c) {
case "a":
case "i":
case "e":
case "o":
case "u":
System.out.println("vowel");
break;
default:
System.out.println("consonant");
}
}
}
o | Main.java:26: error: reached end of file while parsing
o
^
1 error
|
s142823703 | p03852 | C++ |
1.#include <bits/stdc++.h>
2.using namespace std;
3.int main(){
4.char c;
5.cin >> c;
6.if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
7.else cout << "consonaut" << endl;
8.return 0;
9.}
| a.cc:2:3: error: stray '#' in program
2 | 1.#include <bits/stdc++.h>
| ^
a.cc:7:23: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
7 | 6.if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~~
a.cc:7:36: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
7 | 6.if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~
a.cc:7:48: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
7 | 6.if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~
a.cc:7:60: warning: missing terminating ' character
7 | 6.if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^
a.cc:7:60: error: missing terminating ' character
7 | 6.if(c == 'a' || c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:8:1: error: exponent has no digits
8 | 7.else cout << "consonaut" << endl;
| ^~~~~~
a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 1.#include <bits/stdc++.h>
| ^~
a.cc:4:1: error: expected unqualified-id before numeric constant
4 | 3.int main(){
| ^~~~~
|
s646432131 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
cin >> c;
if(c == 'a' c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
else cout << "consonaut" << endl;
return 0;
} | a.cc:6:18: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
6 | if(c == 'a' c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~~
a.cc:6:31: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
6 | if(c == 'a' c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~
a.cc:6:43: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
6 | if(c == 'a' c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~
a.cc:6:55: warning: missing terminating ' character
6 | if(c == 'a' c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^
a.cc:6:55: error: missing terminating ' character
6 | if(c == 'a' c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:12: error: expected ';' before 'c'
6 | if(c == 'a' c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^~
| ;
a.cc:8:1: error: expected primary-expression before 'return'
8 | return 0;
| ^~~~~~
a.cc:7:34: error: expected ')' before 'return'
7 | else cout << "consonaut" << endl;
| ^
| )
8 | return 0;
| ~~~~~~
a.cc:6:3: note: to match this '('
6 | if(c == 'a' c == 'i || c == 'u' || c == 'e' || c == 'o')cout << "vowel" << endl;
| ^
|
s032669126 | p03852 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
inline void deBugMode() {
#ifndef ONLINE_JUDGE
freopen("debug.in", "r", stdin);
#endif // ONLINE_JUDGE
}
inline void optimizeIt() {
ios::sync_with_stdio(false);
cin.tie(NULL);
}
inline int ABS(const int &x) {
return max(x, -x);
}
const int NMax = 1e5 + 5;
const int LIM = 1e5;
const int MOD = 1000000007;
int main(){
//deBugMode();
optimizeIt();
char c;
cin >> c;
if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
cout << "vowel"
} else {
cout << "consonant";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:34:24: error: expected ';' before '}' token
34 | cout << "vowel"
| ^
| ;
35 | } else {
| ~
|
s065286374 | p03853 | C | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int H, W;
string inp;
vector<string> C(H);
cin >> H >> W;
rep(i, H){
cin >> inp;
C.push_back(inp);
}
rep(i, H) {
cout << C.at(i) << "\n";
cout << C.at(i) << "\n";
}
return 0;
}
| main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s467962210 | p03853 | C++ | #include <bits/stdc++.h>
#define PI 3.1415926535897932
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
int H,W;
cin>>H>>W;
vector<string> vec(W);
for(int j=0;j<W;j++){
cin>>vec[j];
}
for(int i=0;i<H;j++){
cout<<vec[i]<<endl;
cout<<vec[i]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:15:19: error: 'j' was not declared in this scope
15 | for(int i=0;i<H;j++){
| ^
|
s521659014 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
template <class T>
T GCD(T a, T b)
{
T r;
while (a)
r = b, b = a, a = r % a;
return b;
}
template <class T>
T LCM(T a, T b) { return a / GCD(a, b) * b; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repd(i, n) for (ll i = n; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (b); i++)
#define FORD(i, a, b) for (ll i = a; i >= (b); i--)
#define FORA(i, I) for (const auto &i : I)
// vector
#define ALL(x) x.begin(), x.end()
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef vector<ll> vl;
#define ERASE(x) x.erase(unique(ALL(x)), x.end()); // erase same elements
#define VEC(type, c, n) \
std::vector<type> c(n); \
for (auto &i : c) \
std::cin >> i;
// input
#define INIT \
std::ios::sync_with_stdio(false); \
std::cin.tie(0);
#define VAR(type, ...) \
type __VA_ARGS__; \
MACRO_VAR_Scan(__VA_ARGS__);
// output
template <typename T>
void MACRO_OUT(const T t) { std::cout << t; }
#define OUT(...) MACRO_OUT(__VA_ARGS__);
#define SP std::cout << " ";
#define TAB std::cout << "\t";
#define BR std::cout << "\n";
#define ENDL std::cout << std::endl;
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
cout << a;
ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
cout << a << ' ';
}
int ans = 0;
bool check = 0;
string s, t;
int N = 3;
vector<int> v(N);
int a, b, c, d, n;
int x, y;
int sum;
char ch;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// cout << (conditon ? (result: == 1 ): (==0)) << endl; <- output result of if
// long long 型が表せる値の上限はおよそ 9 × 10^18 です.
int main()
{
// abc 049 B
cin >> H >> W;
for (int i = 0; i < H; i++)
{
cin >> s;
cout << s << endl
<< s << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:107:12: error: 'H' was not declared in this scope
107 | cin >> H >> W;
| ^
a.cc:107:17: error: 'W' was not declared in this scope
107 | cin >> H >> W;
| ^
|
s140884139 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int h,w;cin. >> h >> w;
for(int i = 0;i<h;i++) {
string s;cin >> s;
cout << s << "\n" << s << "\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:16: error: expected unqualified-id before '>>' token
4 | int h,w;cin. >> h >> w;
| ^~
|
s540944865 | p03853 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int main(){
int a,b,i,j;
cin>>a>>b;
vector <char>c;
for(i=0;i<a;i++){
string s;
cin>>s;
for(j=0;j<b;j++)
c[i][j]=s[j];
}
for(i=0;i<a;i++){
for(j=0;j<b;j++){
cout<<c[i][j];
}
cout<<endl;
for(j=0;j<b;j++){
cout<<c[i][j];
}
cout<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:23: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
13 | c[i][j]=s[j];
| ^
a.cc:17:29: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
17 | cout<<c[i][j];
| ^
a.cc:21:29: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
21 | cout<<c[i][j];
| ^
|
s777453024 | p03853 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int main(){
int a,b,i,j;
cin>>a>>b;
vector <char>c;
for(i=0;i<a;i++){
string s;
cin>>s;
for(j=0;j<b;j++0)
c[i][j]=s[j];
}
for(i=0;i<a;i++)
for(j=0;j<b;j++){
cout<<c[i][j];
}
cout<<endl; | a.cc: In function 'int main()':
a.cc:12:28: error: expected ')' before numeric constant
12 | for(j=0;j<b;j++0)
| ~ ^
| )
a.cc:12:29: error: expected ';' before ')' token
12 | for(j=0;j<b;j++0)
| ^
| ;
a.cc:17:25: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
17 | cout<<c[i][j];
| ^
a.cc:19:22: error: expected '}' at end of input
19 | cout<<endl;
| ^
a.cc:5:19: note: to match this '{'
5 | int main(){
| ^
|
s203278160 | p03853 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
int main(){
int a,b,i;
cin>>a>>b;
vector <char>c;
for(i=0;i<a;i++){
string s;
cin>>s;
for(j=0;j<b;j++0)
c[i][j]=s[j];
}
for(i=0;i<a;i++)
for(j=0;j<b;j++){
cout<<c[i][j];
}
cout<<endl;
for(j=0;j<b;j++){
cout<<c[i][j];
}
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:17: error: 'j' was not declared in this scope
12 | for(j=0;j<b;j++0)
| ^
a.cc:12:28: error: expected ')' before numeric constant
12 | for(j=0;j<b;j++0)
| ~ ^
| )
a.cc:12:29: error: expected ';' before ')' token
12 | for(j=0;j<b;j++0)
| ^
| ;
a.cc:16:17: error: 'j' was not declared in this scope
16 | for(j=0;j<b;j++){
| ^
a.cc:20:15: error: 'j' was not declared in this scope
20 | for(j=0;j<b;j++){
| ^
a.cc: At global scope:
a.cc:25:9: error: expected unqualified-id before 'return'
25 | return 0;
| ^~~~~~
a.cc:26:9: error: expected declaration before '}' token
26 | }
| ^
|
s489738113 | p03853 | C++ | #include<iostream>
#include<vector>
int main(){
int a,b,i;
cin>>a>>b;
vector <char>c;
for(i=0;i<a;i++){
string s;
cin>>s;
for(j=0;j<b;j++0)
c[i][j]=s[j];
}
for(i=0;i<a;i++)
for(j=0;j<b;j++){
cout<<c[i][j];
}
cout<<endl;
for(j=0;j<b;j++){
cout<<c[i][j];
}
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:3: error: 'vector' was not declared in this scope
7 | vector <char>c;
| ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note: 'std::vector'
428 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/usr/include/c++/14/vector:93:13: note: 'std::pmr::vector'
93 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
a.cc:7:11: error: expected primary-expression before 'char'
7 | vector <char>c;
| ^~~~
a.cc:9:5: error: 'string' was not declared in this scope
9 | string s;
| ^~~~~~
a.cc:9:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:10:10: error: 's' was not declared in this scope
10 | cin>>s;
| ^
a.cc:11:9: error: 'j' was not declared in this scope
11 | for(j=0;j<b;j++0)
| ^
a.cc:11:20: error: expected ')' before numeric constant
11 | for(j=0;j<b;j++0)
| ~ ^
| )
a.cc:11:21: error: expected ';' before ')' token
11 | for(j=0;j<b;j++0)
| ^
| ;
a.cc:15:9: error: 'j' was not declared in this scope
15 | for(j=0;j<b;j++){
| ^
a.cc:16:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
16 | cout<<c[i][j];
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:16:13: error: 'c' was not declared in this scope
16 | cout<<c[i][j];
| ^
a.cc:18:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
18 | cout<<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:18:9: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
18 | cout<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:19:7: error: 'j' was not declared in this scope
19 | for(j=0;j<b;j++){
| ^
a.cc:20:13: error: 'c' was not declared in this scope
20 | cout<<c[i][j];
| ^
a.cc: At global scope:
a.cc:24:1: error: expected unqualified-id before 'return'
24 | return 0;
| ^~~~~~
a.cc:25:1: error: expected declaration before '}' token
25 | }
| ^
|
s392863920 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,i;
cin>>a>>b;
vector <char> c;
for(i=0;i<a;i++)
cin>>c;
for(i=0;i<a;i++)
cout<<c<<\n<<c;
return 0;
}
| a.cc:13:14: error: stray '\' in program
13 | cout<<c<<\n<<c;
| ^
a.cc: In function 'int main()':
a.cc:11:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char>')
11 | cin>>c;
| ~~~^~~
| | |
| | std::vector<char>
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<char>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<char>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<char>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<char>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<char>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<char>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<char>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
| ~~~~~~~~~~~~~~~~~~^~ |
s955441041 | p03853 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b,i;
cin>>a>>b;
for(i=0;i<a;i++)
string c[i];
for(i=0;i<a;i++){
cin<<c[i]<<\n<<c[i]<<endl;
}
return 0;
} | a.cc:11:28: error: stray '\' in program
11 | cin<<c[i]<<\n<<c[i]<<endl;
| ^
a.cc: In function 'int main()':
a.cc:11:22: error: 'c' was not declared in this scope
11 | cin<<c[i]<<\n<<c[i]<<endl;
| ^
a.cc:11:29: error: 'n' was not declared in this scope
11 | cin<<c[i]<<\n<<c[i]<<endl;
| ^
|
s112977479 | p03853 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b,i;
cin>>a>>b;
for(i=0;i<a;i++)
string c;
for(i=0;i<a;i++){
cin<<s<<\n<<s;
}
return 0;
}
| a.cc:11:25: error: stray '\' in program
11 | cin<<s<<\n<<s;
| ^
a.cc: In function 'int main()':
a.cc:11:22: error: 's' was not declared in this scope
11 | cin<<s<<\n<<s;
| ^
a.cc:11:26: error: 'n' was not declared in this scope
11 | cin<<s<<\n<<s;
| ^
|
s887630482 | p03853 | C++ | #include<iostream>
using namespace std;
int main () {
int H,W;
cin >> H >> W;
char mat[H][W];
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
cin >> mat[i][j];
}
}
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
cout >> mat[i][j];
}
cout << '\n';
for(int j=0; j<W; j++){
cout >> mat[i][j];
}
cout << '\n';
}
}
| a.cc: In function 'int main()':
a.cc:16:18: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'char')
16 | cout >> mat[i][j];
| ~~~~ ^~ ~~~~~~~~~
| | |
| | char
| std::ostream {aka std::basic_ostream<char>}
a.cc:16:18: note: candidate: 'operator>>(int, int)' (built-in)
16 | cout >> mat[i][j];
| ~~~~~^~~~~~~~~~~~
a.cc:16:18: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:16:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
16 | cout >> mat[i][j];
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:16:13: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
16 | cout >> mat[i][j];
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:16:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
16 | cout >> mat[i][j];
| ^
/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:16:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
16 | cout >> mat[i][j];
| ^
/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:16:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
16 | cout >> mat[i][j];
| ^
/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:16:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
16 | cout >> mat[i][j];
| ^
/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:16:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
16 | cout >> mat[i][j];
| ^
/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:16:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
16 | cout >> mat[i][j];
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = char&]':
a.cc:16:29: required from here
16 | cout >> mat[i][j];
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:20:18: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'char')
20 | cout >> mat[i][j];
| ~~~~ ^~ ~~~~~~~~~
| | |
| | char
| std::ostream {aka std::basic_ostream<char>}
a.cc:20:18: note: candidate: 'operator>>(int, int)' (built-in)
20 | cout >> mat[i][j];
| ~~~~~^~~~~~~~~~~~
a.cc:20:18: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
/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:20:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
20 | cout >> mat[i][j];
| ^
/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:20:13: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
20 | cout >> mat[i][j];
| ^~~~
/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:20:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
20 | cout >> mat[i][j];
| ^
/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:20:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
20 | cout >> mat[i][j];
| ^
/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:20:29: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
20 | cout >> mat[i][j];
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream |
s383110387 | p03853 | C++ | #include<iostream>
using namespace std;
int main () {
int H, W;
int arr[H][W];
for (int i = 0; i < H; i ++){
for (int j = 0; j < W; j ++){
cin >> arr[i][j];
}
}
for (int i = 0; i < H; i ++){
for (int j = 0; j < W; j ++){
cout >> arr[i][j];
}
cout << '\n';
for (int j = 0; j < W; j ++){
cout >> arr[i][j];
}
cout << '\n';
}
} | a.cc: In function 'int main()':
a.cc:14:12: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
14 | cout >> arr[i][j];
| ~~~~ ^~ ~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:14:12: note: candidate: 'operator>>(int, int)' (built-in)
14 | cout >> arr[i][j];
| ~~~~~^~~~~~~~~~~~
a.cc:14:12: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> arr[i][j];
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:14:7: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
14 | cout >> arr[i][j];
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:14:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> arr[i][j];
| ^
/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:14:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> arr[i][j];
| ^
/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:14:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> arr[i][j];
| ^
/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:14:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> arr[i][j];
| ^
/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:14:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> arr[i][j];
| ^
/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:14:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> arr[i][j];
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]':
a.cc:14:23: required from here
14 | cout >> arr[i][j];
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:18:12: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
18 | cout >> arr[i][j];
| ~~~~ ^~ ~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:18:12: note: candidate: 'operator>>(int, int)' (built-in)
18 | cout >> arr[i][j];
| ~~~~~^~~~~~~~~~~~
a.cc:18:12: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
/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:18:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
18 | cout >> arr[i][j];
| ^
/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:18:7: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
18 | cout >> arr[i][j];
| ^~~~
/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:18:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
18 | cout >> arr[i][j];
| ^
/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:18:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
18 | cout >> arr[i][j];
| ^
/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:18:23: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
18 | cout >> arr[i][j];
| ^
/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 fa |
s763678328 | p03853 | C++ | #include <iostream>
#include <vector>
#include <iterator>
#include <algorithm>
#include <string>
#include <map>
#include <list>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
char c[H][W];
for(int i=0; i<H; ++i){
for(int j=0; j<W; ++j){
cin >> c[i][j];
}
}
char resC[2*H][W];
for(int i=0; i<H; ++i){
for(int j=0; j<W; ++j){
resC[2*i][j]=c[i][j];
resC[2*i+1][j]=c[i][j];
}
}
for(int i=0; i<2*H; ++i){
for(int j=0; j<W; ++j){
cout << resC[i][j];
}
cout << endl;
}
å
}
| a.cc: In function 'int main()':
a.cc:34:3: error: '\U000000e5' was not declared in this scope
34 | å
| ^
|
s361960705 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin>>h>>w;
for(int i=0;i<h;i++){
vector<char> vec(w);
for(int =j=0;j<w;j++){
cin >> vec[j];
cout<<vec[j];
}
for(int =k=0;k<w;k++){
cout <<vec[k];
}
}
} | a.cc: In function 'int main()':
a.cc:10:13: error: expected unqualified-id before '=' token
10 | for(int =j=0;j<w;j++){
| ^
a.cc:10:12: error: expected ';' before '=' token
10 | for(int =j=0;j<w;j++){
| ^~
| ;
a.cc:10:13: error: expected primary-expression before '=' token
10 | for(int =j=0;j<w;j++){
| ^
a.cc:10:14: error: 'j' was not declared in this scope
10 | for(int =j=0;j<w;j++){
| ^
a.cc:10:21: error: expected ')' before ';' token
10 | for(int =j=0;j<w;j++){
| ~ ^
| )
a.cc:10:22: error: 'j' was not declared in this scope
10 | for(int =j=0;j<w;j++){
| ^
a.cc:14:13: error: expected unqualified-id before '=' token
14 | for(int =k=0;k<w;k++){
| ^
a.cc:14:12: error: expected ';' before '=' token
14 | for(int =k=0;k<w;k++){
| ^~
| ;
a.cc:14:13: error: expected primary-expression before '=' token
14 | for(int =k=0;k<w;k++){
| ^
a.cc:14:14: error: 'k' was not declared in this scope
14 | for(int =k=0;k<w;k++){
| ^
a.cc:14:21: error: expected ')' before ';' token
14 | for(int =k=0;k<w;k++){
| ~ ^
| )
a.cc:14:22: error: 'k' was not declared in this scope
14 | for(int =k=0;k<w;k++){
| ^
|
s734839841 | p03853 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>>a>>b;
char c[105];
for(int i=0;i<a;i++){
cin>>c;
printf("%s\n%s",c,c);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:8: error: expected primary-expression before '>' token
5 | cin>>>a>>b;
| ^
|
s372338781 | p03853 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>>a>>b;
string c;
for(int i=0;i<n;i++){
cin>>c;
cout<<c<<c;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:8: error: expected primary-expression before '>' token
5 | cin>>>a>>b;
| ^
a.cc:7:17: error: 'n' was not declared in this scope
7 | for(int i=0;i<n;i++){
| ^
|
s988756835 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
int main(){
ll N, M;
cin >> N >> M;
VS s(N);
rep(i, 0, N){
cin >> s[i];
}
rep(j, 0, 2*N){
cout << s[I] << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:19: error: 'I' was not declared in this scope
16 | cout << s[I] << endl;
| ^
|
s534815954 | p03853 | C++ | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define uni(e) e.erase(unique(e.begin(),e.end()),e.end())
#define double long double
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; }
int INF=1e10;
int MOD=1e9+7;
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void yesno(T b){if(b)out("yes");else out("no");}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
template<class T> void YESNO(T b){if(b)out("YES");else out("NO");}
template<class T> void noyes(T b){if(b)out("no");else out("yes");}
template<class T> void NoYes(T b){if(b)out("No");else out("Yes");}
template<class T> void NOYES(T b){if(b)out("NO");else out("YES");}
int keta(int a){
double b=a;
b=log10(b);
int c=b;
return c+1;
}
int kurai(int a,int b){
int m=pow(10,b),n=pow(10,b-1);
return (a%m)/n;
}
int ketawa(int a){
int k=0;
rep(i,keta(a)){
k+=kurai(a,i+1);
}
return k;
}
int gcd(int a,int b){
if(a%b==0)
return b;
return gcd(b,a%b);
}
int lcm(int a,int b){
return a/gcd(a,b)*b;
}
int mid(int a,int b,int c){
vector<int> k(3);
k[0]=a;k[1]=b;k[2]=c;
sort(all(k));
return k[1];
}
bool sosuu(int a){
bool b=1;
if(a<=1)
return 0;
else{
rep1(i,sqrt(a)-1){
if(a%(i+1)==0)
b=0;
}
return b;
}
}
int modpow(int a,int b,int m=MOD){
if(!b)return 1; if(b&1)return modpow(a,b-1,m)*a%m;
int memo = modpow(a,b>>1,m);
return memo*memo%m;
}
int fact_mod(int n) {
int f=1;
for(int i=2;i<n+1;i++) f=f*(i%MOD)% MOD;
return f;
}
int mod_pow(int x,int n) {
int res=1;
while(n>0){
if(n&1) res=(res*x)%MOD;
x=(x*x)%MOD;
n>>=1;
}
return res;
}
int c_mod(int n, int r) {
if(r>n-r) r=n-r;
if(r==0) return 1;
int a=1;
rep(i,r)
a=a*((n-i)%MOD)%MOD;
int b=mod_pow(fact_mod(r), MOD-2);
return (a%MOD)*(b%MOD)%MOD;
}
signed main(){
int a,b;
cin>>a>>b;
int c[a][b];
rep(i,a)rep(j,b)
cin>>b[i][j];
}
| a.cc: In function 'int main()':
a.cc:100:11: error: invalid types 'long long int[long long int]' for array subscript
100 | cin>>b[i][j];
| ^
|
s912204016 | p03853 | C++ | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define uni(e) e.erase(unique(e.begin(),e.end()),e.end())
#define double long double
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; }
int INF=1e10;
int MOD=1e9+7;
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void yesno(T b){if(b)out("yes");else out("no");}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
template<class T> void YESNO(T b){if(b)out("YES");else out("NO");}
template<class T> void noyes(T b){if(b)out("no");else out("yes");}
template<class T> void NoYes(T b){if(b)out("No");else out("Yes");}
template<class T> void NOYES(T b){if(b)out("NO");else out("YES");}
int keta(int a){
double b=a;
b=log10(b);
int c=b;
return c+1;
}
int kurai(int a,int b){
int m=pow(10,b),n=pow(10,b-1);
return (a%m)/n;
}
int ketawa(int a){
int k=0;
rep(i,keta(a)){
k+=kurai(a,i+1);
}
return k;
}
int gcd(int a,int b){
if(a%b==0)
return b;
return gcd(b,a%b);
}
int lcm(int a,int b){
return a/gcd(a,b)*b;
}
int mid(int a,int b,int c){
vector<int> k(3);
k[0]=a;k[1]=b;k[2]=c;
sort(all(k));
return k[1];
}
bool sosuu(int a){
bool b=1;
if(a<=1)
return 0;
else{
rep1(i,sqrt(a)-1){
if(a%(i+1)==0)
b=0;
}
return b;
}
}
int modpow(int a,int b,int m=MOD){
if(!b)return 1; if(b&1)return modpow(a,b-1,m)*a%m;
int memo = modpow(a,b>>1,m);
return memo*memo%m;
}
int fact_mod(int n) {
int f=1;
for(int i=2;i<n+1;i++) f=f*(i%MOD)% MOD;
return f;
}
int mod_pow(int x,int n) {
int res=1;
while(n>0){
if(n&1) res=(res*x)%MOD;
x=(x*x)%MOD;
n>>=1;
}
return res;
}
int c_mod(int n, int r) {
if(r>n-r) r=n-r;
if(r==0) return 1;
int a=1;
rep(i,r)
a=a*((n-i)%MOD)%MOD;
int b=mod_pow(fact_mod(r), MOD-2);
return (a%MOD)*(b%MOD)%MOD;
}
signed main(){
int a,b;
cin>>a>>b;
int c[a][b];
rep(i,a)rep(j,b)
cin>>b[i][j];
rep(i,2*a){
rep(j,b){
cout<<b[i/2][j];
}
cout<<' '<<endl;
}
} | a.cc: In function 'int main()':
a.cc:100:11: error: invalid types 'long long int[long long int]' for array subscript
100 | cin>>b[i][j];
| ^
a.cc:103:12: error: invalid types 'long long int[long long int]' for array subscript
103 | cout<<b[i/2][j];
| ^
|
s061319118 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
#define pb(s) push_back(s)
#define ALL(v) v.begin(), v.end()
#define ALLA(arr, sz) arr, arr + sz
#define SORT(v) sort(ALL(v))
#define REVERSE(v) reverse(ALL(v))
#define SORTA(arr, sz) sort(ALLA(arr, sz))
#define REVERSEA(arr, sz) reverse(ALLA(arr, sz))
typedef long long ll;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int h,w;
cin>>h>>w;
char grid1[h][w]={0};
for(int i=0;i<h;++i){
for(int j=0;j<w;++j){
cin>>grid1[i][j];
}
}
for(int i=0;i<h;++i){
for(int j=0;j<w;++j){
cout<<grid1[i][j]<<endl;
cout<<grid[i][j]<<endl;
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:31:19: error: 'grid' was not declared in this scope; did you mean 'grid1'?
31 | cout<<grid[i][j]<<endl;
| ^~~~
| grid1
|
s797735196 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cin >> h >> w;
char data[2*h][w];
for(int i=0;i<2h;i+=2){
for(int j=0;j<w;j++){
cin >> data[i][j];
data[i+1][j]=data[i][j];
}
}
for(int i=0;i<2*h;i++){
for(int j=0;j<w;j++){
cout << data[i][j];
}
cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:16: error: no match for 'operator<' (operand types are 'int' and 'std::chrono::hours' {aka 'std::chrono::duration<long int, std::ratio<3600> >'})
8 | for(int i=0;i<2h;i+=2){
| ~^~~
| | |
| | std::chrono::hours {aka std::chrono::duration<long int, std::ratio<3600> >}
| 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: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:8:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: 'std::chrono::hours' {aka 'std::chrono::duration<long int, std::ratio<3600> >'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: 'std::chrono::hours' {aka 'std::chrono::duration<long int, std::ratio<3600> >'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
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:8:17: note: mismatched types 'const std::pair<_T1, _T2>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
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:8:17: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
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:8:17: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: 'std::chrono::duration<long int, std::ratio<3600> >' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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:8:17: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
8 | for(int i=0;i<2h;i+=2){
| ^~
/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<(con |
s823990226 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin>>h>>w;
vector<vector<char>>c(h,vector<int>(w));
for(int i=0;i<h;i++){
for(int j=0;j<w;j++) cin>>c[i][j];
}
for(int k=0;k<2;k++){
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cout<<c[i][j];
if(j==w-1) cout<<endl;
}
}
}
} | a.cc: In function 'int main()':
a.cc:7:41: error: no matching function for call to 'std::vector<std::vector<char> >::vector(int&, std::vector<int>)'
7 | vector<vector<char>>c(h,vector<int>(w));
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: template argument deduction/substitution failed:
a.cc:7:41: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'std::vector<int>')
7 | vector<vector<char>>c(h,vector<int>(w));
| ^
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >]'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:43: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<std::vector<char> >'
678 | vector(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<char> >]'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:23: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<char> >&&'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >; std::false_type = std::false_type]'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >; std::true_type = std::true_type]'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<char> >]'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:28: note: no known conversion for argument 1 from 'int' to 'const std::vector<std::vector<char> >&'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; size_type = long unsigned int; value_type = std::vector<char>; allocator_type = std::allocator<std::vector<char> >]'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:569:47: note: no known conversion for argument 2 from 'std::vector<int>' to 'const std::vector<std::vector<char> >::value_type&' {aka 'const std::vector<char>&'}
569 | vector(size_type __n, const value_type& __value,
| ~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; size_type = long unsigned int; allocator_type = std::allocator<std::vector<char> >]'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:51: note: no known conversion for argument 2 from 'std::vector<int>' to 'const std::vector<std::vector<char> >::allocator_type&' {aka 'const std::allocator<std::vector<char> >&'}
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >]'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 2 provided
|
s236497110 | p03853 | C++ | //#include <bits/stdc++.h>
#include "stdc++.h"
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = s; i < (int)(n); i++)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = max(a, b)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using pii = pair<int, int>;
void solve()
{
int h, w;
cin >> h >> w;
vector<string> v(h);
rep(i, h) cin >> v[i];
rep(i, h) {
cout << v[i] << endl;
cout << v[i] << endl;
}
}
int main(void)
{
ios::sync_with_stdio(0);
cin.tie(0);
solve();
} | a.cc:2:10: fatal error: stdc++.h: No such file or directory
2 | #include "stdc++.h"
| ^~~~~~~~~~
compilation terminated.
|
s002220592 | p03853 | C++ | 9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**......... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 9 20
| ^
|
s882162562 | p03853 | C | 9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**......... | main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 9 20
| ^
|
s476430980 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
vector<vector<char> > vec(H,vector<int>(W));
for (int i=0; i<H; i++) {
for (int j=0; j<W; j++) {
cin >> vec.at(i).at(j);
}
}
vector<vector<char> > ve(2*H,vector<int>(W));
for (int i=0; i<2*H; i++) {
for (int j=0; j<W; j++) {
cout << vec.at(i/2).at(j);
}
cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:45: error: no matching function for call to 'std::vector<std::vector<char> >::vector(int&, std::vector<int>)'
7 | vector<vector<char> > vec(H,vector<int>(W));
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: template argument deduction/substitution failed:
a.cc:7:45: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'std::vector<int>')
7 | vector<vector<char> > vec(H,vector<int>(W));
| ^
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >]'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:43: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<std::vector<char> >'
678 | vector(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<char> >]'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:23: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<char> >&&'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >; std::false_type = std::false_type]'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >; std::true_type = std::true_type]'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<char> >]'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:28: note: no known conversion for argument 1 from 'int' to 'const std::vector<std::vector<char> >&'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; size_type = long unsigned int; value_type = std::vector<char>; allocator_type = std::allocator<std::vector<char> >]'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:569:47: note: no known conversion for argument 2 from 'std::vector<int>' to 'const std::vector<std::vector<char> >::value_type&' {aka 'const std::vector<char>&'}
569 | vector(size_type __n, const value_type& __value,
| ~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; size_type = long unsigned int; allocator_type = std::allocator<std::vector<char> >]'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:51: note: no known conversion for argument 2 from 'std::vector<int>' to 'const std::vector<std::vector<char> >::allocator_type&' {aka 'const std::allocator<std::vector<char> >&'}
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >]'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 2 provided
a.cc:13:46: error: no matching function for call to 'std::vector<std::vector<char> >::vector(int, std::vector<int>)'
13 | vector<vector<char> > ve(2*H,vector<int>(W));
| ^
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: template argument deduction/substitution failed:
a.cc:13:46: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'std::vector<int>')
13 | vector<vector<char> > ve(2*H,vector<int>(W));
| ^
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >]'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:43: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<std::vector<char> >'
678 | vector(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<char> >]'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:23: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<char> >&&'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >; std::false_type = std::false_type]'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> |
s208470925 | p03853 | C++ | 9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**......... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 9 20
| ^
|
s385798471 | p03853 | C++ | h,w=map(int,input().split())
lst=[list(input()) for _ in range(h)]
lst_1=[]
for i in lst:
print(*i)
print(*i) | a.cc:1:1: error: 'h' does not name a type
1 | h,w=map(int,input().split())
| ^
|
s407368257 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
vector<vector<char>> a(N,M);
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
cin >> a(i,j);
}
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
if (j == M-1) {
cout << a.at(i,j) <<endl;
}
else {
cout << a.at(i,j);
}
}
for (int j = 0; j < M; j++) {
if (j == M-1) {
cout << a.at(i,j) <<endl;
}
else {
cout << a.at(i,j);
}
}
}
}
| a.cc: In function 'int main()':
a.cc:7:29: error: no matching function for call to 'std::vector<std::vector<char> >::vector(int&, int&)'
7 | vector<vector<char>> a(N,M);
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/bits/stl_algobase.h:65,
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_iterator_base_types.h: In substitution of 'template<class _InIter> using std::_RequireInputIter = std::__enable_if_t<((bool)std::is_convertible<typename std::iterator_traits< <template-parameter-1-1> >::iterator_category, std::input_iterator_tag>::value)> [with _InIter = int]':
/usr/include/c++/14/bits/stl_vector.h:705:9: required from here
705 | typename = std::_RequireInputIter<_InputIterator>>
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:252:57: error: no type named 'iterator_category' in 'struct std::iterator_traits<int>'
252 | input_iterator_tag>::value>;
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >]'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:43: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<std::vector<char> >'
678 | vector(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<char> >]'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:23: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<char> >&&'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ~~~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >; std::false_type = std::false_type]'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >; std::true_type = std::true_type]'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; std::__type_identity_t<_Alloc> = std::allocator<std::vector<char> >]'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:28: note: no known conversion for argument 1 from 'int' to 'const std::vector<std::vector<char> >&'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; size_type = long unsigned int; value_type = std::vector<char>; allocator_type = std::allocator<std::vector<char> >]'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:569:47: note: no known conversion for argument 2 from 'int' to 'const std::vector<std::vector<char> >::value_type&' {aka 'const std::vector<char>&'}
569 | vector(size_type __n, const value_type& __value,
| ~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; size_type = long unsigned int; allocator_type = std::allocator<std::vector<char> >]'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:51: note: no known conversion for argument 2 from 'int' to 'const std::vector<std::vector<char> >::allocator_type&' {aka 'const std::allocator<std::vector<char> >&'}
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; allocator_type = std::allocator<std::vector<char> >]'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >]'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 2 provided
a.cc:10:15: error: no match for call to '(std::vector<std::vector<char> >) (int&, int&)'
10 | cin >> a(i,j);
| ~^~~~~
a.cc:16:21: error: no matching function for call to 'std::vector<std::vector<char> >::at(int&, int&)'
16 | cout << a.at(i,j) <<endl;
| ~~~~^~~~~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; reference = std::vector<char>&; size_type = long unsigned int]'
1180 | at(size_type __n)
| ^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; const_reference = const std::vector<char>&; size_type = long unsigned int]'
1199 | at(size_type __n) const
| ^~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate expects 1 argument, 2 provided
a.cc:19:21: error: no matching function for call to 'std::vector<std::vector<char> >::at(int&, int&)'
19 | cout << a.at(i,j);
| ~~~~^~~~~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; reference = std::vector<char>&; size_type = long unsigned int]'
1180 | at(size_type __n)
| ^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; const_reference = const std::vector<char>&; size_type = long unsigned int]'
1199 | at(size_type __n) const
| ^~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate expects 1 argument, 2 provided
a.cc:24:21: error: no matching function for call to 'std::vector<std::vector<char> >::at(int&, int&)'
2 |
s182344014 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char arr[200][200];
int h,w;
cin>>h>>w;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>arr[i][j];
}
}
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cout<<arr[i][j]<<" ";
}
cout<<"\n";
for(int k=0;k<w;k++){
cout<<arr[i][k]<<" ";
}
cout<<"\n";
}
cout<<"\n"
return 0;
}
| a.cc: In function 'int main()':
a.cc:24:15: error: expected ';' before 'return'
24 | cout<<"\n"
| ^
| ;
25 | return 0;
| ~~~~~~
|
s725294455 | p03853 | C++ | テスト
言語
ソースコード
cout << endl;
1
#include<bits/stdc++.h>
2
using namespace std;
3
int main(){
4
int h,w;
5
cin >> h >> w;
6
for(int i=0;i<h;i++){
7
vector<char>a(w);
8
for(int r=0;r<w;r++){
9
cin >> a[r];
10
cout << a[r];
11
}
12
cout << endl;
13
for(int r=0;r<w;r++){
14
cout << a[r];
15
}
16
cout << endl;
17
}
18
19
} | a.cc:1:1: error: '\U000030c6\U000030b9\U000030c8' does not name a type
1 | テスト
| ^~~~~~
a.cc:5:1: error: expected unqualified-id before numeric constant
5 | 1
| ^
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:6:
/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 [-fperm |
s290353985 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int h,w; cin>>h>>w;
vector<string> P(h);
rep(i,h) cin>>P.at(i);
rep(i,h){
cout>>P.at(i)>>endl;
cout>>P.at(i)>>endl;
}
} | a.cc: In function 'int main()':
a.cc:12:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'})
12 | cout>>P.at(i)>>endl;
| ~~~~^~~~~~~~~
| | |
| | __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type {aka std::__cxx11::basic_string<char>}
| std::ostream {aka std::basic_ostream<char>}
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:12:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout>>P.at(i)>>endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = std::__cxx11::basic_string<char>&]':
a.cc:12:17: required from here
12 | cout>>P.at(i)>>endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout>>P.at(i)>>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:12:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout>>P.at(i)>>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>>(basi |
s121458326 | p03853 | C++ | using namespace std;
int main()
{
int h,w;
cin>>h>>w;
char c[100][100];
for(int i=0;i<h;i++)
{
for(int j=0;j<w;j++)
{
cin>>c[i][j];
}
}
for(int i=0;i<h;i++)
{
for(int k=0;k<2;k++)
{
for(int j=0;j<w;j++)
{
cout<<c[i][j];
}
cout<<endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin>>h>>w;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:20:13: error: 'cout' was not declared in this scope
20 | cout<<c[i][j];
| ^~~~
a.cc:20:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:14: error: 'cout' was not declared in this scope
22 | cout<<endl;
| ^~~~
a.cc:22:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:20: error: 'endl' was not declared in this scope
22 | cout<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | using namespace std;
|
s373373109 | p03853 | C++ | C:\Users\yuki\CLionProjects\untitled\cmake-build-debug\untitled.exe
9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**..............***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**..*...**.....
.....**..*...**.....
.......*..*.*.......
.......*..*.*.......
........**.*........
........**.*........
.........**.........
.........**.........
Process finished with exit code 0
| a.cc:1:3: error: stray '\' in program
1 | C:\Users\yuki\CLionProjects\untitled\cmake-build-debug\untitled.exe
| ^
a.cc:1:9: error: stray '\' in program
1 | C:\Users\yuki\CLionProjects\untitled\cmake-build-debug\untitled.exe
| ^
a.cc:1:14: error: stray '\' in program
1 | C:\Users\yuki\CLionProjects\untitled\cmake-build-debug\untitled.exe
| ^
a.cc:1:28: error: stray '\' in program
1 | C:\Users\yuki\CLionProjects\untitled\cmake-build-debug\untitled.exe
| ^
a.cc:1:37: error: stray '\' in program
1 | C:\Users\yuki\CLionProjects\untitled\cmake-build-debug\untitled.exe
| ^
a.cc:1:55: error: stray '\' in program
1 | C:\Users\yuki\CLionProjects\untitled\cmake-build-debug\untitled.exe
| ^
a.cc:1:2: error: found ':' in nested-name-specifier, expected '::'
1 | C:\Users\yuki\CLionProjects\untitled\cmake-build-debug\untitled.exe
| ^
| ::
a.cc:1:1: error: 'C' does not name a type
1 | C:\Users\yuki\CLionProjects\untitled\cmake-build-debug\untitled.exe
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.