submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s365101627
p01694
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n,n){ string str,a="rldu"; bool leg[2]={}; int ans=0,now=1,num[2]={0,1}; for(;n>0;n--){ cin>>str; for(int i=0;i<2;i++)if(str[0]==a[i])for(int j=0;j<2;j++)if(str[1]==a[2+j])leg[i]...
a.cc: In function 'int main()': a.cc:19:6: error: expected '}' at end of input 19 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s167413792
p01694
C++
#include <iostream> #include <fstream> #include<string> using namespace std; int main(){ while (1) { int steps, count=0; cin >> steps; string leg1, leg2; if (steps == 0){ break; } int loops; if (steps % 2 == 1) { loops = (steps + 1) / 2; } else { loops = steps / 2; } for (int i = 0; i < loops; i++) ...
a.cc: In function 'int main()': a.cc:35:18: error: expected '}' at end of input 35 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s827044715
p01694
C++
#include <iostream> #include <fstream> #include<string> using namespace std; int main(){ while (1) { int steps, count=0; cin >> steps; string leg1, leg2; if (steps == 0){ break; } int loops; if (steps % 2 == 1) { loops = (steps + 1) / 2; } else { loops = steps / 2; } for (int i = 0; i < loops; i++) ...
a.cc: In function 'int main()': a.cc:35:18: error: expected '}' at end of input 35 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s216560167
p01694
C++
#include <iostream> #include <fstream> #include <string> using namespace std; int main(){ while (1) { int steps, count=0; cin >> steps; string leg1, leg2; if (steps == 0){ break; } int loops; if (steps % 2 == 1) { loops = (steps + 1) / 2; } else { loops = steps / 2; } for (int i = 0; i < loops; i++) ...
a.cc: In function 'int main()': a.cc:35:18: error: expected '}' at end of input 35 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s119914514
p01694
C++
#include <iostream> #include <fstream> #include <string> using namespace std; int main(){ while (1) { int steps, count=0; cin >> steps; string leg1, leg2; if (steps == 0){ break; } int loops; if (steps % 2 == 1) { loops = (steps + 1) / 2; } else { loops = steps / 2; } for (int i = 0; i < loops; i++) ...
a.cc: In function 'int main()': a.cc:35:18: error: expected '}' at end of input 35 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s716714993
p01694
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #include<stack> #include<complex> #define vi vector<int> #define vvi vector<vector<int> > #define ll long long int #define vl vector<ll> #define vvl v...
a.cc: In function 'int main()': a.cc:40:12: error: 'strcmp' was not declared in this scope 40 | if(strcmp(s,"lu") == 0) stl.push(1); | ^~~~~~ a.cc:13:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<complex> +++ |+...
s281015222
p01694
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #include<stack> #include<complex> #define vi vector<int> #define vvi vector<vector<int> > #define ll long long int #define vl vector<ll> #define vvl v...
a.cc: In function 'int main()': a.cc:40:12: error: 'strcmp' was not declared in this scope 40 | if(strcmp(s,"lu") == 0) stl.push(1); | ^~~~~~ a.cc:13:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<complex> +++ |+...
s154847344
p01694
C++
#include<string> using namespace std; int main(){ while(1){ int n,a=0,b=0,kai=0; string asi; cin>>n; if(n==0)break; for(int i=0;i<n;i++){ cin>>asi; if(asi[0]=='r'){ if(asi[1]=='u')a++; else a--; } if(asi[0]=='l'){ if(asi[1]=='u')b++; else b--...
a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope 7 | cin>>n; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<string> +++ |+#include <iostream> 2 | using namespace st...
s559884134
p01694
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s781206226
p01695
Java
#include <bits/stdc++.h> using namespace std; using ll=long long; #define int ll #define FOR(i,a,b) for(int i=int(a);i<int(b);i++) #define REP(i,b) FOR(i,0,b) int read(){ int i; scanf("%lld",&i); return i; } signed main(){ while(true){ int n=read(); if(n==0) return 0; string s[n]; int cnt[n]...
Main.java:1: error: illegal character: '#' #include <bits/stdc++.h> ^ Main.java:1: error: class, interface, enum, or record expected #include <bits/stdc++.h> ^ Main.java:4: error: unnamed classes are a preview feature and are disabled by default. using ll=long long; ^ (use --enable-preview to enable unnamed ...
s934142544
p01695
C++
#include <iostream> #include <string> #include <cstdio> #include <cctype> #include <cstring> using namespace std; #define loop(i,a,b) for(int i=(a); i<int(b); i++) #define rep(i,b) loop(i,0,b) int main(){ int n; while(cin>>n && n){ static char g[2000][2000]; memset(g,0,sizeof(g)); rep...
a.cc: In function 'int main()': a.cc:30:34: error: expected ';' before ')' token 30 | for(g[i][j]!='+'; j++); | ^ | ;
s524525811
p01695
C++
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <iostream> #include <cstdio> #include <sstream> #include <cmath> #include <cstdlib> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> #include <bitset> #i...
a.cc: In function 'int main()': a.cc:90:19: error: 'esponses' was not declared in this scope; did you mean 'responses'? 90 | printf("%s",esponses[line_idx]); | ^~~~~~~~ | responses
s983223314
p01695
C++
#include <iostream> #include <vector> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; while(cin >> n && n){ string post[1000]; int depth[1000]; fill(depth, depth+n, 0); for(int x = 0; x < n; x++){ cin >> post[x]; } ...
a.cc: In function 'int main()': a.cc:17:35: error: 'upper_bound' was not declared in this scope 17 | string::iterator ub = upper_bound(post[x].begin(), post[x].end(), 'A'); | ^~~~~~~~~~~
s860634132
p01695
C++
#include<iostream> #include<cstring> #include<algorithm> using namespace std; int main(int argc, char *argv[]){ int n; while(cin >> n, n){ string s[1001]; for (int i = 0; i < n; i++) { cin >> s[i]; } int depth = 0; for (int i = 1; i < n; i++) { depth = max(depth, s[i]); for (i...
a.cc: In function 'int main(int, char**)': a.cc:15:18: error: no matching function for call to 'max(int&, std::string&)' 15 | depth = max(depth, s[i]); | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40,...
s821919360
p01695
C++
#include<iostream> #include<cstring> #include<algorithm> using namespace std; int main(int argc, char *argv[]){ int n; while(cin >> n, n){ string s[1001]; for (int i = 0; i < n; i++) { cin >> s[i]; } int depth = 0; for (int i = 1; i < n; i++) { depth = max(depth, s[i].length()); ...
a.cc: In function 'int main(int, char**)': a.cc:15:18: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)' 15 | depth = max(depth, s[i].length()); | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, f...
s171250867
p01695
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { while( true ) { long long int n; cin >> n; if ( n == 0 ) break; vector< string > v; long long int m = 0; for ( long long int i = 0; i < n; i++ ) { string in; cin >> in; for ( long...
a.cc: In function 'int main()': a.cc:31:14: error: no matching function for call to 'max(long long int&, long long unsigned int)' 31 | m = max( m, 1LL * in.size() ); | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/l...
s486123406
p01695
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { while( true ) { long long int n; cin >> n; if ( n == 0 ) break; vector< string > v; long long int m = 0; for ( long long int i = 0; i < n; i++ ) { string in; cin >> in; for ( long...
a.cc: In function 'int main()': a.cc:31:14: error: no matching function for call to 'max(long long int, std::__cxx11::basic_string<char>::size_type)' 31 | m = max( 1 * m, 1 * in.size() ); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /u...
s742197268
p01695
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { while( true ) { long long int n; cin >> n; if ( n == 0 ) break; vector< string > v; long long int m = 0; for ( long long int i = 0; i < n; i++ ) { string in; cin >> in; for ( long...
a.cc: In function 'int main()': a.cc:31:14: error: no matching function for call to 'max(long long int, long long unsigned int)' 31 | m = max( 1LL * m, 1LL * in.size() ); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c+...
s424838606
p01695
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]
s313297294
p01695
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]
s982369383
p01695
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]
s367487216
p01695
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]
s338953242
p01695
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]
s656940468
p01695
C++
var $x = function (xp, dc) { function c(f) { var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documentElement.appendChild(c.createContextualFragment(a))...
a.cc:1:54: error: empty character constant 1 | var $x = function (xp, dc) { function c(f) { var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documen...
s933710457
p01695
C++
var $x = function (xp, dc) { function c(f) { var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documentElement.appendChild(c.createContextualFragment(a))...
a.cc:1:54: error: empty character constant 1 | var $x = function (xp, dc) { function c(f) { var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documen...
s168341349
p01695
C++
var $x = function (xp, dc) { function c(f) { var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documentElement.appendChild(c.createContextualFragment(a))...
a.cc:1:54: error: empty character constant 1 | var $x = function (xp, dc) { function c(f) { var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documen...
s968109655
p01695
C++
browser.execute_script(""" var $x = function (xp, dc) { function c(f) { var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b...
a.cc:1:26: warning: missing terminating " character 1 | browser.execute_script(""" | ^ a.cc:1:26: error: missing terminating " character a.cc:4:37: error: empty character constant 4 | var g = ''; if (typeof f === 'string') { g = f; } var h = function (a...
s745768790
p01695
C++
print(".....END.....")
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(".....END.....") | ^
s868815530
p01695
C++
print(".....END.....")print(".....END.....")
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token 1 | print(".....END.....")print(".....END.....") | ^
s010604182
p01695
C++
browser=webdriver.Chrome('./chromedriver')
a.cc:1:26: warning: multi-character literal with 14 characters exceeds 'int' size of 4 bytes 1 | browser=webdriver.Chrome('./chromedriver') | ^~~~~~~~~~~~~~~~ a.cc:1:1: error: 'browser' does not name a type 1 | browser=webdriver.Chrome('./chromedriver') | ^~~~~~~
s531134693
p01695
C++
#?????????????????¨?§? browser.get()
a.cc:1:2: error: invalid preprocessing directive #? 1 | #?????????????????¨?§? | ^ a.cc:1:21: error: extended character § is not valid in an identifier 1 | #?????????????????¨?§? | ^ a.cc:2:5: error: 'browser' does not name a type 2 | browser.get() | ^~~~~~~
s733673308
p01695
C++
var $x = function (xp, dc) { function c(f) { var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documentElement.appendChild(c....
a.cc:3:25: error: empty character constant 3 | var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documentElement.appendChild(c.create...
s688622326
p01695
C++
var $x = function (xp, dc) { function c(f) { var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documentElement.appendChild(c....
a.cc:3:25: error: empty character constant 3 | var g = ''; if (typeof f === 'string') { g = f; } var h = function (a) { var b = document.implementation.createHTMLDocument(''); var c = b.createRange(); c.selectNodeContents(b.documentElement); c.deleteContents(); b.documentElement.appendChild(c.create...
s250125137
p01695
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:28:34: error: stray '#' in program 28 | }#define _USE_MATH_DEFINES | ^ a.cc: In function 'int main()': a.cc:28:35: error: 'define' was not declared in this scope 28 | }#define _USE_MATH_DEFINES | ...
s274537071
p01695
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:28:34: error: stray '#' in program 28 | }#define _USE_MATH_DEFINES | ^ a.cc: In function 'int main()': a.cc:28:35: error: 'define' was not declared in this scope 28 | }#define _USE_MATH_DEFINES | ...
s891918136
p01695
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:28:26: error: stray '#' in program 28 | }#define _USE_MATH_DEFINES | ^ a.cc: In function 'int main()': a.cc:28:27: error: 'define' was not declared in this scope 28 | }#define _USE_MATH_DEFINES | ^~...
s062092563
p01695
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int cnt[60],n; string s[1010],z; while(cin>>n&&n){ cin>>z;cout<<z<<endl;n--; memset(cnt,-1,sizeof(cnt)); for(int i=0;i<n;i++){ cin>>s[i]; int k=0; for(int j=s[i].size()-1;j>=0;j--){ if(s[i][j]=='.')s[i][j]=' '; else k=j-1; } f...
a.cc: In function 'int main()': a.cc:9:9: error: 'memset' was not declared in this scope 9 | memset(cnt,-1,sizeof(cnt)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<algorithm> +++ |+#include <cst...
s226809258
p01695
C++
#include<iostream> #include<string> #include<vector> using namespace std; int calcLevel(const string _str) { int level = 0; for(const auto& c : _str) { if(c == '.')++level; else break; } return level; } int main() { int n; while(cin >> n, n != 0) { vector<string> ans; ans.reserve(n); int postLeve...
a.cc: In function 'int main()': a.cc:38:33: error: 'replace' was not declared in this scope 38 | replace(input.begin(), input.end(), '.', ' '); | ^~~~~~~
s689966174
p01695
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n,n){ vector<string> str(n); for(int i=0;i<n;i++){ cin>>str[i]; } vector<string> res(n); for(int i=0;i<n;i++){ res[i].assign(str[i].size()); int dotcnt=0; ...
a.cc: In function 'int main()': a.cc:13:26: error: no matching function for call to 'std::__cxx11::basic_string<char>::assign(std::__cxx11::basic_string<char>::size_type)' 13 | res[i].assign(str[i].size()); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:...
s618754088
p01695
C++
#include "bits/stdc++.h" using namespace std; #define mod 1000000007 #define all(c) begin(c),end(c) template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); } template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); } using ll = long long; using vi = vector<int>; using vs = vector<string...
a.cc: In function 'void solve()': a.cc:16:13: error: expected initializer before ')' token 16 | vs S); | ^ a.cc:21:17: error: 'S' was not declared in this scope 21 | S = vi(N); | ^
s330770837
p01695
C++
#include "bits/stdc++.h" using namespace std; #define mod 1000000007 #define all(c) begin(c),end(c) template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); } template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); } using ll = long long; using vi = vector<int>; using vs = vector<string...
a.cc: In function 'void solve()': a.cc:35:29: error: 'B' was not declared in this scope 35 | if (B[A[i]] >= 1) | ^ a.cc:50:25: error: 'B' was not declared in this scope 50 | B[A[i]] = i; | ^
s965386515
p01695
C++
/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
s385546473
p01696
Java
while True: s = input() if s == '.':break while True: if s.find('+') == -1 and s.find('-') == -1: index = s.rfind('[') if index == -1:break e = s.find(']', index) s = s[:index] + s[index + 1:e][::-1] + s[e + 1:] else: index = s.find...
Main.java:1: error: class, interface, enum, or record expected while True: ^ 1 error
s836015238
p01696
C++
#include<iostream> #include<cstdio> #include<string> #include<cstring> #include<vector> #include<set> #include<list> #include<queue> #include<cmath> #include<functional> #include<algorithm> #define INF (1<<29) #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; string form(string &s){ st...
a.cc: In function 'int main()': a.cc:62:34: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::string' {aka 'std::__cxx11::basic_string<char>'} 62 | string t=rev(form(s)); | ~~~~^...
s088870233
p01696
C++
#include<iostream> #include<string> using namespace std; int main(){ string sol[100]; int nsol; string inp; int n; int c; while(1){ cin>>inp; if(inp==".") break; n=0; c=0; for(int i=0;i<100;i++) sol[i]=""; for(int i=0;i<inp.size();i++){ switch(inp[i]){ case '+': c++; break; cas...
a.cc: In function 'int main()': a.cc:39:33: error: 'reverse' was not declared in this scope 39 | reverse(sol[n].begin(),sol[n].end()); | ^~~~~~~
s608756072
p01696
C++
#include<iostream> #include<string> #include<cstring> using namespace std; int main(){ string sol[100]; int nsol; string inp; int n; int c; while(1){ cin>>inp; if(inp==".") break; n=0; c=0; for(int i=0;i<100;i++) sol[i]=""; for(int i=0;i<inp.size();i++){ switch(inp[i]){ case '+': c++;...
a.cc: In function 'int main()': a.cc:40:33: error: 'reverse' was not declared in this scope 40 | reverse(sol[n].begin(),sol[n].end()); | ^~~~~~~
s733986186
p01696
C++
#include<iostream> #include<string> #include<cstdio> using namespace std; int main(){ string sol[100]; int nsol; string inp; int n; int c; while(1){ cin>>inp; if(inp==".") break; n=0; c=0; for(int i=0;i<100;i++) sol[i]=""; for(int i=0;i<inp.size();i++){ switch(inp[i]){ case '+': c++; ...
a.cc: In function 'int main()': a.cc:40:33: error: 'reverse' was not declared in this scope 40 | reverse(sol[n].begin(),sol[n].end()); | ^~~~~~~
s389690570
p01696
C++
#include <iostream> #include<vector> #include<string> #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; int main(void){ string g,h; int i = 0; vector<int>ireko; bool LeftKakko = false; int k = 0; while ((cin >> g), g != "."){ REP(l, g.length()){ char a = g[l]; if (a == 43){ i++; ...
a.cc: In function 'int main()': a.cc:24:33: error: 'reverse' was not declared in this scope 24 | reverse(h.begin() + ireko.back(), h.end()); | ^~~~~~~
s604687260
p01696
C++
#include <iostream> #include<vector> #include<string> #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; int main(){ string g,h; int i = 0; vector<int>ireko; bool LeftKakko = false; int k = 0; while ((cin >> g), g != "."){ REP(l, g.length()){ char a = g[l]; if (a == 43){ i++; }el...
a.cc: In function 'int main()': a.cc:24:33: error: 'reverse' was not declared in this scope 24 | reverse(h.begin() + ireko.back(), h.end()); | ^~~~~~~
s150366433
p01696
C++
#include <iostream> #include<vector> #include<string> #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; int main(){ string g,h; int i = 0; vector<int>ireko; bool LeftKakko = false; int k = 0; while ((cin >> g), g != "."){ REP(l, g.length()){ char a = g[l]; if (a == 43){ i++; }el...
a.cc: In function 'int main()': a.cc:24:38: error: 'reverse' is not a member of 'std' 24 | std::reverse(h.begin() + ireko.back(), h.end()); | ^~~~~~~
s505468937
p01696
C++
#include <iostream> #include<vector> #include<string> #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; int main(){ string g,h; int i = 0; vector<int>ireko; bool LeftKakko = false; int k = 0; while ((cin >> g), g != "."){ REP(l, g.length()){ char a = g[l]; if (a == 43){ i++; }el...
a.cc: In function 'int main()': a.cc:24:33: error: 'reverse' was not declared in this scope 24 | reverse(h.begin() + ireko.back(), h.end()); | ^~~~~~~
s926765497
p01696
C++
#include <iostream> #include<vector> #include<string> #define REP(i,n) for(int i=0;i<(int)(n);i++) //using namespace std; int main(){ string g,h; int i = 0; std::vector<int>ireko; bool LeftKakko = false; int k = 0; while ((std::cin >> g), g != "."){ REP(l, g.length()){ char a = g[l]; if (a == 43){ ...
a.cc: In function 'int main()': a.cc:9:9: error: 'string' was not declared in this scope 9 | string g,h; | ^~~~~~ a.cc:9:9: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c+...
s283009444
p01696
C++
#include <iostream> #include<vector> #include<string> #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; int main(){ string g,h; int i = 0; vector<int>ireko; bool LeftKakko = false; int k = 0; while ((std::cin >> g), g != "."){ REP(l, g.length()){ char a = g[l]; if (a == 43){ i++; ...
a.cc: In function 'int main()': a.cc:24:38: error: 'reverse' is not a member of 'std' 24 | std::reverse(h.begin() + ireko.back(), h.end()); | ^~~~~~~
s668595316
p01696
C++
#include <iostream> #include<vector> #include<string> #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; int main(){ string g,h; int i = 0; vector<int>ireko; bool LeftKakko = false; int k = 0; while ((std::cin >> g), g != "."){ REP(l, g.length()){ char a = g[l]; if (a == 43){ i++; ...
a.cc: In function 'int main()': a.cc:24:33: error: 'reverse' was not declared in this scope 24 | reverse(h.begin() + ireko.back(), h.end()); | ^~~~~~~
s902654736
p01696
C++
#include <iostream> #include <algorithm> #include <string> #include <cctype> using namespace std; typedef string::const_iterator State; string Cipher(State &begin, State &end); string String(State &begin, State &end); string Letter(State &begin); string Cipher(State &begin, State &end) { if (begin == end) {...
a.cc: In function 'int main()': a.cc:101:34: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 101 | cout << Cipher(line.begin(), line.end()) << endl; ...
s519954907
p01696
C++
#include<iostream> #include<string> using namespace std; string rev(string str){ for(int i=0;i<str.length();i++){ if(str[i]=='['){ int j; int co=1; for(j=i+1;j<str.length();j++){ if(str[j]=='[')co++; if(str[j]==']')co--; if...
a.cc: In function 'int main()': a.cc:58:28: error: 'n' was not declared in this scope 58 | if(str[i]=='?')n="A"; | ^
s406345333
p01696
C++
#include<iostream> #include<string> using namespace std; string rev(string str){ for(int i=0;i<str.length();i++){ if(str[i]=='['){ int j; int co=1; for(j=i+1;j<str.length();j++){ if(str[j]=='[')co++; if(str[j]==']')co--; if...
a.cc: In function 'int main()': a.cc:58:35: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 58 | if(str[i]=='?')str[i]="A"; | ^~~ | ...
s473215952
p01696
C++
#include<bits/stdc++.h> #define REP(i,n,N) for(int i=(n);i<(int)(N);i++) #define p(s) cout<<(s)<<endl #define ck(n,a,b) (a<=(n)&&(n)<=b using namespace std; string s,ans; stack<int> st; void bng(unsigned int pos,int diff){ if(pos==s.size()) return; if(ck(s[pos],'A','Z')){ ans+=(char) (s[pos]-'A'+diff)%26 + 'A'; ...
a.cc: In function 'void bng(unsigned int, int)': a.cc:11:31: error: expected ';' before '{' token 11 | if(ck(s[pos],'A','Z')){ | ^ | ; a.cc:14:10: error: expected primary-expression before 'else' 14 | }else if(s[pos]=='+'){ ...
s858851184
p01696
C++
#include <iostream> #include <vector> #include <string> #include <cassert> using namespace std; string S; char step(char ch, int offset) { if (ch == '?') return 'A'; return ((ch - 'A') + offset + 26*1000) % 26 + 'A'; } pair<string, int> parse(int idx) { string res = ""; while (idx < S.size()) { ...
a.cc: In function 'std::pair<std::__cxx11::basic_string<char>, int> parse(int)': a.cc:18:13: error: 'reverse' was not declared in this scope 18 | reverse(res.begin(), res.end()); | ^~~~~~~
s137183220
p01696
C++
#include <iostream> #include <vector> #include <string> #include <cassert> using namespace std; string S; char step(char ch, int offset) { if (ch == '?') return 'A'; return ((ch - 'A') + offset + 26*1000) % 26 + 'A'; } pair<string, int> parse(int idx) { string res = ""; while (idx < S.size()) { ...
a.cc: In function 'std::pair<std::__cxx11::basic_string<char>, int> parse(int)': a.cc:18:13: error: 'reverse' was not declared in this scope 18 | reverse(res.begin(), res.end()); | ^~~~~~~
s962663162
p01697
C++
#include <cstdlib> #include <functional> #include <iostream> #include <queue> #include <vector> using namespace std; #define REP(i, a, b) for(int i = (a); i < int(b); ++i) #define rep(i, n) REP(i, 0, n) template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; } struct state { int v, t, d; state(int...
a.cc:29:72: error: 'bitset' does not name a type 29 | int dijkstra(int s, int t, int h, const vector<vector<edge>> &G, const bitset<MAX_K> &b) { | ^~~~~~ a.cc:29:78: error: expected ',' or '...' before '<' token 29 | int dijkstra(int s, ...
s717366599
p01697
C++
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <iostream> #include <cstdio> #include <sstream> #include <cmath> #include <cstdlib> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> #include <bitset> #i...
a.cc: In function 'int main()': a.cc:116:14: error: 'passpors' was not declared in this scope; did you mean 'passports'? 116 | if(passpors[i] >= INF){ | ^~~~~~~~ | passports a.cc:163:5: error: jump to label 'fail' 163 | fail:; | ^~~~ a.cc:117:18: note: ...
s202714108
p01697
C++
#include <iostream> #include <vector> #include <set> #include <map> #include <string> #include <stack> #include <functional> #include <queue> #include <tuple> using namespace std; #define rep(i,n) for(int i = 0;i < n;i++) #define each(i,n) for(auto i : n) #define clr(n) memset(n,0,sizeof(n)) #define mclr(n) memset(n,...
a.cc: In function 'int main()': a.cc:16:17: error: 'memset' was not declared in this scope 16 | #define mclr(n) memset(n,-1,sizeof(n)) | ^~~~~~ a.cc:50:17: note: in expansion of macro 'mclr' 50 | mclr(c); | ^~~~ a.cc:9:1: note: 'memset' is defined in hea...
s669523837
p01697
C++
\#include<bits/stdc++.h> using namespace std; const int inf=1e9; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n,m,h,k; while(cin>>n>>m>>h>>k,n){ vector<tuple<int,int,int,int> > v[101]; for(int i=0;i<m;i++){ int a,b,c,d,e;cin>>a>>b>>c>>d>>e; a--;b--;e--; v[a].push_back(make_tuple(b,c,d,e)...
a.cc:1:1: error: stray '\' in program 1 | \#include<bits/stdc++.h> | ^ a.cc:1:2: error: stray '#' in program 1 | \#include<bits/stdc++.h> | ^ a.cc:1:3: error: 'include' does not name a type 1 | \#include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:3: error: 'ios' has...
s531694270
p01697
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #define all(in) in.begin(),in.end() using namespace std; typedef long long ll; typedef int Def; //typedef int ll; typedef pair<Def,Def> pii; typedef vector<...
a.cc:23:1: error: extended character   is not valid in an identifier 23 |   struct edge { | ^ a.cc:23:1: error: extended character   is not valid in an identifier a.cc:24:1: error: extended character   is not valid in an identifier 24 |     Def to,cost,tim,r; | ^ a.cc:24:1: error: extended character  ...
s149526056
p01697
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #define all(in) in.begin(),in.end() using namespace std; typedef long long ll; typedef int Def; //typedef int ll; typedef pair<Def,Def> pii; typedef vector<...
a.cc:23:1: error: extended character   is not valid in an identifier 23 |   struct edge { | ^ a.cc:23:1: error: extended character   is not valid in an identifier a.cc:24:1: error: extended character   is not valid in an identifier 24 |     Def to,cost,tim,r; | ^ a.cc:24:1: error: extended character  ...
s601358475
p01697
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #define all(in) in.begin(),in.end() using namespace std; typedef long long ll; typedef int Def; //typedef int ll; typedef pair<Def,Def> pii; typedef vector<...
a.cc:23:1: error: extended character   is not valid in an identifier 23 |   struct edge { | ^ a.cc:23:1: error: extended character   is not valid in an identifier a.cc:24:1: error: extended character   is not valid in an identifier 24 |     Def to,cost,tim,r; | ^ a.cc:24:1: error: extended character  ...
s958013117
p01698
Java
import java.awt.geom.Point2D; import java.io.IOException; import java.io.InputStream; import java.util.*; import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.Supplier; public class Main { final static int INF = 1 << 28; final static long LNF = 1L << 60; final stati...
Main.java:22: error: cannot find symbol double c1 = divideInternally(left, right, 1, GOLDEN_RATIO); ^ symbol: method divideInternally(double,double,int,double) location: class Main Main.java:23: error: cannot find symbol double c2 = divideInternally(left, right, GOLDEN_RATIO, 1); ...
s197528500
p01698
Java
import java.awt.geom.Point2D; import java.io.IOException; import java.io.InputStream; import java.util.*; import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.Supplier; public class Main { final static int INF = 1 << 28; final static long LNF = 1L << 60; final stati...
Main.java:172: error: cannot find symbol Pair<Long, Long> gcd_ex(long m, long n) { ^ symbol: class Pair location: class Main Main.java:174: error: cannot find symbol return new Pair<>(mat[0][0], mat[0][1]); ^ symbol: class Pair location: class Main 2 errors
s135105098
p01698
C++
#include <cmath> #include <cstdlib> #include <iostream> #include <queue> #include <vector> using namespace std; #define REP(i, a, b) for(int i = (a); i < int(b); ++i) #define rep(i, n) REP(i, 0, n) constexpr double EPS = 1e-9; struct point { double x, y, z; explicit point(double x_ = 0, double y_ = 0, double z_ = ...
a.cc: In function 'double get_time(const sphere&, const sphere&, const sphere&, const sphere&)': a.cc:52:33: error: 'INT_MAX' was not declared in this scope 52 | if(abs(x) < EPS) return INT_MAX; | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this i...
s955845476
p01698
C++
#include <vector> #include <iomanip> #include <iostream> using namespace std; int n; double px[209], py[209], pz[209], vx[209], vy[209], vz[209], r[209], vr[209], t[209][209], ret[209]; int main() { while (cin >> n, n) { for (int i = 0; i < n; i++) cin >> px[i] >> py[i] >> pz[i] >> vx[i] >> vy[i] >> vz[i] >> r[i] >>...
a.cc: In function 'int main()': a.cc:22:56: error: 'sqrt' was not declared in this scope 22 | double alpha = (-dx1 - sqrt(D)) / (2 * dx2); | ^~~~
s995020637
p01698
C++
#include <iostream> #include <cmath> #include <tuple> #include <vector> using namespace std; typedef tuple<double,double,double> T; T operator-(const T Ta, const T Tb){ double Xa,Ya,Za,Xb,Yb,Zb; tie(Xa,Ya,Za)=Ta; tie(Xb,Yb,Zb)=Tb; return T(Xa-Xb,Ya-Yb,Za-Zb); } double inner_cross(T Ta, T Tb){ doub...
a.cc: In function 'int main()': a.cc:55:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 55 | sort(E.begin(), E.end()); | ^~~~ | sqrt
s765393162
p01698
C++
#include <iostream> #include <vector> #include <cmath> #include <cstdio> #define REP(i, a, n) for(int i = ((int) a); i < ((int) n); i++) #define EPS 1e-10 using namespace std; typedef pair<int, int> pii; typedef pair<double, pii> pdii; int N; double PX[200], PY[200], PZ[200], VX[200], VY[200], VZ[200], R[200], VR[200]...
a.cc: In function 'int main()': a.cc:31:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 31 | sort(vec.begin(), vec.end()); | ^~~~ | sqrt
s560029571
p01698
C++
#include <iostream> #include <vector> #include <utility> #include <cmath> #include <cstdio> #define EPS (1e-10) using namespace std; typedef pair<int,int> pii; struct P{ double X, Y, Z; }; namespace std{ P operator- (const P& a, const P& b){ P ret = {a.X-b.X, a.Y-b.Y,a.Z-b.Z}; return ret; } } double no...
a.cc: In function 'std::vector<double> solve(std::vector<P>&, std::vector<P>&, std::vector<double>&, std::vector<double>&)': a.cc:55:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 55 | sort(collision.begin(), collision.end()); | ^~~~ | sqrt
s420424339
p01699
C++
#include<bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define HUGE_NUM 99999999999999999 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; #define NUM 7 enum Type{ A, B, }; struct Info{ int low,high; }; int N; int POW_2[7],POW_10[7]; i...
a.cc: In function 'void func()': a.cc:269:47: error: cannot convert 'std::vector<int>' to 'int' in assignment 269 | tmp_B = TAIL[b]; | ~~~~~~^ | | | ...
s993663213
p01699
C++
#include<bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define HUGE_NUM 99999999999999999 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; #define NUM 7 enum Type{ A, B, }; struct Info{ int low,high; }; int N; int POW_2[7],POW_10[7]; i...
a.cc: In function 'void func()': a.cc:247:33: error: 'tmp_B' was not declared in this scope; did you mean 'tmp_num'? 247 | tmp_B = TAIL[b_len][b]; | ^~~~~ | tmp_num
s938348230
p01700
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,k,n) for(ll i = (k); i < (n); i++) #define REP(i,n) FOR(i,0,n) #define ALL(a) a.begin(), a.end() #define MS(m,v) memset(m,v,sizeof(m)) #define D10 fixed<<setprecision(10) typedef vector<ll> vi; typedef vector<string> vs; typedef pair<ll, ll> pii; typedef long ...
a.cc:8:16: error: 'll' was not declared in this scope 8 | typedef vector<ll> vi; | ^~ a.cc:8:18: error: template argument 1 is invalid 8 | typedef vector<ll> vi; | ^ a.cc:8:18: error: template argument 2 is invalid a.cc:10:14: error: 'll' was not declared in this scop...
s866597472
p01701
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:23: error: cannot find symbol for(int i=0;i<s.length;i++){ ^ symbol: variable length location: variable s of type String Main.java:83: error: method gcd in class Main cannot be applied to given types; int g=gcd(a.nu,a,de); ^ required: int,int found: int,Fraction,int ...
s700364594
p01701
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:67: error: incompatible types: possible lossy conversion from long to int return reduct(new Fraction(this.nu*a.de+this.de*a.nu,this.de*a.de)); ^ Main.java:71: error: incompatible types: possible lossy conversion from long to int return reduct(new Fraction(this.nu*a...
s360005516
p01701
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:83: error: incompatible types: possible lossy conversion from long to int int g=gcd(a.nu,a.de); ^ 1 error
s688149213
p01701
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:34: error: cannot find symbol else ou.println(dir.get(-1)); ^ symbol: variable ou location: class Main 1 error
s536485417
p01701
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:46: error: cannot find symbol else return ang(n,w-1,tot,dir).add(new Fraction(90,1<<(tot-dep-1))); ^ symbol: variable n location: class Main Main.java:46: error: cannot find symbol else return ang(n,w-1,tot,dir).add(new Fraction(90,1<<(tot-dep-1))); ^ symbol: va...
s125743013
p01701
C
#include<iostream> #include<string> #include<algorithm> #include<vector> using namespace std; int main(){ while(1){ int i, j; vector<int> judge; string S; cin >> S; if(S == "#") break; for(i = 0; i < (int)S.size(); i++){ if(S[i] == 'o') judge.push_back(0); else if(S[i] == 'e') j...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s049504404
p01701
C++
#include<stdio.h> #include<string.h> #include<math.h> char S[105]; int res,n; int dfs(int p,int q) { if(S[p]==0) { n=q/2; return 0; } return dfs(p+(S[p]=='n'?5:4),q*2)+(S[p]=='n'?-1:1)*90*q; } int main() { for(;gets(S),S[0]!='#';memset(S,0,sizeof(S)) { if(!strcmp(S,"n...
a.cc: In function 'int main()': a.cc:19:10: error: 'gets' was not declared in this scope; did you mean 'getw'? 19 | for(;gets(S),S[0]!='#';memset(S,0,sizeof(S)) | ^~~~ | getw a.cc:19:49: error: expected ')' before '{' token 19 | for(;gets(S),S[0]!='#';memset(S,0,sizeof(S)) ...
s565852998
p01701
C++
nclude<iostream> using namespace std; int main() { string s; for(;cin>>s,s!="#";) { double sum=0; int cnt=1; for(int i=s.size()-1;i>=0;i--) { if(cnt==1) { if(s[i]=='n') { sum=0; cnt++; } else if(s[i]=='w') { sum=90; cnt++; } } else ...
a.cc:1:1: error: 'nclude' does not name a type 1 | nclude<iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'string' was not declared in this scope 6 | string s; | ^~~~~~ a.cc:7:8: error: 'cin' was not declared in this scope 7 | for(;cin>>s,s!="#";) | ^~~ a.c...
s900176350
p01701
C++
#include<iostream> #include<cmath> #include<cstring> #include<vector> using namespace std; int gcd(int x,int y){ if(y==0){ return x; }else{ return gcd(y,x%y); } } bool next(string &s){ if(s[0]=='h'){ s=s.substr(5); return 1; } s=s.substr(4); return 0; } int main(){ string n; while(ci...
a.cc: In function 'int main()': a.cc:29:5: error: 'reverse' was not declared in this scope 29 | reverse(n.begin(), n.end()); | ^~~~~~~
s166390129
p01701
C++
#include<iostream> #include<string> #include<map> using namespace std; pair<int,int>tasu(pair<int,int>a,pair<int,int>b){ int a1=a.first,a2=a.second,b1=b.first,b2=b.second; int ta2=a2,tb2=b2; a1*=tb2,a2*=tb2; b1*=ta2,b2*=ta2; int c1=a1+b1,c2=a2; for(int i=2;i<=10000;i++){ if(i==0||i==1||i==-1)continue; if(c1%i==...
a.cc: In function 'int main()': a.cc:44:48: error: 'pow' was not declared in this scope 44 | pair<int,int>tmp=make_pair(-90,pow(2,i+1)); | ^~~ a.cc:53:39: error: 'pow' was not declared in this scope 53 | pair<int,int>tmp=make_pair(90,pow...
s292300612
p01701
C++
#include<iostream> #include<string> #include<cmath> #include<vector> #include<map> using namespace std; pair<int,int>tasu(pair<int,int>a,pair<int,int>b){ __int64 a1=a.first,a2=a.second,b1=b.first,b2=b.second; __int64 ta2=a2,tb2=b2; a1*=tb2,a2*=tb2; b1*=ta2,b2*=ta2; __int64 c1=a1+b1,c2=a2; for(int i=2;i<=1000000;i...
a.cc: In function 'std::pair<int, int> tasu(std::pair<int, int>, std::pair<int, int>)': a.cc:8:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 8 | __int64 a1=a.first,a2=a.second,b1=b.first,b2=b.second; | ^~~~~~~ | __ynf64 a.cc:9:16: error: expected ';'...
s905204064
p01701
C++
#include<iostream> #include<string> #include<cmath> #include<vector> #include<map> using namespace std; pair<int,int>tasu(pair<int,int>a,pair<int,int>b){ long long a1=a.first,a2=a.second,b1=b.first,b2=b.second; long long ta2=a2,tb2=b2; a1*=tb2,a2*=tb2; b1*=ta2,b2*=ta2; long long c1=a1+b1,c2=a2; for(int i=2;i<=...
a.cc: In function 'int main()': a.cc:39:9: error: 'reverse' was not declared in this scope 39 | reverse(dir.begin(),dir.end()); | ^~~~~~~
s653474976
p01701
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { string line; while (cin >> line) { if (line.compare("#") == 0)break; int index = line.size() - 1; vector<char> v; while (index >= 0) { if (line.at(index) == 'h') { index -= 5; v.push_back('h'); } els...
a.cc: In function 'int main()': a.cc:29:33: error: 'pow' was not declared in this scope 29 | int l = pow(2, v.size() - 1); | ^~~
s401463549
p01701
C++
#include<iostream> #include<string> #include<vector> #include<stdlib.h> using namespace std; int main() { string line; while (cin >> line) { if (line.compare("#") == 0)break; int index = line.size() - 1; vector<char> v; while (index >= 0) { if (line.at(index) == 'h') { index -= 5; v.push_bac...
a.cc: In function 'int main()': a.cc:30:33: error: 'pow' was not declared in this scope 30 | int l = pow(2, v.size() - 1); | ^~~
s327641714
p01701
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { while(1) { string a, str; cin >> a; if(a=="#")break; for(int i=0;i<a.size();i++) if(a[i] == 'w' || a[i] == 'n' ) str += a[i]; int size = str.size(); int ans = 0; for(int i=0;i<size;i++) { if(str[i] == 'w') ans += (1<<i)*90...
a.cc: In function 'int main()': a.cc:19:22: error: expected ';' before '}' token 19 | else ans -= (1<<i)*90 | ^ | ; 20 | } | ~ a.cc:25:10: error: expected unqualified-id before '%' token 25 | if( ans. % 2 == 0 ) ans /= 2; | ...
s818713591
p01701
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { while(1) { string a, str; cin >> a; if(a=="#")break; for(int i=0;i<a.size();i++) if(a[i] == 'w' || a[i] == 'n' ) str += a[i]; int size = str.size(); int ans = 0; for(int i=0;i<size;i++) { if(str[i] == 'w') ans += (1<<i)*90...
a.cc: In function 'int main()': a.cc:25:10: error: expected unqualified-id before '%' token 25 | if( ans. % 2 == 0 ) ans /= 2; | ^
s952273986
p01701
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { while(1) { string a, str; cin >> a; if(a=="#")break; for(int i=0;i<a.size();i++) if(a[i] == 'w' || a[i] == 'n' ) str += a[i]; int size = str.size(); int ans = 0; for(int i=0;i<size;i++) { if(str[i] == 'w') ans += (1<<i)*90...
a.cc: In function 'int main()': a.cc:19:22: error: expected ';' before '}' token 19 | else ans -= (1<<i)*90 | ^ | ; 20 | } | ~
s291429391
p01701
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s206807335
p01701
C++
from fractions import * while True: s=input() if s=='#':break angle=Fraction(45) cnt=n=w=0 while cnt<len(s): if s[cnt]=='n': n+=1 angle-=Fraction(90/2**n) cnt+=5 else: w+=1 angle+=Fraction(90/2**w) cnt+=4 print(angle)
a.cc:1:1: error: 'from' does not name a type 1 | from fractions import * | ^~~~
s844169927
p01701
C++
#include<iostream> #include<string> #include<vector> #include<unordered_map> using namespace std; unordered_map<string, int>U; int main() { U["west"] = 90; U["north"] = 0; string a; while (cin >> a, a != "#") { vector<string>V; for (int b = 0; b < a.length(); b++) { if (a[b] == 'w') { b += 3; V.push...
a.cc: In function 'int main()': a.cc:24:17: error: 'reverse' was not declared in this scope 24 | reverse(V.begin(), V.end()); | ^~~~~~~
s422832566
p01701
C++
#include<iostream> #include<string> #include<vector> #include<unordered_map> #define int long long using namespace std; unordered_map<string, int>U; signed main() { U["west"] = 90; U["north"] = 0; string a; while (cin >> a, a != "#") { vector<string>V; for (int b = 0; b < a.length(); b++) { if (a[b] == 'w')...
a.cc: In function 'int main()': a.cc:25:17: error: 'reverse' was not declared in this scope 25 | reverse(V.begin(), V.end()); | ^~~~~~~
s682420290
p01701
C++
#include<bits/stdc++.h> #define int long long using namespace std; int main(){ string a; while(cin>>a,a!="#"){ vector<bool>b; for(char c:a){ if(c=='n')b.push_back(0); else if(c=='w')b.push_back(1); } reverse(b.begin(),b.end()); int x=b[0]*90,y=1; for(int c=1;c<b.size();c++){ ...
cc1plus: error: '::main' must return 'int'
s409084222
p01701
C++
m
a.cc:1:1: error: 'm' does not name a type 1 | m | ^