submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s996498248
p00424
C++
#define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; //#define int long long #define DBG 1 #define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;} #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=...
a.cc: In function 'int dfs(int, int, int)': a.cc:15:33: error: expected '}' at end of input 15 | int dfs(int n, int max, int s) { | ~^ a.cc:15:33: warning: no return statement in function returning non-void [-Wreturn-type]
s041746908
p00424
C++
#define _USE_MATH_DEFINES #include "bits/stdc++.h" using namespace std; //#define int long long #define DBG 1 #define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;} #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=...
a.cc: In function 'int dfs(int, int, int)': a.cc:15:33: error: expected '}' at end of input 15 | int dfs(int n, int max, int s) { | ~^ a.cc:15:33: warning: no return statement in function returning non-void [-Wreturn-type]
s723931337
p00424
C++
int main(){ map<char,char> a2b; char a,b,c; int n; for( ; ; ){ cin>> n; if(n==0)break; for(int i=0;i<n;i++){ cin>>a>>b; a2b[a]=b; } cin>>n; for(int i=0;i<n;i++){ cin>>c; if(a2b.count(c)==0) cout<<c; else cout<<a2b[c]; } cout<<endl; } return 0; ...
a.cc: In function 'int main()': a.cc:3:3: error: 'map' was not declared in this scope 3 | map<char,char> a2b; | ^~~ a.cc:3:7: error: expected primary-expression before 'char' 3 | map<char,char> a2b; | ^~~~ a.cc:11:3: error: 'cin' was not declared in this scope 11 | cin>> n; | ...
s816218406
p00424
C++
#include<iostream> #include<cstdio> #include<map> using namespace std ; int main(){ map<char,char> a2b; int n,; char a,b; for(;;){ cin>>n; if(n==0)break; for(int i=0;i<n;i++){ cin >> a >> b; a2b[a]=b; } cin>>n; for(int i=0;i<n;i++){ cin>>a; if(a2b.count(a)==0){ cou...
a.cc: In function 'int main()': a.cc:7:9: error: expected unqualified-id before ';' token 7 | int n,; | ^
s322601128
p00424
C++
#include<iostream> #include<vector> using namespace std; int main() { vector<char> v; vector<char> v2; vector<char> v3; int n = 0; cin >> n; for (int i = 0; i < n; i++) { cin >> v.push_back() >> v2.push_back(); } int m = 0; cin >> m; for (int j = 0; j < m; j++) { cin >> v3.push_back(); for (int k = 0; ...
a.cc: In function 'int main()': a.cc:11:35: error: no matching function for call to 'std::vector<char>::push_back()' 11 | cin >> v.push_back() >> v2.push_back(); | ~~~~~~~~~~~^~ In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/includ...
s971323379
p00424
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args) throws IOException { String strCount = ""; int cmd = 0; BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(S...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fm...
s366051790
p00424
C++
#include <bits/stdc++.h> using namespace std; int main() { while(1) { int K; cin >> K; if(K == 0) break; string before[K],after[K]; for(int a = 0; a < k; ++a) { cin >> before[a] >> after[a]; } int n; cin >> n; string ans[n]; for(int b = 0; b < n; ++b){ cin >> ans[b...
a.cc: In function 'int main()': a.cc:10:24: error: 'k' was not declared in this scope 10 | for(int a = 0; a < k; ++a) { | ^ a.cc:20:26: error: 'k' was not declared in this scope 20 | for(int d = 0; d < k; ++d) { | ^ a.cc:28:12: error: no match ...
s606917776
p00424
C++
#include <bits/stdc++.h> using namespace std; int main() { while(1) { int K; cin >> K; if(K == 0) break; string before[K] stirng after[K]; for(int a = 0; a < k; ++a) { cin >> before[a] >> after[a]; } int n; cin >> n; string ans[n]; for(int b = 0; b < n; ++b){ c...
a.cc: In function 'int main()': a.cc:10:5: error: expected initializer before 'stirng' 10 | stirng after[K]; | ^~~~~~ a.cc:11:24: error: 'k' was not declared in this scope 11 | for(int a = 0; a < k; ++a) { | ^ a.cc:12:14: error: 'before' was not declared in this scop...
s262105827
p00424
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <functional> #include <algorithm> #include <string> #include <cmath> #include <vector> #include <valarray> #include <algorithm> #include <time.h> #include <cstdlib> #include <iomanip> #include <stdlib.h> using namespace std; int main (void) { long m...
a.cc: In function 'int main()': a.cc:21:9: error: 'long' specified with 'char' 21 | long char a[100],b[100],c[100]; | ^~~~ a.cc:21:9: error: 'long' specified with 'char' a.cc:21:9: error: 'long' specified with 'char'
s901536432
p00424
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <functional> #include <algorithm> #include <string> #include <cmath> #include <vector> #include <valarray> #include <algorithm> #include <time.h> #include <cstdlib> #include <iomanip> #include <stdlib.h> using namespace std; int main (void) { long m...
a.cc: In function 'int main()': a.cc:21:9: error: 'long' specified with 'char' 21 | long char a[100],b[100],c[100]; | ^~~~ a.cc:21:9: error: 'long' specified with 'char' a.cc:21:9: error: 'long' specified with 'char'
s839905543
p00424
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <functional> #include <algorithm> #include <string> #include <cmath> #include <vector> #include <valarray> #include <algorithm> #include <time.h> #include <cstdlib> #include <iomanip> #include <stdlib.h> using namespace std; int main (void) { long m...
a.cc: In function 'int main()': a.cc:21:9: error: 'long' specified with 'char' 21 | long char a[100000],b[100000],c[100000]; | ^~~~ a.cc:21:9: error: 'long' specified with 'char' a.cc:21:9: error: 'long' specified with 'char'
s424648268
p00424
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <functional> #include <algorithm> #include <string> #include <cmath> #include <vector> #include <valarray> #include <algorithm> #include <time.h> #include <cstdlib> #include <iomanip> #include <stdlib.h> using namespace std; int main (void) { long m...
a.cc: In function 'int main()': a.cc:21:9: error: 'long' specified with 'char' 21 | long char a[100000],b[100000],c[100000]; | ^~~~ a.cc:21:9: error: 'long' specified with 'char' a.cc:21:9: error: 'long' specified with 'char'
s922053897
p00424
C++
#include "../bits/stdc++.h" #define X first #define Y second #define pb push_back #define eb emplace_back #define mp make_pair #define rep(i, a, b) for (unsigned i = (a); i <= (b); ++i) #define per(i, a, b) for (unsigned i = (a); i >= (b); --i) using namespace std; using I = int; using L = long; using F = float; usi...
a.cc:1:10: fatal error: ../bits/stdc++.h: No such file or directory 1 | #include "../bits/stdc++.h" | ^~~~~~~~~~~~~~~~~~ compilation terminated.
s327239741
p00424
C++
d = dict() s = set() while True: N = int(input()) if N == 0: break res = '' for i in range(N): line = input() d[line[0]] = line[-1] M = int(input()) for i in range(M): line = input() if line in d and line not in s: res += d[line] ...
a.cc:9:11: error: empty character constant 9 | res = '' | ^~ a.cc:1:1: error: 'd' does not name a type 1 | d = dict() | ^
s689505909
p00424
C++
#include <iostream> #include <math.h> #include <stdio.h> #include <string> #include <string.h> #include <algorithm> #include <cmath> #include <limits> #include <sstream> using namespace std; int main (void) { for (int k = 0; k < 5; k++) { long n,m; long char a[10000],b[10000],x[10000]; cin >> n; if (n == 0) ...
a.cc: In function 'int main()': a.cc:19:9: error: 'long' specified with 'char' 19 | long char a[10000],b[10000],x[10000]; | ^~~~ a.cc:19:9: error: 'long' specified with 'char' a.cc:19:9: error: 'long' specified with 'char'
s048524033
p00424
C++
<?php for($loop_cnt = 0; $loop_cnt < 5; $loop_cnt++) { $data_set = array(); $data = array(); // 変換表数設定 $input_n = trim(fgets(STDIN)); if( 0 == $input_n) { break; } ...
a.cc:47:30: error: empty character constant 47 | echo implode('' , $work); | ^~ a.cc:1:1: error: expected unqualified-id before '<' token 1 | <?php | ^ a.cc:2:28: error: '$loop_cnt' does not name a type 2 | for($loop_cnt = 0; $loop_cnt < 5; $lo...
s210703848
p00424
C++
#include <iostream> using namespace std; int main() { int n,m; int henkan[256]; while(cin>>n,n){ memset(henkan,0,sizeof(henkan)); while(n--){ char a,b; cin>>a>>b; henkan[(int)a] = b; } cin>>m; while(m--){ char a; cin>>a; printf("%c",henkan[(int)a]?:a); } puts(""); } return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: 'memset' was not declared in this scope 8 | memset(henkan,0,sizeof(henkan)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream>...
s566747912
p00424
C++
#include <iostream> #include <cstdio> #include <map> using namespace std; int main() { int N, M; while (scanf("%d ", &N) == 1) { if (N == 0) { break; } map<char, char> m; char d, s; for (int i = 0; i < N; i++) { scanf("%c %c ", &s, &d); map[s] = d; } scanf("%d ", &M); ...
a.cc: In function 'int main()': a.cc:17:16: error: class template argument deduction failed: 17 | map[s] = d; | ^ a.cc:17:16: error: no matching function for call to 'map(char&)' In file included from /usr/include/c++/14/map:63, from a.cc:3: /usr/include/c++/14/bits/stl_ma...
s749024596
p00424
C++
#include <stdio.h> #include <string.h> int main(void) { char change[26 + 26 + 9]; int n, m; while (1){ memset(change, 0, sizeof(change)); scanf("%d", &n); if (n == 0){ break; } for (int i = 0; i < n; i++){ char base[2], ca[2]; scanf("%s%s", base, ca); change[isdigit(base[...
a.cc: In function 'int main()': a.cc:24:32: error: 'isdigit' was not declared in this scope 24 | change[isdigit(base[0]) ? (base[0] - '0') + 52 : isupper(base[0]) ? (base[0] - 'A') + 26 : (base[0] - 'a')] = ca[0]; | ^~~~~~~ a.cc:24:74: error: 'isupper' was...
s542869969
p00424
C++
#include <stdio.h> #include <string.h> int main(void) { char change[26 + 26 + 9]; int n, m; while (1){ memset(change, 0, sizeof(change)); scanf("%d", &n); if (n == 0){ break; } for (int i = 0; i < n; i++){ char base[2], ca[2]; scanf("%s%s", base, ca); change[isdigit(base[...
a.cc: In function 'int main()': a.cc:24:32: error: 'isdigit' was not declared in this scope 24 | change[isdigit(base[0]) ? (base[0] - '0') + 52 : isupper(base[0]) ? (base[0] - 'A') + 26 : (base[0] - 'a')] = ca[0]; | ^~~~~~~ a.cc:24:74: error: 'isupper' was...
s884720430
p00424
C++
#include <stdio.h> #include <string.h> #include <ctype.h> int main(void) { char change[26 + 26 + 9]; int n, m; while (1){ memset(change, 0, sizeof(change)); scanf("%d", &n); if (n == 0){ break; } for (int i = 0; i < n; i++){ char base[2], ca[2]; scanf("%s%s", base, ca); c...
a.cc: In function 'int main()': a.cc:36:61: error: 'base' was not declared in this scope 36 | printf("%c", change[isdigit(base[0]) ? (base[0] - '0') + 52 : isupper(base[0]) ? (base[0] - 'A') + 26 : (base[0] - 'a')]); | ...
s142649562
p00424
C++
#include<stdio.h> int main(){ int a,b; char aa[100],bb[100],d; scanf("%d",&a); for(int i=0;i<a;i++) scanf(" %c %c",&aa[i],&bb[i]); scanf("%d",&b); for(int i=0;i<b;i++) { scanf(" %c",&d); for(int j=0;j<a;j++){ ...
a.cc:23:1: error: expected unqualified-id before 'return' 23 | return 0; | ^~~~~~ a.cc:24:1: error: expected declaration before '}' token 24 | } | ^
s509308299
p00424
C++
#include<stdio.h> int main(){ while(1){ int a,b; char aa[100],bb[100],d,dd[100000000]; scanf("%d",&a); if(a==0) break; for(int i=0;i<a;i++) scanf(" %c %c",&aa[i],&bb[i]); scanf("%d",&b); for(int i=0;i<b;i++) { scanf(" %c",&dd[i]); ...
a.cc:19:1: error: extended character   is not valid in an identifier 19 | ツ ツ ツ ツ ツ ツ if(j==a) printf("%c",dd[i]); | ^ a.cc:19:1: error: extended character   is not valid in an identifier a.cc:19:1: error: extended character   is not valid in an identifier a.cc:19:1: error: extended character   is not valid in...
s715122483
p00424
C++
#include<stdio.h> int main(){ while(1){ int a,b; char aa[100],bb[100],d,dd[100000000]; scanf("%d",&a); if(a==0) break; for(int i=0;i<a;i++) scanf(" %c %c",&aa[i],&bb[i]); scanf("%d",&b); for(int i=0;i<b;i++) { scanf(" %c",&dd[i]); ...
a.cc:19:1: error: extended character   is not valid in an identifier 19 | ツ ツ ツ ツ ツ ツ if(j==a) printf("%c",dd[i]); | ^ a.cc:19:1: error: extended character   is not valid in an identifier a.cc:19:1: error: extended character   is not valid in an identifier a.cc:19:1: error: extended character   is not valid in...
s092813045
p00424
C++
#include <iostream> #include <map> map<char, char> conv; main() { int n, m; while((cin >> n) && n) { conv,clear(); for(int i = 0; i < n; ++i) { char a, b; cin >> a >> b; conv[a] = b; } cin >> m; for(int i = 0; i < m; ++i) { char c; cin >> c; if(conv[c] == 0)...
a.cc:4:1: error: 'map' does not name a type 4 | map<char, char> conv; | ^~~ a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:8:10: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8...
s786646817
p00424
C++
#include<stdio.h> #include<stdlib.h> int main() { char *before=NULL; char *after=NULL; char *str=NULL; char buf[11]; char ch; int m,n,i,j,conv; while(1) { fgets(buf,11,stdin); n=atoi(buf); if(n==0)break; before=realloc(before,n*sizeof(char)); after=realloc(after,n*sizeof(char)); for(i=0;i<n;i++) ...
a.cc: In function 'int main()': a.cc:18:31: error: invalid conversion from 'void*' to 'char*' [-fpermissive] 18 | before=realloc(before,n*sizeof(char)); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ | | | void* a....
s867167524
p00424
C++
#include <iostream> #include <string> using namespace std; char s[100000000]; int main() { int n, m, i, j, k; char a[80], b[80], c; bool f = false; while (cin >> n && n) { for (i = 0; i < n; i++) { cin >> a[i] >> b[i]; } cin >> m; strcpy(s, ""); for (i = k = 0; i < m; i++) { cin >> c; for (j...
a.cc: In function 'int main()': a.cc:17:17: error: 'strcpy' was not declared in this scope 17 | strcpy(s, ""); | ^~~~~~ a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include...
s530567868
p00424
C++
#include<iostream> #include<map> #include<vector> using namespace std; int main() { int n; while(cin>>n){ if(n==0) break; vector<char> ans; map<char,char> M; for(int i=0;i<n;i++){ char in,out; cin>>in>>out; M[in]=out; } int k; cin>>k; for(int i=0;i<k;i++){ char s; cin>>s; if(!M...
a.cc:1:1: error: extended character  is not valid in an identifier 1 | #include<iostream> | ^ a.cc:1:1: error: extended character  is not valid in an identifier a.cc:1:3: error: stray '#' in program 1 | #include<iostream> | ^ a.cc:1:1: error: '\302\201\302\217' does not name a type 1 | ...
s494233885
p00424
C++
3 A a 0 5 5 4 10 A B C 0 1 4 5 a b A 3 A a 0 5 5 4 10 A B C 0 1 4 5 a b A 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s506734902
p00424
C++
#include <iostream> #include <vector> using namespace std; int main(void) { for (int n = 0; (cin >> n) && n != 0;) { vector<pair<char, char>> conversion; for (int i = 0; i < n; i++) { char preLetter = 0, afterLetter = 0; cin >> preLetter >> afterLetter; conversion.push_back(make_pair<char,char>(preLette...
a.cc: In function 'int main()': a.cc:12:67: error: cannot bind rvalue reference of type 'char&&' to lvalue of type 'char' 12 | conversion.push_back(make_pair<char,char>(preLetter, afterLetter)); | ^~~~~~~~~ In file includ...
s638843295
p00424
C++
using namespace std; int main(){ int a,b,c; int i,j,k; char arr[100000000][2]; char arr2[100000000]; while(1){ cin >> a; if(a == 0 ) break; for(i=0 ; i < a ; i++){ cin >> arr[i][0] >> arr[i][1] ; // cout << a ; } // cout << "b"; // cout << "bの入力"<<endl; cin >> b; // cout ...
a.cc: In function 'int main()': a.cc:16:9: error: 'cin' was not declared in this scope 16 | cin >> a; | ^~~ 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:51:9: ...
s254217050
p00424
C++
#include <iostream> #include <cstdio> void Convert(std::string *target, std::string search, std::string to); int main(){ int n,m,i = 0; std::string table[10000][2]; std::string String = "", q; while(1){ scanf("%d", &n); if(n == 0)return 0; ...
a.cc: In function 'int main()': a.cc:23:10: error: expected '}' at end of input 23 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s301079204
p00424
C++
#include <iostream> #include <cstdio> void Convert(std::string *target, std::string search, std::string to); int main(){ int n,m,i = 0; std::string table[10000][2]; std::string String = "", q; while(1){ scanf("%d", &n); if(n == 0)return 0; ...
/usr/bin/ld: /tmp/ccj7VWxd.o: in function `main': a.cc:(.text+0x222): undefined reference to `Convert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>...
s974354320
p00424
C++
#include <iostream> #include <string> using namespace std; int main(){ int n: string a[n]; string b[n]; int c; string d; int m; int e; int f; while(cin >> n){ if(n!=0){ c=0; while(c<n){ cin >>a[c]; cin >>b[c]; c=c+1;} cin >> m; c=0; while(c<m){ cin >>d; e=0; f=0; while(e<n){ if(d==a[e]){cout<<b[e]; f=1;} e=e+1; } i...
a.cc: In function 'int main()': a.cc:5:6: error: found ':' in nested-name-specifier, expected '::' 5 | int n: | ^ | :: a.cc:5:5: error: 'n' has not been declared 5 | int n: | ^ a.cc:6:8: error: qualified-id in declaration before 'a' 6 | string a[n]; | ^ a.cc:7:10...
s814844932
p00424
C++
3 A a 0 5 5 4 10 A B C 0 1 4 5 a b A
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s992353502
p00424
C++
#include <iostream> using namespace std; int main(){ int n; cin >> n; do{ char a[256],b[256]; for(int i=0; i<n; i++){ cin >> a[i] >> b[i]; } int num; cin >> num; char s[256];...
a.cc: In function 'int main()': a.cc:18:29: error: 'j' was not declared in this scope 18 | for(j=0; j<n; j++){ | ^
s204952895
p00424
C++
#include <iostream> #define VARIABLE(x) cerr << #x << "=" << x << endl #define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define REP(i,m,n) for (int i=m;i<(int)(n);i++) #define if_range(x, y, w, h) if (0<=x && x<w && 0<=y && y<h) const int INF = 1...
a.cc: In function 'int main()': a.cc:17:9: error: 'map' was not declared in this scope 17 | map<char, char> list; | ^~~ a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>' 1 | #include <iostream> +++ |+#include <map> 2 | a.cc:1...
s174606157
p00425
Java
import java.io.IOException; public class P0502 { /** * * 標準入力から1行読み込む。 * <p> * 指定された長さまで、1行分文字列を読み込む。 * 行末の判断は EOF(-1) または 改行('\n')を用いる。 * </p> * @param maxLength * @return 1行分読み込んだ文字列 */ private static String ReadLn(int maxLength) { byte line[] = new byte[...
Main.java:3: error: class P0502 is public, should be declared in a file named P0502.java public class P0502 { ^ 1 error
s763594106
p00425
Java
import java.io.*; // namespace... class 0502 { public static void main() { System.out.printf("%d%n", solve()); return; } private int solve() { InputStreamReader isr = new InputStreamReader(System.in); BufferdReader br = new BufferedReader(isr); int ret = 1; String buf; int dtop=1, dforwa...
Main.java:3: error: <identifier> expected class 0502 { ^ 1 error
s717103091
p00425
Java
import java.io.FileReader; import java.io.BufferedReader; import java.io.IOException; public class Dice { int top, bottom, north, south, west, east; public Dice(){ this.top = 1; this.bottom = 6; this.north = 5; this.south = 2; this.west = 4; this.east = 3; } public void initial(){ this.top = 1;...
Main.java:5: error: class Dice is public, should be declared in a file named Dice.java public class Dice { ^ Main.java:28: error: class Operation is public, should be declared in a file named Operation.java public class Operation { ^ 2 errors
s292138018
p00425
Java
import java.io.FileReader; import java.io.BufferedReader; import java.io.IOException; public class Dice { int top, bottom, north, south, west, east; public Dice(){ this.top = 1; this.bottom = 6; this.north = 5; this.south = 2; this.west = 4; this.east = 3; } public void initial(){ this.top = 1;...
Main.java:5: error: class Dice is public, should be declared in a file named Dice.java public class Dice { ^ Main.java:28: error: class Operation is public, should be declared in a file named Operation.java public class Operation { ^ 2 errors
s253503113
p00425
Java
import java.io.FileReader; import java.io.BufferedReader; import java.io.IOException; public class Operation { int before_north, before_south, before_west, before_east, before_top, before_bottom; int after_north, after_south, after_west, after_east, after_top, after_bottom; public void read(){ try { //フ...
Main.java:6: error: class Operation is public, should be declared in a file named Operation.java public class Operation { ^ 1 error
s153040826
p00425
Java
import java.io.FileReader; import java.io.BufferedReader; import java.io.IOException; public class Main { int before_north, before_south, before_west, before_east, before_top, before_bottom; int after_north, after_south, after_west, after_east, after_top, after_bottom; public void read(){ try { //ファイルを読...
Main.java:105: error: cannot find symbol Main op = new Operation(); ^ symbol: class Operation location: class Main 1 error
s696916611
p00425
Java
import java.util.Scanner; public class Main { public static Scanner sc; public static void main(String[] args){ sc=new Scanner(System.in); while(true){ int n=sc.nextInt(); if(n==0)break; Dice dice=new Dice(); int ans=0; for(int i=0;i<n;i++){ dice.roll(sc.next()); ans+=dice.get(1); } ...
Main.java:66: error: reached end of file while parsing } ^ 1 error
s987085592
p00425
Java
import java.util.*; import java.lang.*; import java.io.*; public class answer{ public static void main (String[] args) throws java.lang.Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); while(line!=null&&!"0".equals(line)){ ...
Main.java:5: error: class answer is public, should be declared in a file named answer.java public class answer{ ^ 1 error
s577282885
p00425
Java
public class Main { public static void main(String args[] ) throws Exception { Scanner sc = new Scanner(System.in); int[] dice = {1, 2, 3, 4, 5, 6}; List<Integer> resultList = new ArrayList<Integer>(); while (true) { int n = sc.nextInt(); if (n == 0) break; int result = 0; for (int i = 0; i...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol ...
s288927734
p00425
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; public class Dice { public static void main(String[] args) throws Exception, IOException { BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); ...
Main.java:7: error: class Dice is public, should be declared in a file named Dice.java public class Dice { ^ 1 error
s246183993
p00425
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Dice { public static void main(String[] args) throws Exception { // TODO ????????????????????????????????????????????? boolean[] arg = null; int length=0,out=0; int i=0,rou=0...
Main.java:6: error: class Dice is public, should be declared in a file named Dice.java public class Dice { ^ 1 error
s204200889
p00425
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); while(true){ int count=0; int N = cin.nextInt(); if(N==0){ break; } Dice di = new Dice(1, 2); count += di.dice[0]; for(int i = 0; i < N; i++){ String str = cin....
Main.java:139: error: reached end of file while parsing } ^ 1 error
s325894329
p00425
C
#include "stdio.h" #include "string.h" #define DICE 4 int zorome[4][4]={{1,2,6,5},{1,4,6,3},{1,5,6,2},{1,3,6,4}}; int copy[4]; int sum=0; void north(void){ int tmp[2],i,m; tmp[0]=zorome[0][0]; tmp[1]=zorome[2][3]; for(i=1;i<DICE;i++){ ...
main.c: In function 'west': main.c:56:1: error: stray '\343' in program 56 | <U+3000>zorome[0][2]=zorome[2][2]=zorome[3][2]; | ^~~~~~~~ main.c: In function 'left': main.c:123:2: error: expected declaration or statement at end of input 123 | } | ^
s860941572
p00425
C
#include "stdio.h" #include "string.h" #define DICE 4 const int shokiti[4][4]={{1,2,6,5},{1,4,6,3},{1,5,6,2},{1,3,6,4}}; int zorome[4][4]; int cp[4]; unsigned long sum; void direction(constint de){ int tmp[2],i,m,j; m=(de>=2)?de-2:de+2; j=(m+de)/2%2; tmp[0]=zorome[de][0]; t...
main.c:8:18: error: unknown type name 'constint' 8 | void direction(constint de){ | ^~~~~~~~ main.c: In function 'main': main.c:53:15: error: implicit declaration of function 'direction' [-Wimplicit-function-declaration] 53 | direction(0); | ^~~~~~~~~
s328543423
p00425
C
#include<stdio.h> #include<string.h> int main(void){ int n, b = 1, z1 = 2, z2 = 3, n1, n2, g = 1; char muki[10]; scanf_s("%d", &n); for (int i = 0; i<n; i++){ scanf_s("%s", muki,10); if (strcmp(muki , "North")==0){ n1 = z1; z1 = 7 - b; b = n1; } if (strcmp(muki, "East") == 0){ n1 = 7 - z2; z2...
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s368727292
p00425
C
#include<stdio.h> #include<string.h> int main(void){ int i,n, b = 1, z1 = 2, z2 = 3, n1, n2, g = 1; char muki[10]; scanf_s("%d", &n); for (i = 0; i<n; i++){ scanf_s("%s", muki,10); if (strcmp(muki , "North")==0){ n1 = z1; z1 = 7 - b; b = n1; } if (strcmp(muki, "East") == 0){ n1 = 7 - z2; z2 =...
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s905943612
p00425
C
#include <stdio.h> #include <string.h> int n, i; char mozi[6]; int me; int main(){ int sum, saikkoro1, ssaikoro2, saikoro3; while(1){ scanf("%d", &n); if(n==0){ break; } saikoro1 = 1; saikoro2 = 2; saikoro3 = 3; sum = saikoro1; for(i=0; i<n; i++){ scanf("%s",mozi); if(strcmp('North', moz...
main.c: In function 'main': main.c:16:17: error: 'saikoro1' undeclared (first use in this function); did you mean 'saikoro3'? 16 | saikoro1 = 1; | ^~~~~~~~ | saikoro3 main.c:16:17: note: each undeclared identifier is reported only once for each function it ...
s327452785
p00425
C
#include <stdio.h> #include <string.h> int n, i; char mozi[6]; int me; int main(){ int sum, saikkoro1, ssaikoro2, saikoro3; while(1){ scanf("%d", &n); if(n==0){ break; } saikoro1 = 1; saikoro2 = 2; saikoro3 = 3; sum = saikoro1; for(i=0; i<n; i++){ scanf("%s",mozi); if(strcmp('North', moz...
main.c: In function 'main': main.c:16:17: error: 'saikoro1' undeclared (first use in this function); did you mean 'saikoro3'? 16 | saikoro1 = 1; | ^~~~~~~~ | saikoro3 main.c:16:17: note: each undeclared identifier is reported only once for each function it ...
s686203747
p00425
C
#include <stdio.h> #include <string.h> int n, i; char mozi[6]; int me; int main(){ int sum, saikkoro1, saikoro2, saikoro3; while(1){ scanf("%d", &n); if(n==0){ break; } saikoro1 = 1; saikoro2 = 2; saikoro3 = 3; sum = saikoro1; for(i=0; i<n; i++){ scanf("%s",mozi); if(strcmp('North', mozi...
main.c: In function 'main': main.c:16:17: error: 'saikoro1' undeclared (first use in this function); did you mean 'saikoro3'? 16 | saikoro1 = 1; | ^~~~~~~~ | saikoro3 main.c:16:17: note: each undeclared identifier is reported only once for each function it ...
s676256682
p00425
C
#include <stdio.h> #include <string.h> int n, i; char mozi[6]; int me; int main(){ int sum, saikoro1, saikoro2, saikoro3; while(1){ scanf("%d", &n); if(n==0){ break; } saikoro1 = 1; saikoro2 = 2; saikoro3 = 3; sum = saikoro1; for(i=0; i<n; i++){ scanf("%s",mozi); if(strcmp('North', mozi)...
main.c: In function 'main': main.c:22:35: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 22 | if(strcmp('North', mozi) == 0){ | ^~~~~~~ main.c:22:35: error: passing argument 1 of 'strcmp' makes pointer from integer with...
s803644089
p00425
C
#include<stdio.h> int t,r; char s[6]; void f(n){ int d[5]={1,3,4,2,5}; int i; for(i=0;i<n;i++){ scanf("%s",s); switch(s[0]){ case 'N':d[0]=d[3];d[3]=7-d[0];d[4]=7-d[3];break; case 'S':d[3]=d[0];d[0]=d[4];d[4]=7-d[3];break; case 'E':d[1]=d[0];d[0]=d[2];d[2]=7-d[1];break; ????????????????case 'W':d[2]=d[0];d...
main.c: In function 'f': main.c:4:6: error: type of 'n' defaults to 'int' [-Wimplicit-int] 4 | void f(n){ | ^ main.c:13:1: error: expected expression before '?' token 13 | ????????????????case 'W':d[2]=d[0];d[0]=d[1];d[1]=7-d[2];break; | ^ main.c:14:1: error: expected expression before '?' token...
s579012497
p00425
C
#define s(a,b) (t=a,a=b,b=t) char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
main.c:2:13: warning: data definition has no type or storage class 2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f...
s632070496
p00425
C
#include<stdio.h> int m[]={5,1,2,4,1,3,1,0,0,2,3,2,2,4,5,1,4,0,4,3,3,5,0,5},a,b,c,d,r; char s[99]; int main(){ for(s[87]=1,s[78]=4,s[69]=3,s[83]=2;gets(s);*s<60?printf(r?"%d\n":0,r),a=c=0,b=r=1:(d=s[*s],d?d=d+c&3,a=m[4*a+d],b=m[4*b+d]:c+=*s-76?1:3,r+=a%3?b%3?(b+6-a)%6<3?2:5:3+!b:a?6:1)); }
main.c: In function 'main': main.c:5:45: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 5 | for(s[87]=1,s[78]=4,s[69]=3,s[83]=2;gets(s);*s<60?printf(r?"%d\n":0,r),a=c=0,b=r=1:(d=s[*s],d?d=d+c&3,a=m[4*a+d],b=m[4*b+d]:c+=*s-76?1:3,r+=a%3?b%3?(b+6-a)%6<3...
s915652046
p00425
C
#include<stdio.h> int m[]={5,1,2,4,1,3,1,0,0,2,3,2,2,4,5,1,4,0,4,3,3,5,0,5},a,b,c,d,r; char s[99]; int main(){ for(s[87]=1,s[78]=4,s[69]=3,s[83]=2;gets(s);*s<60?printf(r?"%d\n":0,r),a=c=0,b=r=1:(d=s[*s],d?d=d+c&3,a=m[4*a+d],b=m[4*b+d]:c+=*s-76?1:3,r+=a%3?b%3?(b+6-a)%6<3?2:5:3+!b:a?6:1)); }
main.c: In function 'main': main.c:5:45: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 5 | for(s[87]=1,s[78]=4,s[69]=3,s[83]=2;gets(s);*s<60?printf(r?"%d\n":0,r),a=c=0,b=r=1:(d=s[*s],d?d=d+c&3,a=m[4*a+d],b=m[4*b+d]:c+=*s-76?1:3,r+=a%3?b%3?(b+6-a)%6<3...
s731159964
p00425
C
#include<stdio.h> int m[]={5,1,2,4,1,3,1,0,0,2,3,2,2,4,5,1,4,0,4,3,3,5,0,5},a,b,c,d,r; char s[99]; int main(){ s[87]=1,s[78]=4,s[69]=3,s[83]=2; for( ;gets(s); *s<60?printf(r?"%d\n":0,r),a=c=0,b=r=1:(d=s[*s],d?d=d+c&3,a=m[4*a+d],b=m[4*b+d]:c+=*s-76?1:3,r+=a%3?b%3?(b+6-a)%6<3?2:5:3+!b:a?6:1)); }
main.c: In function 'main': main.c:7:2: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | ;gets(s); | ^~~~ | fgets main.c:8:82: error: lvalue required as left operand of assignment 8 | *s<60?printf(r?"%d\n":0,r),a=c=0,b=r=1:(d=s[*s],d?d=d+c...
s292878794
p00425
C
#include<stdio.h> int m[]={5,1,2,4,1,3,1,0,0,2,3,2,2,4,5,1,4,0,4,3,3,5,0,5},a,b,c,d,r; char s[99]; int main(){ s[87]=1,s[78]=4,s[69]=3,s[83]=2; for( ;gets(s); *s<60?printf(r?"%d\n":0,r), a=c=0,b=r=1: (d=s[*s],d?d=d+c&3,a=m[4*a+d],b=m[4*b+d]:c+=*s-76?1:3,r+=a%3?b%3?(b+6-a)%6<3?2:5:3+!b:a?6:1)); }
main.c: In function 'main': main.c:7:2: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 7 | ;gets(s); | ^~~~ | fgets main.c:10:43: error: lvalue required as left operand of assignment 10 | (d=s[*s],d?d=d+c&3,a=m[4*a+d],b=m[4*b+d]:c+=*s-76?1:3,...
s178640769
p00425
C
int N[]={ 6,10,18,14, 2,13,22,11, 3, 5,21,19, 1,17,23, 7, 0, 9,20,15, 4,12,16, 8}; int E[]={15, 7,11,19, 8, 3,14,23, 16, 0, 6,22, 4, 2,18,20, 12, 1,10,21, 9, 5,13,17}; int W[]={ 9,17,13, 5, 12,21,10, 1, 4,20,18, 2, 16,22, 6, 0, 8,23,14, 3, 15,19,11, 7}; int S[]={16,12, 4, 8, 20, 9, 0,15, 23,17, 1, 7, 21, 5, 3...
main.c:7:1: warning: data definition has no type or storage class 7 | n,a,d; | ^ main.c:7:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:7:3: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] 7 | n,a,d; | ^ main.c:7:5: error: type defaults to 'int...
s046161533
p00425
C
int N[]={ 6,10,18,14, 2,13,22,11, 3, 5,21,19, 1,17,23, 7, 0, 9,20,15, 4,12,16, 8}; int E[]={15, 7,11,19, 8, 3,14,23, 16, 0, 6,22, 4, 2,18,20, 12, 1,10,21, 9, 5,13,17}; int W[]={ 9,17,13, 5, 12,21,10, 1, 4,20,18, 2, 16,22, 6, 0, 8,23,14, 3, 15,19,11, 7}; int S[]={16,12, 4, 8, 20, 9, 0,15, 23,17, 1, 7, 21, 5, 3...
main.c:5:1: warning: data definition has no type or storage class 5 | n,d,a; | ^ main.c:5:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:5:3: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] 5 | n,d,a; | ^ main.c:5:5: error: type defaults to 'int...
s348767426
p00425
C
printf("77\n174\n86\n331\n17405\n");
main.c:1:8: error: expected declaration specifiers or '...' before string constant 1 | printf("77\n174\n86\n331\n17405\n"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
s323099208
p00425
C
main(n,char*s){for(;scanf("%s",s),*s>48;);puts("aaa");}
main.c:1:8: error: expected ')' before 'char' 1 | main(n,char*s){for(;scanf("%s",s),*s>48;);puts("aaa");} | ^~~~ | )
s450447382
p00425
C
main(n,char*s){for(;scanf("%s",s),*s>48;);puts("aaa");}
main.c:1:8: error: expected ')' before 'char' 1 | main(n,char*s){for(;scanf("%s",s),*s>48;);puts("aaa");} | ^~~~ | )
s147020209
p00425
C
m[]={2189,89,1232,866,1796,2603},a,b,c,r;main(d){for(char s[9];~scanf("%s",s);r+=a%3?b%3?(b+6-a)%6<3?2:5:3+!b:a?6:1)*s<65?printf(r?"%d\n":0,r),a=c=r=0,b=1:*s%6-4?d=(*s-78?*s%5-1:0)+c&3,a=m[a]>>3*d&7,b=m[b]>>3*d&7:(c+=*s+3);}
main.c:1:1: warning: data definition has no type or storage class 1 | m[]={2189,89,1232,866,1796,2603},a,b,c,r;main(d){for(char s[9];~scanf("%s",s);r+=a%3?b%3?(b+6-a)%6<3?2:5:3+!b:a?6:1)*s<65?printf(r?"%d\n":0,r),a=c=r=0,b=1:*s%6-4?d=(*s-78?*s%5-1:0)+c&3,a=m[a]>>3*d&7,b=m[b]>>3*d&7:(c+=*s+3);} | ^ main.c:1:1:...
s002950284
p00425
C
v[]={0,4,2,5,0,5,2,4,0,3,2,1,0,1,2,3,4,3,5,1,1,5,3,4};main(n,c,i,j,s){while(scanf("%d ",&n)&&n){int d[]={1,3,6,4,2,5};for(s=1;n--&&gets(&c);){c&=255;i=c-78?c-83?c-69?c-87?c-76?20:16:12:8:4:0;c=d[v[i]];for(j=0;j<3;++j)d[v[i+j]]=d[v[i+j+1]];d[v[i+3]]=c;s+=*d;}printf("%d\n",s);}}
main.c:1:1: warning: data definition has no type or storage class 1 | v[]={0,4,2,5,0,5,2,4,0,3,2,1,0,1,2,3,4,3,5,1,1,5,3,4};main(n,c,i,j,s){while(scanf("%d ",&n)&&n){int d[]={1,3,6,4,2,5};for(s=1;n--&&gets(&c);){c&=255;i=c-78?c-83?c-69?c-87?c-76?20:16:12:8:4:0;c=d[v[i]];for(j=0;j<3;++j)d[v[i+j]]=d[v[i+j+1]];d[v[i+3...
s399483170
p00425
C
a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
main.c:1:1: warning: data definition has no type or storage class 1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}pri...
s078061870
p00425
C
a=-1,A=65,d;char*N="GKSOCNWLDFVTBRXHAJUPEMQI",*E="PHLTIDOXQAGWECSUMBKVJFNR",s[9];main(c){for(;c-48&&scanf("%s",s);a+=d/4+1)(c=*s)<A?~a&&printf("%d\n",a),a=d=0:0,d=(c==78?d=N[d]:c==69?d=E[d]:c==83?d=N[N[N[d]-A]-A]:c==87?d=E[E[E[d]-A]-A]:d+A)-A,c==82?d=d&28|d%4+1&3:d,c==76?d=d&28|d%4+3&3:d;
main.c:1:1: warning: data definition has no type or storage class 1 | a=-1,A=65,d;char*N="GKSOCNWLDFVTBRXHAJUPEMQI",*E="PHLTIDOXQAGWECSUMBKVJFNR",s[9];main(c){for(;c-48&&scanf("%s",s);a+=d/4+1)(c=*s)<A?~a&&printf("%d\n",a),a=d=0:0,d=(c==78?d=N[d]:c==69?d=E[d]:c==83?d=N[N[N[d]-A]-A]:c==87?d=E[E[E[d]-A]-A]:d+A)-A,c==...
s739255143
p00425
C
a=-1,A=65,d;char*N="GKSOCNWLDFVTBRXHAJUPEMQI",*E="PHLTIDOXQAGWECSUMBKVJFNR",s[9];main(c){for(;c-48&&scanf("%s",s);a+=d/4+1)(c=*s)<A?~a&&printf("%d\n",a),a=d=0:0,d=(c==78?d=N[d]:c==69?d=E[d]:c==83?d=N[N[N[d]-A]-A]:c==87?d=E[E[E[d]-A]-A]:d+A)-A,d=c==82|c==76?d&28|d%4+3-c/80*2&3:d;gets(s);}
main.c:1:1: warning: data definition has no type or storage class 1 | a=-1,A=65,d;char*N="GKSOCNWLDFVTBRXHAJUPEMQI",*E="PHLTIDOXQAGWECSUMBKVJFNR",s[9];main(c){for(;c-48&&scanf("%s",s);a+=d/4+1)(c=*s)<A?~a&&printf("%d\n",a),a=d=0:0,d=(c==78?d=N[d]:c==69?d=E[d]:c==83?d=N[N[N[d]-A]-A]:c==87?d=E[E[E[d]-A]-A]:d+A)-A,d=c...
s472293513
p00425
C
N[]={ 6, 14, 18, 10, 2, 9, 22, 15, 1, 17, 23, 7, 3, 5, 21, 19, 0, 13, 20, 11, 4, 8, 16, 12}; E[]={13, 17, 9, 5, 8, 21, 14, 1, 16, 22, 6, 0, 4, 20, 18, 2, 12, 23, 10, 3, 11, 19, 15, 7}; R[]={ 3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 14, 19, 16, 17, 18, 23, 20, 21, 22}; a; d; T,F,R; c...
main.c:1:1: warning: data definition has no type or storage class 1 | N[]={ 6, 14, 18, 10, 2, 9, 22, 15, 1, 17, 23, 7, 3, 5, 21, 19, 0, 13, 20, 11, 4, 8, 16, 12}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int] main.c:2:1: warning: data definition has no type or s...
s195537723
p00425
C
int D,d,c,a,X=448;char s[9];int main(){for(;c+21&&scanf("%s",s);a+=D/64)c=*s-69,d=511-D,D=c-9?c-14?c?c-18?c-13?c-7?a&&printf("%d\n",a),a=0,83:D&X|d*8&56|D/8&7:D&X|D*8&56|d/8&7:D*64&X|D&56|d/64:d*64&X|D&56|D/64:d*8&X|D/8&56|D&7:D*8&X|d/8&56|D&7;
main.c: In function 'main': main.c:1:51: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | int D,d,c,a,X=448;char s[9];int main(){for(;c+21&&scanf("%s",s);a+=D/64)c=*s-69,d=511-D,D=c-9?c-14?c?c-18?c-13?c-7?a&&printf("%d\n",a),a=0,83:D&X|d*8&56|D/8&7:D&X|D*8&56|d/8&7:D*64&X|D&56|d...
s695328602
p00425
C
#include<stdio.h> int main(){ int north,east,west,south,cen,n,sum,b; char str[6]; sum=1; scanf("%d",&n); north=5; cen=1; south=2; west=4; east=3; for(i=0;i<n;i++){ scanf("%s",str); if(str[0]=='N'){ north=cen; cen=south; south=7-north; }else if(str[0]=='E'){ east=...
main.c: In function 'main': main.c:13:7: error: 'i' undeclared (first use in this function) 13 | for(i=0;i<n;i++){ | ^ main.c:13:7: note: each undeclared identifier is reported only once for each function it appears in
s650303496
p00425
C
#include<stdio.h> #include<string.h> int main(void){ int top=1,bottom=6,east=3,west=4,south=2,north=5; int top_=1,bottom_=6,east_=4,west_=3,south_=2,north_=5; int n, sum=1; char act[256]; while(1){ scanf("%d",&n); if(n!=0){ while(n>=0){ gets(act); if(!strcmp(act,"North")){ top = south; ...
main.c: In function 'main': main.c:14:33: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 14 | gets(act); | ^~~~ | fgets
s861768344
p00425
C
#include<stdio.h> #include<string.h> #include<stdlib.h> int main(void){ int top=1,bottom=6,east=3,west=4,south=2,north=5; int top_=1,bottom_=6,east_=4,west_=3,south_=2,north_=5; int n, sum=1; char act[256]; while(1){ scanf("%d",&n); if(n!=0){ while(n>=0){ gets(act); if(!strcmp(act,"North")){...
main.c: In function 'main': main.c:15:33: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 15 | gets(act); | ^~~~ | fgets
s146756902
p00425
C
#include <stdio.h> typedef struct { int up; int left; int right; int front; int back; int down; } dice_t; void init(dice_t* dice) { dice->up=1; dice->left=4; dice->right=3; dice->front=2; dice->back=5; dice->down=6; } void North(dice_t* dice) { int temp; temp=dice->up; dice->up=dice->front; dice->fro...
main.c: In function 'main': main.c:87:32: error: 'size' undeclared (first use in this function); did you mean 'sizi'? 87 | switch(size[0]) { | ^~~~ | sizi main.c:87:32: note: each undeclared identifier is reported only ...
s888952072
p00425
C
#include <stdio.h> #include <string.h> void no(int *x,int *y,int *z,int *s){ int n=*x; *x=*y; *y=7-n; *s+=*x; } void ea(int *x,int *y,int *z,int *s){ int n=*x; *x=7-*z; *z=n; *s+=*x; return; } void we(int *x,int *y,int *z,int *s){ int n=*x; *x=*z; *z=7-n; *s+=*x; return; } void so(int *x,int *y,int *z,in...
main.c: In function 'main': main.c:82:1: error: stray '\343' in program 82 | <U+3000><U+3000><U+3000><U+3000><U+3000>return 0; | ^~~~~~~~ main.c:82:3: error: stray '\343' in program 82 | <U+3000><U+3000><U+3000><U+3000><U+3000>return 0; | ^~~~~~~~ main.c:82:5: error: stray '\343' in program ...
s219028112
p00425
C
#include <stdio.h> #include <stdlib.h> #include <string.h> void no(int *x,int *y,int *z,int *s){ int n=*x; *x=*y; *y=7-n; *s+=*x; } void ea(int *x,int *y,int *z,int *s){ int n=*x; *x=7-*z; *z=n; *s+=*x; return; } void we(int *x,int *y,int *z,int *s){ int n=*x; *x=*z; *z=7-n; *s+=*x; return; } void so(int...
main.c: In function 'main': main.c:83:1: error: stray '\343' in program 83 | <U+3000><U+3000><U+3000><U+3000><U+3000>return 0; | ^~~~~~~~ main.c:83:3: error: stray '\343' in program 83 | <U+3000><U+3000><U+3000><U+3000><U+3000>return 0; | ^~~~~~~~ main.c:83:5: error: stray '\343' in program ...
s601431189
p00425
C
scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ sum +=saikoro1; scanf("%s",mozi); if(strcmp("North",mozi)==0){ me = 7 - saikoro1; saikoro1 = saikoro2; saikoro2 = me; } if(strcmp("East",mozi)==0){ me = 7-saikoro3; saikoro3 = saikoro1; saikoro1 = me; } if(strcmp("West",mozi)==0){ m...
main.c:1:15: error: expected declaration specifiers or '...' before string constant 1 | scanf("%d",&n); | ^~~~ main.c:1:20: error: expected declaration specifiers or '...' before '&' token 1 | scanf("%d",&n); | ^ main.c:2:9: error: expected identifier...
s082995523
p00425
C
#include <stdio.h> #include <string.h> enum { UP, FRONT, RIGHT, DOWN, BACK, LEFT, }; int _tmain(int argc, _TCHAR* argv[]) { int dice[6] = {1, 2, 3, 6, 5, 4}; int cnt = 0, times, sum = dice[UP]; printf("回数 => "); scanf("%d", &times); do{ char input[20] = ""; printf("命令 => "); scanf("%s", input)...
main.c:13:22: error: unknown type name '_TCHAR' 13 | int _tmain(int argc, _TCHAR* argv[]) | ^~~~~~
s236853235
p00425
C++
#include <iostream> using namespace std; int main(){ string h; int a; while(cin >> a,a){ int sum = 1,top = 1,dice[4] = {2,3,4,5}; for(int i = 0 ; i < a ; i++){ cin >> h; int tmp = top; if( i == 0 ) top = 1; if(h == "North"){ top = dice[0]; dice[0] = 7 - tmp; dice[3] = tmp;...
a.cc:67:6: error: stray '#' in program 67 | Case # Verdict CPU Time Memory In Out Case Name | ^ a.cc:69:6: error: stray '#' in program 69 | Case #1 : Accepted 00:00 1208 28563 20 judge_data | ^ a.cc:77:13: error: stray '#' in program 77 | Judge Input # ( | ) Judge Output # ( | ) ...
s876739972
p00425
C++
#include <iostream> using namespace std; int main(){ int a[3]={1,2,3}; int n,i,temp,out; char b[6]; while(cin>>n){ if(n==0){break;} a[3]={1,2,3}; out=1; for(i=0;i<n;i++){ cin>>b; if(b[0]=='N'){ temp=a[0]; a[0]=a[1]; a[1]=7-temp; out+=a[0]; }else if(b[0]=='E'){ temp=a[2]; a[2...
a.cc: In function 'int main()': a.cc:9:28: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment 9 | a[3]={1,2,3}; | ^
s938186737
p00425
C++
#include<cstdio> #include<string> #include<iostream> using namespace std; int main(){ while (1){ int u = 1, d = 6, e = 3, w = 4, n = 5, s = 2; int ans = 1; int N; scanf_s("%d", &N); if (N == 0)return 0; for (int i = 0; i < N; i++){ string dir; cin >> dir; int a; if (dir == "North"){ a = u;...
a.cc: In function 'int main()': a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 11 | scanf_s("%d", &N); | ^~~~~~~ | scanf
s987782344
p00425
C++
#include "stdafx.h" #include <iostream> #include <string> #include <utility> using namespace std; void rotate(int& a,int& b,int& c,int& d){ swap(a,b); swap(a,d); swap(c,d); } int main() { int n,sum=1,num[6]={1,2,3,4,5,6}; string s; cin>>n; while(n--){ cin>>s; if(s=="North")rotate(num[5],num[1],num[0],num[4])...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s438672758
p00425
C++
#include <iostream> #include <string> #include <utility> using namespace std; void rotate(int& a,int& b,int& c,int& d){ swap(a,b); swap(a,d); swap(c,d); } int main() { while(ture){ int n,sum=1,num[6]={1,2,3,4,5,6}; string s; cin>>n; if(!n)break; while(n--){ cin>>s; if(s=="North")rotate(num[5],num[1]...
a.cc: In function 'int main()': a.cc:12:15: error: 'ture' was not declared in this scope 12 | while(ture){ | ^~~~
s659676865
p00425
C++
#include<iostream> using namespace std; struct dice{ int court[6]; dice(int c[6]){court[0]=c[0];court[1]=c[1];court[2]=c[2];court[3]=c[3];court[4]=c[4];court[5]=c[5];} dice(){} void roll(char *ch); int top(){return court[0];} }; void dice::roll(char *ch){ int tmp; if(!strcmp("North", ch)){ tmp = court[0]; c...
a.cc: In member function 'void dice::roll(char*)': a.cc:13:13: error: 'strcmp' was not declared in this scope 13 | if(!strcmp("North", ch)){ | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream>...
s123268544
p00425
C++
import java.io.*; // namespace... class aoj0502 { public static void main() { System.out.printf("%d%n", solve()); return; } private int solve() { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); int ret = 1; String buf; int dtop=1, df...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; // namespace... | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:15: error: expected ':' before 'static' 5 | public static void main() { | ^~~~~~~ | : a.cc:...
s580464892
p00425
C++
#include <map> #include <string> using namespace std; // 1<-here //2345 // 6 // // {1,2,3,4,5,6} map<string,int[6]> table={ {"North",{3,2,6,4,1,5}},//north {"East",{2,6,3,1,5,4}},//east {"West",{4,1,3,6,5,2}},//west {"South",{5,2,1,4,6,3}},//south {"Right",{1,5,2,3,4,6}},//right {"Left",{1,3,4,5,2,6}} //left }...
a.cc:19:1: error: could not convert '{{"North", {3, 2, 6, 4, 1, 5}}, {"East", {2, 6, 3, 1, 5, 4}}, {"West", {4, 1, 3, 6, 5, 2}}, {"South", {5, 2, 1, 4, 6, 3}}, {"Right", {1, 5, 2, 3, 4, 6}}, {"Left", {1, 3, 4, 5, 2, 6}}}' from '<brace-enclosed initializer list>' to 'std::map<std::__cxx11::basic_string<char>, int [6]>' ...
s421713444
p00425
C++
/* * File Name :.cpp * Author : * Date : * Explain : */ #include <map> #include <string> using namespace std; // 1<-here //2345 // 6 // // {1,2,3,4,5,6} map<string,int[6]> table; table["North"]={3,2,6,4,1,5}};//north table["East"]={2,6,3,1,5,4}};//east table["West"]={4,1,3,6,5,2}};//west table["South"]={5,2,1,...
a.cc:18:9: error: 'table' does not name a type; did you mean 'mutable'? 18 | table["North"]={3,2,6,4,1,5}};//north | ^~~~~ | mutable a.cc:18:37: error: expected declaration before '}' token 18 | table["North"]={3,2,6,4,1,5}};//north | ...
s704346395
p00425
C++
/* * File Name :.cpp * Author : * Date : * Explain : */ #include <map> #include <string> using namespace std; // 1<-here //2345 // 6 // // {1,2,3,4,5,6} map<string,int[6]> table; table["North"]={3,2,6,4,1,5};//north table["East"] ={2,6,3,1,5,4};//east table["West"] ={4,1,3,6,5,2};//west table["South"]={5,2,1,4...
a.cc:18:9: error: 'table' does not name a type; did you mean 'mutable'? 18 | table["North"]={3,2,6,4,1,5};//north | ^~~~~ | mutable a.cc:19:9: error: 'table' does not name a type; did you mean 'mutable'? 19 | table["East"] ={2,6,3,1,5,4};//east | ^~~~~ ...
s743891154
p00425
C++
/* * File Name :.cpp * Author : * Date : * Explain : */ #include <map> #include <string> using namespace std; // 1<-here //2345 // 6 // // {1,2,3,4,5,6} map<string,int[6]> table; table["North"]={3,2,6,4,1,5};//north table["East"] ={2,6,3,1,5,4};//east table["West"] ={4,1,3,6,5,2};//west table["South"]={5,2,1,4...
a.cc:18:9: error: 'table' does not name a type; did you mean 'mutable'? 18 | table["North"]={3,2,6,4,1,5};//north | ^~~~~ | mutable a.cc:19:9: error: 'table' does not name a type; did you mean 'mutable'? 19 | table["East"] ={2,6,3,1,5,4};//east | ^~~~~ ...
s391577365
p00425
C++
#include<iostream> #include <string> #include <utility> using namespace std; int main(){ while(1){ int n = 0; cin >> n; if(n == 0){break;} int sum = 1; int a[7]; for(int i = 0;i <= 6;i++){ a[i] = i + 1; } for (int i = 1;i <= n;i++){ string c;string N = "North";string E = "East";string S = "South";string W = "West"; s...
a.cc: In function 'int main()': a.cc:35:10: error: expected ';' before '{' token 35 | if(c == L{ | ^ | ; a.cc:35:6: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>...
s459022304
p00425
C++
# -*- coding:shift-jis -*- class Dice: def __init__(self): self.top = 1 self.south = 2 self.north = 5 self.east = 3 self.west = 4 self.bottom = 6 def rotate(self,operation): if operation == "North": self.top,self.north,self.bottom,self.so...
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding:shift-jis -*- | ^ a.cc:5:9: error: expected class-name before '__init__' 5 | def __init__(self): | ^~~~~~~~ a.cc:5:9: error: expected '{' before '__init__' a.cc:5:18: error: 'self' was not declared in this scope 5...
s235273372
p00425
C++
# -*- coding:shift-jis -*- class Dice: def __init__(self): self.top = 1 self.south = 2 self.north = 5 self.east = 3 self.west = 4 self.bottom = 6 def rotate(self,operation): if operation == "North": self.top,self.north,self.bottom,self.so...
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding:shift-jis -*- | ^ a.cc:5:9: error: expected class-name before '__init__' 5 | def __init__(self): | ^~~~~~~~ a.cc:5:9: error: expected '{' before '__init__' a.cc:5:18: error: 'self' was not declared in this scope 5...
s761036815
p00425
C++
??£??£???
a.cc:1:3: error: extended character £ is not valid in an identifier 1 | ??£??£??? | ^ a.cc:1:6: error: extended character £ is not valid in an identifier 1 | ??£??£??? | ^ a.cc:1:1: error: expected unqualified-id before '?' token 1 | ??£??£??? | ^
s375971868
p00425
C++
import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Deque; import java.util.HashMap; import java.util.InputMismatchException; ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.InputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.InputStreamReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '...
s973999258
p00425
C++
#include<stdio.h> #include<string.h> #include<iostream> using namespace std; int main(void){ int n, b = 1, z1 = 2, z2 = 3, n1, n2, g = 1; char muki[10]; while (1){ scanf_s("%d", &n); b = 1, z1 = 2, z2 = 3, g = 1; for (int i = 0; i < n; i++){ scanf_s("%s", muki, 10); if (strcmp(muki, "North") == 0){ ...
a.cc: In function 'int main()': a.cc:10:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | scanf_s("%d", &n); | ^~~~~~~ | scanf