submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s896751994
p03711
Java
import java.util.Scanner; import java.util.Arrays; import java.util.List; public class Grouping { static List<Integer> A; static List<Integer> B; static List<Integer> C; public static void main(String args[]) { A = Arrays.asList(1, 3, 5, 7, 8, 10, 12); B = Arrays.asList(4, 6, 9, 11);...
Main.java:5: error: class Grouping is public, should be declared in a file named Grouping.java public class Grouping { ^ 1 error
s025993388
p03711
Java
import java.util.Scanner; import java.util.Arrays; public class Class2 { public static void main (String[] args) { Scanner sc = new Scanner(System.in); String x = sc.next(); String y = sc.next(); String x = "1"; String y = "2"; String[] a = {"1","3","5","7","8","10","12"}; String[] b = {"4","6","9","11"...
Main.java:4: error: class Class2 is public, should be declared in a file named Class2.java public class Class2 { ^ Main.java:9: error: variable x is already defined in method main(String[]) String x = "1"; ^ Main.java:10: error: variable y is already defined in method main(String[]) String y = "2"; ...
s349971218
p03711
Java
import java.util.Scanner; import java.util.Arrays; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); String[] a = {"1","3","5","7","8","10","12"}; String[] b = {"4","6","9","11"}; if(x==y){ System.out.print("...
Main.java:13: error: bad operand types for binary operator '==' }else if(x=="2" && y=="2"){ ^ first type: int second type: String Main.java:13: error: bad operand types for binary operator '==' }else if(x=="2" && y=="2"){ ^ first type: int second type: String 2 errors...
s065933565
p03711
Java
package practice; import java.util.Arrays; public class Class2 { public static void main (String[] args) { // Scanner sc = new Scanner(System.in); // int x = sc.nextInt(); // int y = sc.nextInt(); String x = "1"; String y = "2"; String[] a = {"1","3","5","7","8","10","12"}; String[] b = {"4","6","9","11"};...
Main.java:4: error: class Class2 is public, should be declared in a file named Class2.java public class Class2 { ^ 1 error
s149450471
p03711
Java
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int[] a = {1,3,5,7,8,10,12}; int[] b = {4,6,9,11}; if(x==y){ System.out.print("Yes"); }else if(x==2 && y==2){ System.out.prin...
Main.java:14: error: cannot find symbol }else if(a.contains(x)){ ^ symbol: method contains(int) location: variable a of type int[] Main.java:15: error: cannot find symbol if(a.contains(y)){ ^ symbol: method contains(int) location: variable a of type int[] Main.java:18: error: can...
s052633323
p03711
Java
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); String[] a = {1,3,5,7,8,10,12}; String[] b = {4,6,9,11}; if(x==y){ System.out.print("Yes"); }else if(x==2 && y==2){ System.ou...
Main.java:8: error: incompatible types: int cannot be converted to String String[] a = {1,3,5,7,8,10,12}; ^ Main.java:8: error: incompatible types: int cannot be converted to String String[] a = {1,3,5,7,8,10,12}; ^ Main.java:8: error: incompatible types: int cannot be converted to...
s227955377
p03711
Java
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); String[] a = {1,3,5,7,8,10,12}; String[] b = {4,6,9,11}; if(x==y){ System.out.print("Yes"); }else if(x==2 && y==2){ System.ou...
Main.java:25: error: reached end of file while parsing } ^ 1 error
s325701980
p03711
C++
#include <iostream> using namespace std; int judge(int x, int y, int[] a){ int p; p = 0; for (size_t i = 0; i < sizeof(a); i++) { if (a[i] == x || a[i] == y) { p++; } } if (p == 2) { std::cout << "YES" << '\n'; return 0; } return 1; } int main(int argc, char const *argv[]) { int x,y,p; int a[] = ...
a.cc:5:31: error: expected ',' or '...' before 'a' 5 | int judge(int x, int y, int[] a){ | ^ a.cc: In function 'int judge(int, int, int*)': a.cc:8:39: error: 'a' was not declared in this scope 8 | for (size_t i = 0; i < sizeof(a); i++) { | ...
s310451280
p03711
C++
#include "vector" #include "iostream" using namespace std; int main() { int x, y; cin >> x >> y; vector<int> a = { 1, 3, 5, 7, 8, 10, 12 }; vector<int> b = {4, 6, 9, 11}; vector<int> c = {2}; auto rax = find(a.begin(), a.end(), x); auto ray = find(a.begin(), a.end(), y); auto rbx = find(b.begin(), b.end(), x)...
a.cc: In function 'int main()': a.cc:13:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 13 | auto rax = find(a.begin(), a.end(), x); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/locale_fa...
s163355170
p03711
C++
#include<bits/stdc++.h> #define rep(i,start,lim) for(lld i=start;i<lim;i++) #define repd(i,start,lim) for(lld i=start;i>=lim;i--) #define scan(x) scanf("%lld",&x) #define print(x) printf("%lld ",x) #define f first #define s second #define pb push_back #define mp make_pair #define br printf("\n") #define YES printf("YES...
a.cc:30:1: error: expected ',' or ';' before 'int' 30 | int main() | ^~~
s594728833
p03711
C++
import Data.List a1 = [4,6,9,11] main = do [x,y] <- map read . words <$> getLine putStrLn $ solve x y solve :: Int -> Int -> String solve x y | tt x == tt y = "Yes" | otherwise = "No" tt :: Int -> Int tt 2 = 0 tt x | t == Nothing = 2 | otherwise = 1 where t = find (x==) a1
a.cc:1:1: error: 'import' does not name a type 1 | import Data.List | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s172734718
p03711
Java
import java.util.Scanner; class Main { public static void main (String[] args) { Scanner scanner = new Scanner(System.in); String x = scanner.next(); String y = scanner.next(); if(x == 2 ) { x = a; } else if(x == 4 || x == 6 || x == 9 || x == 11) { x = b; } else { x = c; } if(y == 2 ) { y = a; } else if(y...
Main.java:10: error: bad operand types for binary operator '==' if(x == 2 ) { ^ first type: String second type: int Main.java:11: error: cannot find symbol x = a; ^ symbol: variable a location: class Main Main.java:12: error: bad operand types for binary operator '==' } else if(x == 4 || x == 6 || x...
s521802187
p03711
Java
import java.util.Scanner; class Main { public static void main (String[] args) { Scanner scanner = new Scanner(System.in); String x = scanner.next(); String y = scanner.next(); if(x == 2 ) { x = a; } else if(x == 4 || x == 6 || x == 9 || x == 11) { x ==b; } else { x == c; } if(y == 2 ) { y = a; } else if(y ==...
Main.java:13: error: not a statement x ==b; ^ Main.java:15: error: not a statement x == c; ^ Main.java:21: error: not a statement y ==b; ^ Main.java:23: error: not a statement y == c; ^ 4 errors
s985659968
p03711
C++
// ConsoleApplication1.cpp : Defines the entry point for the console application. // #include <iostream> #include <vector> using namespace std; // void debug(vector<int> *v) // { // cout << "debug :"; // for (int i = 0; i<v->size(); i++) // cout << " " << v->at(i); // cout << endl; // } int vector_finder(vector...
a.cc: In function 'int vector_finder(std::vector<int>, int)': a.cc:17:24: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 17 | auto itr = find(vec.begin(), vec.end(), number); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file ...
s308933860
p03711
C++
#include <iostream> using namespace std; int main(){ int x,y; int a[13] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; cin >> x >> y; if (a[x] == a[y]){ cout << "Yes" << endl; }else{ cout << "No" << endl; } return0; }
a.cc: In function 'int main()': a.cc:14:3: error: 'return0' was not declared in this scope 14 | return0; | ^~~~~~~
s352401373
p03711
C++
#include <iostream> using namespace std; int main(){ int x,y; int a[13] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; cin >> x >> y; if(a[x] == a[y]){ cout << "Yes" << endl; }else{ cout << "No" << endl; } return0; }
a.cc: In function 'int main()': a.cc:14:3: error: 'return0' was not declared in this scope 14 | return0; | ^~~~~~~
s574707887
p03711
C++
#include <iostream> using namespace std; int main(){ int x,y; int a[13] = {-1,0,2,0,1,0,10,0,1,0,1,0}; cin >> x >> y; if(a[x] == a[y]){ cout << "Yes" << endl; }else{ cout << "No" << endl; } return0; }
a.cc: In function 'int main()': a.cc:14:3: error: 'return0' was not declared in this scope 14 | return0; | ^~~~~~~
s099465960
p03711
C++
#include <iostream> using namespace std; int main(){ int x,y; int a[] = {-1,0,2,0,1,0,10,0,1,0,1,0}; cin >> x >> y; if(a[x] == a[y]){ cout << "Yes" << endl; }else{ cout << "No" << endl; } return0; }
a.cc: In function 'int main()': a.cc:14:3: error: 'return0' was not declared in this scope 14 | return0; | ^~~~~~~
s814958428
p03711
C++
#include <iostream> using namespace std; int a[] = {-1,0,2,0,1,0,10,0,1,0,1,0}; int main(){ int x,y; cin >> x >> y; if(a[x] == a[y]){ cout << "Yes" << endl; }else{ cout << "No" << endl; } return0; }
a.cc: In function 'int main()': a.cc:14:3: error: 'return0' was not declared in this scope 14 | return0; | ^~~~~~~
s614818690
p03711
C++
#include<iostream> #include<vector> using namespace std; void debug(vector<int> *v) { cout << "debug :"; for (int i = 0; i<v->size(); i++) cout << " " << v->at(i); cout << endl; } int vector_finder(std::vector<int> vec, int number) { auto itr = std::find(vec.begin(), vec.end(), number); size_t index = std::dis...
a.cc: In function 'int vector_finder(std::vector<int>, int)': a.cc:14:29: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 14 | auto itr = std::find(vec.begin(), vec.end(), number); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s598250237
p03711
C++
#include<iostream> using namespace std; char a[100][101], b[102][102]; int main() { int h, w; cin >> h >> w; for(int i = 0; i < h; i++) { scanf("%s", a[i]); } for(int i = 0; i < h+2; i++){ for(int j = 0; j < w+2; j++){ b[i][j] = '#'; } } for(int i = 0...
a.cc: In function 'int main()': a.cc:28:29: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream' {aka 'std::basic_ostream<char>'}) 28 | cout << b[i][j] << cout; | ~~~~~~~~~~~~~~~ ^~ ~~~~ | | | | ...
s600449938
p03711
C++
int a[] = {-1, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0}; int main(void) { int x, y; cin >> x >> y; if(a[x] == a[y]) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope 4 | cin >> x >> y; | ^~~ a.cc:7:17: error: 'cout' was not declared in this scope 7 | cout << "Yes" << endl; | ^~~~ a.cc:7:34: error: 'endl' was not declared in this s...
s421180740
p03711
C++
int a[] = {-1, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0} int main(void) { int x, y; cin >> x >> y; if(a[x] == a[y]) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
a.cc:2:1: error: expected ',' or ';' before 'int' 2 | int main(void) { | ^~~
s271530605
p03711
C++
int a[] = {-1, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0} int main(void) { int x, y; cin >> x >> y; if(a[x] == a[y]) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
a.cc:2:1: error: expected ',' or ';' before 'int' 2 | int main(void) { | ^~~
s453118721
p03711
C++
#include <iostream> #include <algorithm> #include <numeric> using namespace std; int main() { long long n; cin >> n; vector<long long> a; for(long long i=0; i<3*n; i++) { long long j; cin >> j; a.push_back(j); } for(long long i=0; i<n; i++) { auto left_min = min_element(a.begin(), a.begin(...
a.cc: In function 'int main()': a.cc:10:3: error: 'vector' was not declared in this scope 10 | vector<long long> a; | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <numeric> +++ |+#include <vector> 4 | a....
s935405072
p03711
C++
#include<cstdio> #include<cstring> #include<iostream> #include<set> using namespace std; int main(){ int x, y; cin >> x >> y; set<int>s1, s2, s3; int a[] = {1, 3, 4, 7, 8, 10, 12}, b[] = {4, 6, 9, 11}, c[] = {2}; for(int i = 0; i<strlen(a); ++i)s1.insert(a[i]); for(int i = 0; i<strlen(b); ++i)s1.inser...
a.cc: In function 'int main()': a.cc:11:28: error: cannot convert 'int*' to 'const char*' 11 | for(int i = 0; i<strlen(a); ++i)s1.insert(a[i]); | ^ | | | int* In file included from /usr/include/c++/14/cstring:43, ...
s923530353
p03711
C++
#include<cstdio> #include<cstring> #include<iostream> using namespace std; int main(){ int x, y; cin >> x >> y; set<int>s1, s2, s3; int a[] = {1, 3, 4, 7, 8, 10, 12}, b[] = {4, 6, 9, 11}, c[] = {2}; for(int i = 0; i<strlen(a); ++i)s1.insert(a[i]); for(int i = 0; i<strlen(b); ++i)s1.insert(b[i]); fo...
a.cc: In function 'int main()': a.cc:8:4: error: 'set' was not declared in this scope 8 | set<int>s1, s2, s3; | ^~~ a.cc:4:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 3 | #include<iostream> +++ |+#include <set> 4 | using namespace std; ...
s965802856
p03711
C++
#include<cstdio> using namespace std; int main(){ int x, y; cin >> x >> y; set<int>s1, s2, s3; int a[] = {1, 3, 4, 7, 8, 10, 12}, b[] = {4, 6, 9, 11}, c[] = {2}; for(int i = 0; i<strlen(a); ++i)s1.insert(a[i]); for(int i = 0; i<strlen(b); ++i)s1.insert(b[i]); for(int i = 0; i<strlen(c); ++i)s1.inse...
a.cc: In function 'int main()': a.cc:5:4: error: 'cin' was not declared in this scope 5 | cin >> x >> y; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ |+#include <iostream> 2 | using namespa...
s690423508
p03711
C++
#include<cstdio> #include<> using namespace std; int main(){ int x, y; cin >> x >> y; set<int>s1, s2, s3; int a[] = {1, 3, 4, 7, 8, 10, 12}, b[] = {4, 6, 9, 11}, c[] = {2}; for(int i = 0; i<strlen(a); ++i)s1.insert(a[i]); for(int i = 0; i<strlen(b); ++i)s1.insert(b[i]); for(int i = 0; i<strlen(c); ...
a.cc:2:9: error: empty filename in #include 2 | #include<> | ^~ a.cc: In function 'int main()': a.cc:6:4: error: 'cin' was not declared in this scope 6 | cin >> x >> y; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <ios...
s294092124
p03711
Java
import java.util.*; public class Main { public static void main(String []args) { Scanner sc = new Scanner(System.in); int m = sc.nextInt(); int n = sc.nextInt(); Main soln = new Main(); System.out.println((soln.jd(m,n))? 'Yes':'No'); } private boolean jd(int m, int n) { if(m==2 || n==2) return false; ...
Main.java:9: error: unclosed character literal System.out.println((soln.jd(m,n))? 'Yes':'No'); ^ Main.java:9: error: not a statement System.out.println((soln.jd(m,n))? 'Yes':'No'); ^ Main.java:9: error: ';' expected System.out.println((so...
s076352098
p03711
Java
public class Hoge{ public static void main(String[] args){ int x = Integer.parseInt(args[0]); int y = Integer.parseInt(args[1]); int group1[] = new int[10]; int group2[] = new int[10]; int x_group = 0; int y_group = 0; for(int i=0;i < 7;i++){ if(x == group1[i]){ x_group = 1; }else if(x == group2[i])...
Main.java:1: error: class Hoge is public, should be declared in a file named Hoge.java public class Hoge{ ^ 1 error
s148159014
p03711
Java
public class Hoge{ public static void main(String[] args){ int x = Integer.parseInt(args[0]); int x = Integer.parseInt(args[0]); int group1[10] = {1,3,5,7,8,10,12}; int group2[10] = {4,6,9,11}; int x_group; int y_group; for(int i=0;i=7;i++){ if(x == group1[i]){ x_group = 1; }else if(x == group2[i]){ ...
Main.java:6: error: ']' expected int group1[10] = {1,3,5,7,8,10,12}; ^ Main.java:6: error: not a statement int group1[10] = {1,3,5,7,8,10,12}; ^ Main.java:6: error: ';' expected int group1[10] = {1,3,5,7,8,10,12}; ^ Main.java:7: error: ']' expected int group2[10] =...
s435477023
p03711
Java
public class Hoge{ public static void main(String[] args){ int x = Integer.parseInt(args[0]); int x = Integer.parseInt(args[0]); int group1[7] = {1,3,5,7,8,10,12}; int group2[4] = {4,6,9,11}; int x_group; int y_group; for(int i=0;i=7;i++){ if(x == group1[i]){ x_group = 1; }else if(x == group2[i]){ ...
Main.java:6: error: ']' expected int group1[7] = {1,3,5,7,8,10,12}; ^ Main.java:6: error: not a statement int group1[7] = {1,3,5,7,8,10,12}; ^ Main.java:6: error: ';' expected int group1[7] = {1,3,5,7,8,10,12}; ^ Main.java:7: error: ']' expected int group2[4] = {4,6,...
s479267291
p03711
C
#include "stdafx.h" #include <stdio.h> int main(void) { int x = 0; int y = 0; int i = 0; int group_1[] = { 1,3,5,7,8,10,12 }; int group_2[] = { 4,6,9,11 }; printf("x,yの値を入力\n"); scanf("%d%d", &x, &y); switch (x) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: for (i = 0; i <...
main.c:2:10: fatal error: stdafx.h: No such file or directory 2 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s053793799
p03711
C
#include "stdafx.h" #include <stdio.h> #include <stdlib.h> int main(void) { int x = 0; int y = 0; int i = 0; int group_1[] = { 1,3,5,7,8,10,12 }; int group_2[] = { 4,6,9,11 }; printf("x,yの値を入力\n"); scanf("%d%d", &x, &y); switch (x) { case 1: case 3: case 5: case 7: case 8: case 10: case 1...
main.c:2:10: fatal error: stdafx.h: No such file or directory 2 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s374645684
p03711
C++
import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); sc.close(); HashSet<Integer> group1 = new HashSet<Integer>(); HashSet<Integer> group2 = new HashSet<Integer>(); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.HashSet; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-...
s781078083
p03711
C++
import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); sc.close(); HashSet<Integer> group1 = new HashSet<Integer>(); HashSet<Integer> group2 = new HashSet<Integer>(); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.HashSet; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-...
s086894656
p03711
C
#include "stdafx.h" #include <stdio.h> int main() { int a[] = { 0,1,3,1,2,1,2,1,1,2,1,2,1 }; int x, y; scanf("%d", &x); scanf("%d", &y); if (a[x] == a[y]) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
main.c:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s322402828
p03711
C++
#include "stdafx.h" #include <stdio.h> int main() { int a[] = { 0,1,3,1,2,1,2,1,1,2,1,2,1 }; int x, y; scanf("%d", &x); scanf("%d", &y); if (a[x] == a[y]) { printf("YES\n"); } else { printf("NO\n"); } return 0; }
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s973122969
p03711
Java
import java.util.Scanner; public class Todo { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); if (x == 2 && y == 2) { System.out.println("Yes"); } else if ((x == 1 || x == 3 || x == 5 || x == 7 || x == 8...
Main.java:3: error: class Todo is public, should be declared in a file named Todo.java public class Todo { ^ 1 error
s247175619
p03711
C++
#include <functional> #include <iostream> #include <queue> #include <sstream> #include <stdio.h> #include <stdlib.h> #include <string> #include <valarray> #include <vector> std::vector<std::string> GetInputValues(); std::valarray<int> DeriveSumArr1(); std::valarray<int> DeriveSumArr2(); std::string InputPattern = "In...
a.cc: In function 'int main()': a.cc:79:16: error: 'INT_MIN' was not declared in this scope 79 | int Answer=INT_MIN; | ^~~~~~~ a.cc:9:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #include <valarray> +++ |+#include <cli...
s193692888
p03711
C
#include<stdio.h> int main(){ int num[12]={0,2,0,1,,1,0,0,1,0,1,0}; int x,y; scanf("%d%d",&x,&y); if(num[x]==num[y]) printf("Yes\n"); else printf("No\n"); return 0; }
main.c: In function 'main': main.c:4:30: error: expected expression before ',' token 4 | int num[12]={0,2,0,1,,1,0,0,1,0,1,0}; | ^
s103618565
p03711
C++
#include <stdio.h> int main(){ int H,W; int square; scanf("%d %d",&H,&W); /* <=W=> ^ | H | v */ if(H%3==0 || W%3==0){ printf("0\n"); return 0; } //縦で分ける /* A B A C */ square=(W/2)*H;//big square=square-(H*W-(W-(W/2))*H/2-square);//big - small //横 /* A A B C *...
a.cc: In function 'int main()': a.cc:32:48: error: expected ')' before ';' token 32 | square=(H/2)*W-(H*W-(H-(H/2))*W/2-((H/2)*W); | ~ ^ | )
s216184728
p03711
C++
# include <iostream> # include <algorithm> # include <vector> using namespace std; int main(){ std::vector<std::vector<int>> G{{1, 3, 5, 7 ,8 ,10 ,12}, {4, 6, 9, 11},{2}}; bool frag = true int x,y; cin >> x >> y; for(int i=0;i<3;i++){ auto f1 = find(G[i].begin(),G[i].end(),x); auto f2 = find(G[i].begi...
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'int' 8 | int x,y; | ^~~ a.cc:9:10: error: 'x' was not declared in this scope 9 | cin >> x >> y; | ^ a.cc:9:15: error: 'y' was not declared in this scope 9 | cin >> x >> y; | ^
s402792873
p03711
C++
# include <iostream> # include <algorithm> # include <vector> using namespace std; int main(){ std::vector<std::vector<int>> G{{1, 3, 5, 7 ,8 ,10 ,12}, {4, 6, 9, 11},{2}}; bool frag = true int x,y; cin >> x >> y; for(int i=0;i<3;i++){ auto f1 = find(G[i].begin(),G[i].end(),x); auto f2 = find(G[i].begi...
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'int' 8 | int x,y; | ^~~ a.cc:9:10: error: 'x' was not declared in this scope 9 | cin >> x >> y; | ^ a.cc:9:15: error: 'y' was not declared in this scope 9 | cin >> x >> y; | ^ a.cc:1...
s223296503
p03711
C++
# include <iostream> # include <algorithm> # include <vector> using namespace std; int main(){ std::vector<std::vector<int>> G{{1, 3, 5, 7 ,8 ,10 ,12}, {4, 6, 9, 11},{2}}; bool frag = true int x,y; cin >> x >> y; for(int i=0;i<3;i++){ auto f1 = find(G[i].begin(),G[i].end(),x); auto f2 = find(G[i].begi...
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'int' 8 | int x,y; | ^~~ a.cc:9:10: error: 'x' was not declared in this scope 9 | cin >> x >> y; | ^ a.cc:9:15: error: 'y' was not declared in this scope 9 | cin >> x >> y; | ^ a.cc:1...
s385920332
p03711
C
#include <stdio.h> long int returnGAP(long int w,long int h){ long int ww, hh,s1,nowmin; if(w%3==0)return 0; ww =w/3;//以下Bなら hh = h/2; nowmin = (h-hh)*(w-ww) -(h*ww); s2 =(w-ww); if(s2>nowmin)nowmin=s2; ww++; s1 = (h*ww) -(hh*(w-ww)); if(s1<nowmin)nowmin=s1; s2 =(w-ww); if(s2>s1 && s1==nowmin)nowmin=s2; re...
main.c: In function 'returnGAP': main.c:8:9: error: 's2' undeclared (first use in this function); did you mean 's1'? 8 | s2 =(w-ww); | ^~ | s1 main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
s310714204
p03711
C++
# include <iostream> # include <algorithm> # include <vector> using namespace std; int main(){ std::vector<std::vector<int>> G{{1, 3, 5, 7 ,8 ,10 ,12}, {4, 6, 9, 11},{2}}; int x,y; cin >> x >> y; for(int i=0;i<2;i++){ auto f1 = find(G[i].begin(),G[i].end(),x); auto f2 = find(G[i].begin(),G[i].end(),y);...
a.cc: In function 'int main()': a.cc:13:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__normal_iterator<int*, std::vector<int> >') 13 | cout << f1 << f2 << endl; | ~~~~ ^~ ~~ | | | | | __gnu_cxx::_...
s768267046
p03711
C++
# include <iostream> # include <algorithm> # include <vector> using namespace std; int main(){ std::vector<std::vector<int>> G{{1, 3, 5, 7 ,8 ,10 ,12}, {4, 6, 9,11},{2}}; int x,y; cin >> x >> y; for(int i=0;i<2;i++){ bool frag1 = find(G.begin(),G.end(),x); bool frag2 = find(G.begin(),G.end(),y); if...
a.cc: In function 'int main()': a.cc:11:22: error: cannot convert '__gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >' to 'bool' in initialization 11 | bool frag1 = find(G.begin(),G.end(),x); | ~~~~^~~~~~~~~~~~~~~~~~~~~ | | | ...
s297591871
p03711
C++
#include <iostream> int main(void){ int y,x; cin >> y >> x; int arr[13] = {0,1,2,1,3,1,3,1,1,3,1,3,1}; if(arr[y] == arr[x]) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> y >> x; | ^~~ | 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; ...
s710536325
p03711
C++
#include <iostream> #include <algorithm> #include <functional> #include <cstdlib> #include <sstream> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <deque> #include <complex> #include <vector> #include <cstdio> #include <cmath> #include <time.h> #define all(c) ((c).begin(),(c...
a.cc: In function 'int main()': a.cc:35:63: error: expected ';' before '}' token 35 | if (x == 2 || y == 2) { cout << "No" << endl; return 0 } | ^~ | ;
s503869522
p03711
C++
#include <iostream> using namespace std; int main(){ int x,y; cin >> x >> y; if(x==1 || x==3 || x==5 || x==7 || x==8 || x==10 || x==12){ if(y==1 || y==3 || y==5 || y==7 || y==8 || y==10 || y==12)printf("Yes"\n); }else if(x==4 || x==6 || x==9 || x==11){ if(y==4 || y==6 || y==9 || y==11)printf...
a.cc:7:77: error: stray '\' in program 7 | if(y==1 || y==3 || y==5 || y==7 || y==8 || y==10 || y==12)printf("Yes"\n); | ^ a.cc: In function 'int main()': a.cc:7:77: error: expected ')' before 'n' 7 | if(y==1 || y==3 ||...
s607485334
p03711
C++
#include <iostream> #include<algorithm> #include <vector> #include <complex> #include <map> using namespace std; int main() { int s1[7]={1,3,5,7,8,10,12}; int s2[4]={4,6,9,11,13,13,13}; int s3[2]={2,0,0,0,0,0,0}; int x,y; cin>>x>>y; for(int i=0;i<7;++i){ if(x==s1[i]&&y==s1[i]){cout<<"Yes"<<endl;} else if(x==...
a.cc: In function 'int main()': a.cc:10:37: error: too many initializers for 'int [4]' 10 | int s2[4]={4,6,9,11,13,13,13}; | ^ a.cc:11:33: error: too many initializers for 'int [2]' 11 | int s3[2]={2,0,0,0,0,0,0}; | ^
s561507288
p03711
C++
// // main.cpp // B_PictureFrame // // Created by user1 on 2017/05/20. // Copyright © 2017年 user1. All rights reserved. // #include <iostream> int H, W; char a[100+ 2][100 + 2]; void init(){ for(int h = 0; h<100+2; h++){ for(int w=0; w<100+2; w++){ a[h][w] = '0'; } } } void inp...
a.cc: In function 'void input()': a.cc:32:14: error: 'strcpy' is not a member of 'std' 32 | std::strcpy(&(a[ind+1][1]), buff.c_str()); | ^~~~~~
s918833904
p03711
C++
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] s = br.readLine().split(" "); int a = Integer.parseInt(s[0]); int b = Integer.parseInt(s[1]); if((isGPA(a) && ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: ...
s744779020
p03711
C++
int main(){ int x,y; scanf("%d %d",&x,&y); switch(x){ case 1: case 3: case 5: case 7: case 8: case 10: case 12: if (y==1||y==3||y==5||y==7||y==8||y==10||y==12) printf("Yes\n"); else printf("No\n"); break; case 4: ...
a.cc: In function 'int main()': a.cc:3:5: error: 'scanf' was not declared in this scope 3 | scanf("%d %d",&x,&y); | ^~~~~ a.cc:12:57: error: 'printf' was not declared in this scope 12 | if (y==1||y==3||y==5||y==7||y==8||y==10||y==12) printf("Yes\n"); | ...
s322550623
p03711
C++
#include<iostream> using namespace std; int main(){ int x,y,p,q; int a[] = {1,3,5,7,8,10,12},b[]={4,6,9,11}; cin>>x>>y; if(x==y) break; for(int i=0; i<7; i++){ if(x==a[i]){ p=0; break; } } for(int j=0; j<7; j++){ if(y==a[j]) { q=0; break; } } for(int c=0; c<4; c...
a.cc: In function 'int main()': a.cc:9:12: error: break statement not within loop or switch 9 | if(x==y) break; | ^~~~~
s175717296
p03711
C
#include <stdio.h> int main(void) { int x, y; int a[]={1,3,5,7,8,10,12}; int b[]={4,6,7,9,10}; scanf("%d", &x); scanf("%d", &y); for(int i = 0;;i++) { if(a[i]==x&&a[i==y]){ pritf("Yes"); break; }else if(b[i]==x&&b[i]==y){ printf("Yes"); break; }else if(x==2&&y==2){ printf("Yes"); brea...
main.c: In function 'main': main.c:14:25: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration] 14 | pritf("Yes"); | ^~~~~ | printf
s244043199
p03711
Java
import java.util.*; public class Grouping { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int a = 1, b = 2, c = 3; if(x == 2) { x = a; } else if(x == 4 || x == 6 || x == 9 || x == 11) { x = b; } else ...
Main.java:3: error: class Grouping is public, should be declared in a file named Grouping.java public class Grouping { ^ 1 error
s586636331
p03711
C++
#include <vector> #include <algorithm> class Grouping { public: Grouping() {}; int serch(int x) { std::vector<int>::iterator itr; itr = find(groupe1.begin(), groupe1.end(), x); if (itr != groupe1.end()) { return 1; } itr = find(groupe2.begin(), groupe2.end(), x); if (itr != groupe2.end()) { retur...
a.cc: In function 'int main()': a.cc:32:14: error: 'cin' is not a member of 'std' 32 | std::cin >> x >> y; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <algorithm> +++ |+#include <iostream> ...
s923085946
p03711
C
#include <stdio.h> int main(void) { int x, y; int a[]={1,3,5,7,8,10,12}; int b[]={4,6,7,9,10}; scanf("%d %d",&x, &y); for(int i = 0;;i++) { if(a[i]==x&&a[i==y]){ pritf("Yes"); }else if(b[i]==x&&b[i]==y){ printf("Yes"); }else if(x==2&&y==2){ printf("Yes"); }else{ printf("No"); } } retu...
main.c: In function 'main': main.c:13:25: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration] 13 | pritf("Yes"); | ^~~~~ | printf
s420837331
p03711
C++
#include "stdafx.h" #include<iostream> using namespace std; int main() { int n,m,g1,g2; cin >> n; if (n == 1 || n == 3 || n == 5 || n == 7 || n == 8 || n == 10 || n == 12) { g1 = 1; } else if (n == 4 || n == 6 || n == 9 || n == 11) { g1 = 2; } else { g1 == 3; } cin >> n; if (n == 1 || n == 3 || n =...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s458414540
p03711
C++
// Grouping.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include "stdafx.h" #include<iostream> using namespace std; int main() { int n,m,g1,g2; cin >> n; if (n == 1 || n == 3 || n == 5 || n == 7 || n == 8 || n == 10 || n == 12) { g1 = 1; } else if (n == 4 || n == 6 || n == 9 || n == 11) { g1 = 2; } else {...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s763802507
p03711
C++
// clang-format off #include <bits/stdc++.h> #include<string> #define rep(i, n) for(int i = 0; i < (n); i++) using namespace std; // clang-format on int main() { int x, y; cin >> x >> y; if (x == 2 || y == 2) { cout << "No" << endl; } else if (x == 4) { if (y == 6) { cout << "Yes"...
a.cc: In function 'int main()': a.cc:38:5: error: expected '}' before 'else' 38 | else if (x == 11) { | ^~~~ a.cc:32:22: note: to match this '{' 32 | } else if (x == 9) { | ^ a.cc: At global scope: a.cc:41:5: error: expected unqualified-id before 'else' 41 | } else ...
s978168783
p03711
C++
#include<iostream> #include<string> using namespace std; int A() { int a; int b; cin >> a >> b; int ga=0; switch (a) { case 1: case 3: case 5: case 7: case 8:case 10:case 12: ga = 1; break; case 4:case 6:case 9:case 11: ga = 2; break; case 2: ga = 3; break; } int gb = 0; switch (b) { cas...
/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
s956304633
p03711
C++
#include <stdio.h> int main() { int x, y; int a[]={1,3,5,7,8,10,12}; int b[]={4,6,7,9,10}; scanf("%d %d",x, y); for(int i = 0;;i++) { if(a[i]==x&&a[i==y]){ pritf("Yes"); }else if(b[i]==x&&b[i]==y){ printf("Yes"); }else if(x==2&&y==2){ printf("Yes"); }else{ printf("No"); } return 0; }
a.cc: In function 'int main()': a.cc:13:25: error: 'pritf' was not declared in this scope; did you mean 'printf'? 13 | pritf("Yes"); | ^~~~~ | printf a.cc:23:2: error: expected '}' at end of input 23 | } | ^ a.cc:4:1: note:...
s612972799
p03711
C++
#include<iostream> using namespace std; int set[100]; int findSet(int x){ if (x == set[x]) return x; else return set[x] = findSet(set[x]); } void unionSet(int x,int y) { int fx = findSet(x); int fy = findSet(y); set[fy] = fx; } int main(){ int m,n; cin>>m>n; for (int i =...
a.cc: In function 'int main()': a.cc:18:11: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 18 | cin>>m>n; | ~~~~~~^~ | | | | | int | std::basic_istream<char>::__istream_...
s538708485
p03711
C++
#include <iostream> using namespace std; int main() { cin >> x >> y; if(x==2){ if(y==2){ cout << "Yes"; }else{ cout << "No"; } }else{ if((x==4)||(x==6)||(x==9)||(x==11)){ if((y==4)||(y==6)||(y==9)||(y==11)){ cout << "Yes"; }else{ cout << "No"; } }else{ if((y==3)||(y==1)||(y==5)||...
a.cc: In function 'int main()': a.cc:5:16: error: 'x' was not declared in this scope 5 | cin >> x >> y; | ^ a.cc:5:21: error: 'y' was not declared in this scope 5 | cin >> x >> y; | ^
s921220594
p03711
C++
(defun solver () (let* ((x (read)) (y (read)) (a 1) (b 2) (c 3) (array (vector 0 a c a b a b a a b a b a))) (if (= (svref array x) (svref array y)) (format t "YES~%") (format t "NO~%")))) (solver)
a.cc:1:7: error: expected ')' before 'solver' 1 | (defun solver () | ~ ^~~~~~~ | )
s706168807
p03711
Java
for (int i : a) { if (i == x) { tmpX = 1; } if (i == y) { tmpY = 1; } }
Main.java:2: error: class, interface, enum, or record expected for (int i : a) { ^ Main.java:5: error: class, interface, enum, or record expected } ^ Main.java:8: error: class, interface, enum, or record expected } ^ 3 errors
s172543189
p03711
C++
#include <cstdio> #include <iostream> #include <string> int main() { int x, y; scanf("%d%d", &x, &y); int group[] = { 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0 }; if (gropu[x - 1] == gropu[y - 1]) { puts("Yes"); } else { puts("No"); } }
a.cc: In function 'int main()': a.cc:9:9: error: 'gropu' was not declared in this scope; did you mean 'group'? 9 | if (gropu[x - 1] == gropu[y - 1]) { | ^~~~~ | group
s307373811
p03711
C++
#include<bits/stdc++.h> using namespace std; int a[12] = {1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; int main() { int x, y; cin >> x >> y; cout << (a[x-1] == a[y-1] ? "Yes" : "No") << endl; return 0; } #include<bits/stdc++.h> using namespace std; int a[12] = {1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; int ma...
a.cc:15:5: error: redefinition of 'int a [12]' 15 | int a[12] = {1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; | ^ a.cc:4:5: note: 'int a [12]' previously defined here 4 | int a[12] = {1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; | ^ a.cc:16:5: error: redefinition of 'int main()' 16 | int main() { | ...
s795851931
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; vector <vector<int>> data(A, vector<int>(B)) for (int i=0; i<A; i++) { for (int j=0; j<B; j++) { cin >> data.at(i).at(j); } } int i=0; while (i<B+2) { cout << "#"; i++; } cout << endl; ...
a.cc: In function 'int main()': a.cc:9:3: error: expected ',' or ';' before 'for' 9 | for (int i=0; i<A; i++) { | ^~~ a.cc:9:17: error: 'i' was not declared in this scope 9 | for (int i=0; i<A; i++) { | ^
s845851914
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; vector <vector<int>> data(A, vector<int>(B)) for (int i=0; i<A; i++) { for (int j=0; j<B; j++) { cin >> data.at(i).at(j); } } int i=0; while (i<B+2) { cout << #; i++; } cout << endl; ...
a.cc:17:13: error: stray '#' in program 17 | cout << #; | ^ a.cc:24:13: error: stray '#' in program 24 | cout << #; | ^ a.cc:28:13: error: stray '#' in program 28 | cout << # << endl; | ^ a.cc:33:13: error: stray '#' in program 33 | cout ...
s191189587
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int h,w = 0; cin >> h >> w; vector<string> str(h); for(int i=0;i<h;i++){ cin >> str.at(i); } for(int i=0;i<w+2;i++){ cout << "#"; } cout << endl; for(int i=0;i<h;i++){ cout << "#" + str.at(j) + "#"; } cout << endl; ...
a.cc: In function 'int main()': a.cc:18:26: error: 'j' was not declared in this scope 18 | cout << "#" + str.at(j) + "#"; | ^
s446169705
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int H, W; cin >> H >> w; vector<string> a(H); for (int i = 0; i < W; i++) { cin >> a.at(i); } for (int i = 0; i < W + 2; i++) { cout << "#" << endl; } for (int i = 0; i < H; i++) { cout << "#" << a.at(i) << "#" << endl;...
a.cc: In function 'int main()': a.cc:6:15: error: 'w' was not declared in this scope 6 | cin >> H >> w; | ^
s756444396
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int h, w; cin >> h >> w; for(int i = 0; i<w; i++){ cout<<"#"; } for(int i = 0; i < h; i++){ cout<<endl<<"#"; for(int j = 0; j < w; j++){ vector<int> vec(w); cin >> vec.at(j); cout<< vec.at(j); } cout<<"...
a.cc: In function 'int main()': a.cc:21:24: error: 'W' was not declared in this scope 21 | for(int i = 0; i<W; i++){ | ^
s914518601
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int h, w; cin >> h >> w; for(int i = 0; i<w; i++{ cout<<"#"; } for(int i = 0; i < h; i++){ cout<<endl<<"#"; for(int j = 0; j < w; j++){ vector<int> vec(w); cin >> vec.at(j); cout<< vec.at(j); } cout<<"#...
a.cc: In function 'int main()': a.cc:8:26: error: expected ')' before '{' token 8 | for(int i = 0; i<w; i++{ | ~ ^ | ) a.cc:21:24: error: 'W' was not declared in this scope 21 | for(int i = 0; i<W; i++{ | ^ a.cc:21:3...
s199117993
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int h, w; cin >> h >> w; for(int i = 0; i<W; i++{ cout<<"#"; } for(int i = 0; i < h; i++){ cout<<endl<<"#"; for(int j = 0; j < w; j++){ vector<int> vec(w); cin >> vec.at(j); cout<< vec.at(j); } cout<<"#...
a.cc: In function 'int main()': a.cc:8:20: error: 'W' was not declared in this scope 8 | for(int i = 0; i<W; i++{ | ^ a.cc:8:26: error: expected ')' before '{' token 8 | for(int i = 0; i<W; i++{ | ~ ^ | ) a.cc:21:24: error:...
s425734030
p03712
C++
char a [100][101] , b [102][102]; int main () { int H , W ; cin >> H >> W ; for ( int i = 0; i < H ; i ++) scanf ("% s " , a [ i ]); 1 for ( int i = 0; i < H + 2; i ++) for ( int j = 0; j < W + 2; j ++) b [ i ][ j ] = ’# ’; for ( int i = 0; i < H ; i ++) for ( int j = 0; j < W ; j ++) b [ i + 1][ j + 1] = a [ i ][ j ];...
a.cc:9:16: error: extended character ’ is not valid in an identifier 9 | b [ i ][ j ] = ’# ’; | ^ a.cc:9:17: error: stray '#' in program 9 | b [ i ][ j ] = ’# ’; | ^ a.cc:9:19: error: extended character ’ is not valid in an identifier 9 | b [ i ][ j ] = ’# ’; ...
s458466160
p03712
C++
#include <bits/stdc++.h> using namespace std; int main(){ int H, W,i; cin >> H >>W; vector <string>vec(H); for(i=0;i<H;i++){ cin >>vec.at(i); } string s = "#"; cout << s*(W+2)<<endl; for(i=0;i<H;i++){ cout << s << vec.at(i)<<s<<endl; } cout << s*(W+2)<<endl; }
a.cc: In function 'int main()': a.cc:11:10: error: no match for 'operator*' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 11 | cout << s*(W+2)<<endl; | ~^~~~~~ | | | | | int | std::string {aka std::__cxx11::basic_strin...
s325016602
p03712
C++
#include <bits/stdc++.h> using namespace std; int main(void){ int H , W ; cin >> H >> W ; string a; int i,all = H*W; for (i=1;i<=all;i++){ cin >> a[i] ; } for (i=1;i<=W+2;i++){ cout << "#" ; }cout << endl; cout << "#"; for (i=1;i<=W;i++){ cout << a[i]; ...
a.cc:35:1: error: expected declaration before '}' token 35 | } | ^
s425472261
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int H, W; cin >> H >> W; vector<string> vec(W); for (int i = 0; i < W + 2; i++) cout << "#"; cout << endl; for (int i = 0; i < H; i++){ cout << "#"; for (int j = 0; j < W; j++){ cin >> vec.at(j); cout << vec.at(j); } ...
a.cc: In function 'int main()': a.cc:19:8: error: 'i' was not declared in this scope 19 | for (i = 0; i < W + 2; i++) | ^
s390514480
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int H, W; cin >> H >> W; vector<string> vec(W); for (int i = 0; i < W + 2; i++) cout << "#"; cout << endl; for (int i = 0; i < H; i++){ for (int j = 0; j < W; j++) cin >> vec.at(j); cout << "#" << vec << "#" << endl; } for (i ...
a.cc: In function 'int main()': a.cc:14:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::vector<std::__cxx11::basic_string<char> >') 14 | cout << "#" << vec << "#" << endl; | ~~~~~~~~~~~ ^~ ~~~ | | | | | std::vect...
s044486256
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int H, W; cin >> H >> W; vector<string> vec(W); for (i = 0; i < W + 2; i++) cout << "#"; cout << endl; for (i = 0; i < H; i++){ for (j = 0; j < W; j++) cin >> vec.at(j); cout << "#" << vec << "#" << endl; } for (i = 0; i < W +...
a.cc: In function 'int main()': a.cc:8:8: error: 'i' was not declared in this scope 8 | for (i = 0; i < W + 2; i++) | ^ a.cc:11:8: error: 'i' was not declared in this scope 11 | for (i = 0; i < H; i++){ | ^ a.cc:12:10: error: 'j' was not declared in this scope 12 | for (j = 0...
s924101889
p03712
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a>>b; vector<char>vec(a*b); for (int i=0;i<(a*b);i++){ cin >> vec[i]; } for (int j=0;j<(b+2);j++){ cout<< '#'; } cout << endl; for(int m=0;m<a;m++){ for(int n=0;n<b;n++){ cout << '#'<<vec.at(n+m*b) <<'#'<< ...
a.cc: In function 'int main()': a.cc:18:5: error: expected primary-expression before '}' token 18 | } | ^
s906624387
p03712
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a>>b; vector<char>vec(a*b); for (int i=0;i<vec.size();i++){ cin >> vec[i]; } for (int j=0;j<b+2;j++){ cout<< '#'; } cout << endl; for(int m=0;m<a;m++){ for(int n=0;n<b;n++){ cout << '#'<<vec.at(n+m*b) <<'#'<< ...
a.cc: In function 'int main()': a.cc:18:5: error: expected primary-expression before '}' token 18 | } | ^
s432645231
p03712
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a>>b; vector<char>vec(a*b); for (int i=0;i<vec.size();i++){ cin >> vec[i]; } for (int j=0;j<b+2;j++){ cout<< '#'; } cout << endl; for(m=0;m<a;m++){ for(n=0;n<b;n++){ cout << '#'<<vec.at(n+m*b) <<'#'<< } ...
a.cc: In function 'int main()': a.cc:15:7: error: 'm' was not declared in this scope 15 | for(m=0;m<a;m++){ | ^ a.cc:16:9: error: 'n' was not declared in this scope 16 | for(n=0;n<b;n++){ | ^ a.cc:18:5: error: expected primary-expression before '}' token 18 | } | ^...
s558842511
p03712
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <functional> #include <cmath> #include <map> int main() { int H, W; std::cin >> H >> W; std::vector<std::vector<char>> A(H, std::vector<char>(W)); for (int i = 0; i < H; ++i) { for (int j = 0; i < W; ++j) std::cin >> A[i][j];...
a.cc: In function 'int main()': a.cc:34:2: error: expected '}' at end of input 34 | } | ^ a.cc:9:12: note: to match this '{' 9 | int main() { | ^
s679783755
p03712
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <functional> #include <cmath> #include <map> int main() { int H, W; std::cin >> H >> W; std::vector<std::vector<char>> A(H, std::vector<char>(W)); for (int i = 0; i < H; ++i) { for (int j = 0; i < W; ++j) std::cin >> A[i][j];...
a.cc: In function 'int main()': a.cc:34:2: error: expected '}' at end of input 34 | } | ^ a.cc:9:12: note: to match this '{' 9 | int main() { | ^
s531716018
p03712
C++
#include <bits/stdc++.h> using namespace std; int main (){ int H,W; vector<string> line(H); cin>>H>>W; for(int i=0;i<W+2<i++){ cout<<"#"; } cout<<endl; for(int i=0;i<H;i++){ cin>>line.at(i); cout<<"#"+line.at(i)<<"#"<<endl; } for(int i=0;i<W+2;i++){ cout<<"#"; } }
a.cc: In function 'int main()': a.cc:7:24: error: expected ';' before ')' token 7 | for(int i=0;i<W+2<i++){ | ^ | ;
s044014921
p03712
C++
#include <bits/stdc++.h> using namespace std; int main (){ int H,W; vector<string> line(H); cin>>H>>W; for(int i=0;i<W+2<i++){ cout<<"#"; } cout<<endl; for(int i=0;i<H;i++){ cin>>line.at(i); cout<<"#"+line.at(i)<<"#"<<endl; } for(int i=0;i<W+2<i++){ cout<<"#"; } }
a.cc: In function 'int main()': a.cc:7:24: error: expected ';' before ')' token 7 | for(int i=0;i<W+2<i++){ | ^ | ; a.cc:15:24: error: expected ';' before ')' token 15 | for(int i=0;i<W+2<i++){ | ^ | ...
s056770412
p03712
C++
#include <bits/stdc++.h> using namespace std; int main (){ int H,W; vector<string> line(H); cin>>H>>W; for(i=0;i<W+2<i++){ cout<<"#"; } cout<<endl; for(i=0;i<H;i++){ cin>>line.at(i); cout<<"#"+line.at(i)<<"#"<<endl; } for(i=0;i<W+2<i++){ cout<<"#"; } }
a.cc: In function 'int main()': a.cc:7:7: error: 'i' was not declared in this scope 7 | for(i=0;i<W+2<i++){ | ^ a.cc:7:20: error: expected ';' before ')' token 7 | for(i=0;i<W+2<i++){ | ^ | ; a.cc:11:7: error: 'i' was not declared in this scope ...
s204324817
p03712
Java
package car; import java.util.Scanner; public class main{ public static void main(String[] args) { Scanner s = new Scanner(System.in); int h = s.nextInt(); int w = s.nextInt(); String n = "", nn = ""; for(int i = 0; i < w + 2; i++) n += "#"; System.out.println(n); for(int i = 0; i < h; i++) { ...
Main.java:5: error: class main is public, should be declared in a file named main.java public class main{ ^ 1 error
s260590916
p03712
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a >> b; vector<string> s(a); int i; for(i = 0;i < a;i++){ cin >> s.at(i); } for(i = 0;i<=(b+1);i++){ cout << '#'; } cin >> endl; for(i = 0;i<a;i++){ cout << '#' << s.at(i) << '#' << endl; } for(i = 0;i<=(b+1);...
a.cc: In function 'int main()': a.cc:15:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 15 | cin >> endl; | ~~~~^~~~~~~ In file included from /usr/include/c++/14/sstream:40, from /usr/includ...
s181048822
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int H, W; cin >> H >> W ; vector<vector<int>> data(H, vector<int>(W)); for (int j = 0; j < H; j++){ for (int i = 0; i < W; i++) { cin >> data.at(i).at(j); } } vector<vector<int>> ans(H+2, vector<int>(W+2)); for (int j = 0; j < H; j++){...
a.cc: In function 'int main()': a.cc:16:28: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} [-fpermissive] 16 | data.at(i).at(j) = "#"; | ^~~ | | | ...
s320671333
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int H, W; cin >> H >> W ; vector<vector<int>> data(H, vector<int>(W)); for (int j = 0; j < H; j++){ for (int i = 0; i < W; i++) { cin >> data.at(i).at(j); } } vector<vector<int>> ans(H+2, vector<int>(W+2)); for (int j = 0; j < H; j++){...
a.cc: In function 'int main()': a.cc:16:28: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} [-fpermissive] 16 | data.at(i).at(j) = "#" | ^~~ | | | ...
s568032823
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int H, W; cin >> H >> W; vector<char> picture(H*W); for (int i=0; i<H; i++) { for (int j=0; j<W; j++) { cin >> picture(i+j); } } for (int j=0; j<W; j++) { cout << "#"; } cout << endl; for (int i=0; i<H; i++) { cout << "#...
a.cc: In function 'int main()': a.cc:10:21: error: no match for call to '(std::vector<char>) (int)' 10 | cin >> picture(i+j); | ~~~~~~~^~~~~
s337058677
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,d,e; string c; cin >> a >> b; vector<string> vec(a); /for (int i = 0; i < a; i++) { for (int j = 0; j < b; j++) { cin >> c; vec.push_back(c); } } for(int i = 0 ; i < b-1 ; i++){ cout << "#"; } cout << "#" << end...
a.cc: In function 'int main()': a.cc:9:2: error: expected primary-expression before '/' token 9 | /for (int i = 0; i < a; i++) { | ^ a.cc:9:3: error: expected primary-expression before 'for' 9 | /for (int i = 0; i < a; i++) { | ^~~ a.cc:9:19: error: 'i' was not declared in this scope 9 | /...
s652822152
p03712
C++
#include <bits/stdc++.h> using namespace std; int main() { int H, W; cin >> H >> W; string box; for (int j = 0; j < W + 2; j++) { box += '#'; } vector<string> total(H + 2); total.at(0) = box; for (int i = 0; i < H; i++) { string a; cin >> a; string newa = '#' + a + '#'; total.at(i ...
a.cc:24:3: error: 'total' does not name a type 24 | total.at(H + 2) = box; | ^~~~~ a.cc:25:1: error: expected declaration before '}' token 25 | } | ^