submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s403187323
p01554
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using CHY72; namespace CHY72{ public class PointXY<T>where T:IComparable { public T X , Y; public bool Flag = false; public PointXY(T _X,T _Y) { X = _X; Y = _Y; }...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s035279549
p01554
C++
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <cmath> #include <string> #include <sstream> #include <iomanip> #include <complex> using namespace std; #define ll long long #define vvi vector< vector<int> > #define All(X) X.begin(),X.end() #define FOR...
a.cc: In function 'int main()': a.cc:43:12: error: no matching function for call to 'find()' 43 | if(find()){ | ~~~~^~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46, ...
s891809954
p01554
C++
#include <iostream> #include <algorithm> #include <stdlib.h> #include <string> #include <queue> #include <map> using namespace std; int main(){ map<string,int> hito; int n,m; string s; cin>>n; for(int q=0;q<n;q++){ cin>>s; hito[s]=1; } cin>>m; int j=0; for(int q=0;q<m;q++){ cin>>s; if(hito.find(s)==hito.end()) cout<<"...
a.cc: In function 'int main()': a.cc:28:2: error: expected '}' at end of input 28 | } | ^ a.cc:9:11: note: to match this '{' 9 | int main(){ | ^
s436834875
p01554
C++
#include <stdio.h> #define MYSCAN scanf char u[300][20]; int n; int match(char t[20]); int main(void){ int i; int m; int mat; char t[20]; int door = -1; MYSCAN("%d", &n); MYSCAN("\n"); // テァツ卍サテゥツ個イIDテ」ツ?ョテ・ツ?・テ・ツ環? for (i = 0; i < n; i++){ gets_s(u[i]); } MYSCAN("%d", &m); MYSCAN("\n"); for (i = 0...
a.cc: In function 'int main()': a.cc:21:17: error: 'gets_s' was not declared in this scope 21 | gets_s(u[i]); | ^~~~~~ a.cc:28:17: error: 'gets_s' was not declared in this scope 28 | gets_s(t); | ^~~~~~
s542613767
p01554
C++
#include <iostream> #include <vector> #include <string> using namespace std; int main(){ int n,m; vector<string> v(256); cin >> n; for(int i=0;i<n;i++){ cin >> v[i]; } cin >> m; bool open = false; for(int i=0;i<m;i++){ string t; cin >> t; if(find(v.begin(),v.end(),t) != v.end()){ if(open){ cout ...
a.cc: In function 'int main()': a.cc:18:24: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)' 18 | if(find(v.begin(),v.end(),t) != v.end()){ | ~~~~^~...
s480993659
p01554
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<string>VS{ "Opened by ","Closed by ","Unknown " }; set<string>SS; int N; cin >> N; for( size_t i = 0; i < N; i++ ) { string S; cin >> S; SS.insert( S ); } cin >> N; bool x = 0; for( size_t i = 0; i < N; i++ ) { string S; cin >> S; i...
a.cc: In function 'int main()': a.cc:26:9: error: '_sleep' was not declared in this scope; did you mean 'usleep'? 26 | _sleep(1500); | ^~~~~~ | usleep
s966912133
p01554
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ ?? int n,m,count=0; ?? char u[257][11],t[257][11]; ?? ?? cin>>n; ?? for(int i=0;i<n;i++) ?????? scanf("%s",u[i]); ?? cin>>m; ?? for(int i=0;i<m;i++) ?????? scanf("%s",t[i]); ?? for(int i=0;i<m;i++) ?????? for(int j=0;j<n;j++) ...
a.cc: In function 'int main()': a.cc:8:1: error: expected primary-expression before '?' token 8 | ?? int n,m,count=0; | ^ a.cc:8:2: error: expected primary-expression before '?' token 8 | ?? int n,m,count=0; | ^ a.cc:8:4: error: expected primary-expression before 'int' 8 | ?? int n,m,count=0; ...
s492241762
p01554
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ ?? int n,m,count=0; ?? char u[257][11],t[257][11]; ?? ?? cin>>n; ?? for(int i=0;i<n;i++) ?????? scanf("%s",u[i]); ?? cin>>m; ?? for(int i=0;i<m;i++) ?????? scanf("%s",t[i]); ?? for(int i=0;i<m;i++) ?????? for(int j=0;j<n;j++) ???...
a.cc: In function 'int main()': a.cc:6:1: error: expected primary-expression before '?' token 6 | ?? int n,m,count=0; | ^ a.cc:6:2: error: expected primary-expression before '?' token 6 | ?? int n,m,count=0; | ^ a.cc:6:4: error: expected primary-expression before 'int' 6 | ?? int n,m,count=0; ...
s568343919
p01554
C++
#include <stdio.h> int main(){ int n,m,i,j,c=0; char a[11][300]; char b[11][300]; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s",a[i]); } scanf("%d",&m); for(j=1;j<=m;j++){ scanf("%s",b[j]); } // for(i=1;i<=n;i++){ // printf("%s\n",a[i]); // } for(i=1;i<=m;i++){ for(j...
a.cc: In function 'int main()': a.cc:32:10: error: 'strcmp' was not declared in this scope 32 | if(strcmp(a[j],b[i])==0){ | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstri...
s612323638
p01554
C++
#include <stdio.h> int main(){ int n,m,i,j,c=0; char a[20][300]; char b[20][300]; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s",a[i]); } scanf("%d",&m); for(j=1;j<=m;j++){ scanf("%s",b[j]); } // for(i=1;i<=n;i++){ // printf("%s\n",a[i]); // } for(i=1;i<=m;i++){ for(j...
a.cc: In function 'int main()': a.cc:32:10: error: 'strcmp' was not declared in this scope 32 | if(strcmp(a[j],b[i])==0){ | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstri...
s452862073
p01554
C++
#include <stdio.h> int main(){ int n,m,i,j,c=0; char a[300][12]; char b[300][12]; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s",a[i]); } scanf("%d",&m); for(j=1;j<=m;j++){ scanf("%s",b[j]); } // for(i=1;i<=n;i++){ // printf("%s\n",a[i]); // } for(i=1;i<=m;i++){ for(j...
a.cc: In function 'int main()': a.cc:32:10: error: 'strcmp' was not declared in this scope 32 | if(strcmp(a[j],b[i])==0){ | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio.h> +++ |+#include <cstri...
s101317085
p01554
C++
n = int(input()) xs = [] for i in range(n): xs.append(input()) m = int(input()) flag = 1 for i in range(m): s = input() if s in xs: print("Opened" if flag == 1 else "Closed", "by", s) flag ^= 1 else: print("Unknown", s)
a.cc:1:1: error: 'n' does not name a type 1 | n = int(input()) | ^
s369656963
p01554
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { int n; cin >> n; vector<string>l; for (int i = 0; i < n; i++){ string s; cin >> s; l.push_back(s); } cin >> n; bool b = false;//false->closed for (int i = 0; i < n; i++){ string s; cin >> s; if (find(l.begin(), l.end()...
a.cc: In function 'int main()': a.cc:16:25: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)' 16 | if (find(l.begin(), l.end(), s) != l.end()) { | ~...
s317578902
p01554
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { int n; cin >> n; vector<string>l; for (int i = 0; i < n; i++){ string s; cin >> s; l.push_back(s); } cin >> n; bool b = false;//false->closed for (int i = 0; i < n; i++){ string s; cin >> s; if (find(l.begin(), l.end()...
a.cc: In function 'int main()': a.cc:16:25: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)' 16 | if (find(l.begin(), l.end(), s) != l.end()) { | ~...
s368038964
p01554
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int N,M; scanf("%d",&N); int flag=0,oc=0,i,j; char U[256][11]; for(i=0;i<N;i++){ scanf("%s",U[i]); } scanf("%d",&M); char T[11]; for(i=0;i<M;i++){ flag=0; scanf("%s",T); for(j=0;j<N;j++){ if(strcmp(U[j],T)==0){ flag=1; br...
a.cc: In function 'int main()': a.cc:20:28: error: 'strcmp' was not declared in this scope 20 | if(strcmp(U[j],T)==0){ | ^~~~~~ a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<...
s513539884
p01554
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int N,M; scanf("%d",&N); int flag=0,oc=0,i,j; char U[256][11]; for(i=0;i<N;i++){ scanf("%s",U[i]); } scanf("%d",&M); char T[11]; for(i=0;i<M;i++){ flag=0; scanf("%s",T); for(j=0;j<N;j++){ if(strcmp(U[j],T)==0){ flag=1; br...
a.cc: In function 'int main()': a.cc:20:28: error: 'strcmp' was not declared in this scope 20 | if(strcmp(U[j],T)==0){ | ^~~~~~ a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<...
s265155684
p01554
C++
#include <iostream> #include <cstdio> using namespace std; int main(){ int N,M; scanf("%d",&N); int flag=0,oc=0,i,j; char U[256][11]; for(i=0;i<N;i++){ scanf("%s",U[i]); } scanf("%d",&M); char T[11]; for(i=0;i<M;i++){ flag=0; scanf("%s",T); for(j=0;j<N;j++){ if(strcmp(U[j],T)==0){ flag=1; ...
a.cc: In function 'int main()': a.cc:20:28: error: 'strcmp' was not declared in this scope 20 | if(strcmp(U[j],T)==0){ | ^~~~~~ a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include ...
s695348474
p01554
C++
#include <cstdio> #include <string> using namespace std; int N, M; string U[256]; int main() { char s[11]; scanf("%d", &N); for (int i=0;i<N;i++) { scanf("%s", s); U[i] = s; } scanf("%d", &M); bool opened = false; for (int i=0;i<M;i++) { scanf("%s", s); const string* p = find(U, U+N, (s...
a.cc: In function 'int main()': a.cc:20:23: error: 'find' was not declared in this scope 20 | const string* p = find(U, U+N, (string)s); | ^~~~
s513260775
p01554
C++
#if 0 #include <bits/stdc++.h> #else #include "../../bits/stdc++.h" #endif #define FOR(i,a,b) for(int i = (a);i < (b);i++) #define RFOR(i,a,b) for(int i = (b)-1;i >= (a);i--) #define REP(i,n) FOR(i,0,(n)) #define RREP(i,n) RFOR(i,0,(n)) using namespace std; typedef pair<int, int> P; #define pb push_back #define mp m...
a.cc:4:10: fatal error: ../../bits/stdc++.h: No such file or directory 4 | #include "../../bits/stdc++.h" | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s797434249
p01554
C++
#include<iostream> #include<vector> #include<string> using namespace std; int n, m; vector<string> ids; int main() { cin >> n; for (int i = 0; i < n; ++i) { string s; cin >> s; ids.push_back(s); } cin >> m; bool locked = true; for (int i = 0; i < m; ++i) { str...
a.cc: In function 'int main()': a.cc:23:24: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)' 23 | auto itr = find(ids.begin(), ids.end(), s); | ~~~~^~~~~~~~...
s266987417
p01554
C++
#include <iostream> using namespace std; bool flag; bool check(string t, string u){ if(s==t){ if(!flag)cout << "Opened by " << t << endl; else cout << "Closed by " << t << endl; flag ^= 1; return true; } return false; } int main(){ int n,i,j,m; bool ans=false; string u[260],t[260]; cin >> n; for(i=...
a.cc: In function 'bool check(std::string, std::string)': a.cc:8:5: error: 's' was not declared in this scope 8 | if(s==t){ | ^
s888159964
p01554
C++
#include <iostream> #include <string> using namespace std; bool flag; bool check(string t, string u){ if(s==t){ if(!flag)cout << "Opened by " << t << endl; else cout << "Closed by " << t << endl; flag ^= 1; return true; } return false; } int main(){ int n,i,j,m; bool ans=false; string u[260],t[26...
a.cc: In function 'bool check(std::string, std::string)': a.cc:9:5: error: 's' was not declared in this scope 9 | if(s==t){ | ^
s468672744
p01554
C++
#include<bits/stdc++.h> int main(){  int N,M; int cnt1 = 0; int cnt2 = 0; int U[256]; int T[256]; cin>>N; for(int i=0;i<N;i++) cin>>U[i]; cin>>M; for(int j=0;j<M;j++) cin>>T[j]; for(int j=0;j<M;j++){ for(int i=0;i<N;i++){ if(T[j] == U[i]) cnt1++; else cnt2++; } if(cnt1 % 2 == 1 && cnt2 != N)...
a.cc:4:1: error: extended character   is not valid in an identifier 4 |  int N,M; | ^ a.cc: In function 'int main()': a.cc:4:1: error: '\U00003000int' was not declared in this scope 4 |  int N,M; | ^~~~~ a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin>>N...
s965360905
p01554
C++
#include<bits/stdc++.h> int main(){  int N,M; int cnt1 = 0; int cnt2 = 0; string U[256]; string T[256]; cin>>N; for(int i=0;i<N;i++) cin>>U[i]; cin>>M; for(int j=0;j<M;j++) cin>>T[j]; for(int j=0;j<M;j++){ for(int i=0;i<N;i++){ if(T[j] == U[i]) cnt1++; else cnt2++; } if(cnt1 % 2 == 1 && cnt2 != ...
a.cc:4:1: error: extended character   is not valid in an identifier 4 |  int N,M; | ^ a.cc: In function 'int main()': a.cc:4:1: error: '\U00003000int' was not declared in this scope 4 |  int N,M; | ^~~~~ a.cc:7:3: error: 'string' was not declared in this scope 7 | string U[256]; | ^~~~...
s134321843
p01554
C++
#include<bits/stdc++.h> int main(){  int N,M; int cnt1 = 0; int cnt2 = 0; string U[256]; string T[256]; cin>>N; for(int i=0;i<N;i++) cin>>U[i]; cin>>M; for(int j=0;j<M;j++) cin>>T[j]; for(int j=0;j<M;j++){ for(int i=0;i<N;i++){ if(T[j] == U[i]) cnt1++; else cnt2++; } if(cnt1 % 2 == 1 && cnt2 !=...
a.cc:4:1: error: extended character   is not valid in an identifier 4 |  int N,M; | ^ a.cc: In function 'int main()': a.cc:4:1: error: '\U00003000int' was not declared in this scope 4 |  int N,M; | ^~~~~ a.cc:7:3: error: 'string' was not declared in this scope 7 | string U[256]; | ^~~~...
s131243474
p01554
C++
#include<bits/stdc++.h> using namespace std; int main(){  int N,M; int cnt1 = 0; int cnt2 = 0; string U[256]; string T[256]; cin>>N; for(int i=0;i<N;i++) cin>>U[i]; cin>>M; for(int j=0;j<M;j++) cin>>T[j]; for(int j=0;j<M;j++){ for(int i=0;i<N;i++){ if(T[j] == U[i]) cnt1++; else cnt2++; } if(cnt...
a.cc:5:1: error: extended character   is not valid in an identifier 5 |  int N,M; | ^ a.cc: In function 'int main()': a.cc:5:1: error: '\U00003000int' was not declared in this scope 5 |  int N,M; | ^~~~~ a.cc:10:8: error: 'N' was not declared in this scope 10 | cin>>N; | ^ a.cc:12:...
s906687419
p01554
C++
#include<bits/stdc++.h> using namespace std; int main(){  int N, M; int cnt1 = 0; int cnt2 = 0; string U[256]; string T[256]; cin>>N; for(int i=0;i<N;i++) cin>>U[i]; cin>>M; for(int j=0;j<M;j++) cin>>T[j]; for(int j=0;j<M;j++){ for(int i=0;i<N;i++){ if(T[j] == U[i]) cnt1++; else cnt2++; } if(cn...
a.cc:5:1: error: extended character   is not valid in an identifier 5 |  int N, M; | ^ a.cc: In function 'int main()': a.cc:5:1: error: '\U00003000int' was not declared in this scope 5 |  int N, M; | ^~~~~ a.cc:10:8: error: 'N' was not declared in this scope 10 | cin>>N; | ^ a.cc:1...
s680570485
p01554
C++
#include<bits/stdc++.h> using namespace std; int main(){  int N, M; int cnt1 = 0; int cnt2 = 0; string U[256]; string T[256]; cin>>N; for(int i=0;i<N;i++) cin>>U[i]; cin>>M; for(int j=0;j<M;j++) cin>>T[j]; for(int j=0;j<M;j++){ for(int i=0;i<N;i++){ if(T[j] == U[i]) cnt1++; else cnt2++; } if(cn...
a.cc:5:1: error: extended character   is not valid in an identifier 5 |  int N, M; | ^ a.cc: In function 'int main()': a.cc:5:1: error: '\U00003000int' was not declared in this scope 5 |  int N, M; | ^~~~~ a.cc:10:8: error: 'N' was not declared in this scope 10 | cin>>N; | ^ a.cc:1...
s920768413
p01554
C++
#include<bits/stdc++.h> using namespace std; int main(){  int N, M,cnt1,cnt2; cnt1 = 0; cnt2 = 0; string U[256],T[256]; cin>>N; for(int i=0;i<N;i++) cin>>U[i]; cin>>M; for(int j=0;j<M;j++) cin>>T[j]; for(int j=0;j<M;j++){ for(int i=0;i<N;i++){ if(T[j] == U[i]) cnt1++; else cnt2++; } if(cnt1 % 2 =...
a.cc:5:1: error: extended character   is not valid in an identifier 5 |  int N, M,cnt1,cnt2; | ^ a.cc: In function 'int main()': a.cc:5:1: error: '\U00003000int' was not declared in this scope 5 |  int N, M,cnt1,cnt2; | ^~~~~ a.cc:6:3: error: 'cnt1' was not declared in this scope 6 | cnt1 = 0;...
s549591815
p01554
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
s668901902
p01554
C++
#include<iostream> #include<vector> #include<string> using namespace std; while(1){ int main(){ int N; cin>> N; vector<string>U(N); for(auto &a : U){ cin >>a; } int M; cin >>M; int flag=0,auth; for(int i=0;i<M;i++){ stri...
a.cc:5:1: error: expected unqualified-id before 'while' 5 | while(1){ | ^~~~~
s328335485
p01554
C++
#include<iostream> #include<vector> #include<string> using namespace std; while(1){ int main(){ int N; cin>> N; vector<string>U(N); for(auto &a : U){ cin >>a; } int M; cin >>M; int flag=0,auth; for(int i=0;i<M;i++){ stri...
a.cc:5:1: error: expected unqualified-id before 'while' 5 | while(1){ | ^~~~~
s430215697
p01554
C++
#include<iostream> #include<vector> #include<string> using namespace std; while(1){ int main(){ int N; cin>> N; vector<string>U(N); for(auto &a : U){ cin >>a; } int M; cin >>M; int flag=0,auth; for(int i=0;i<M;i++){ stri...
a.cc:5:1: error: expected unqualified-id before 'while' 5 | while(1){ | ^~~~~
s386702894
p01554
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
s921261200
p01554
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
s977088804
p01554
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
s499461944
p01554
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main(){ int kc; vector<string> key; cin>>kc; key.resize(kc); for (int i = 0; i < kc; i++) cin>>key[i]; bool isOpen = false; int oc; cin>>oc; for (int i = 0; i < oc; i++) { string tkey; cin>>tkey; bo...
a.cc: In function 'int main()': a.cc:20:47: error: conversion from '<unresolved overloaded function type>' to non-scalar type 'std::vector<std::__cxx11::basic_string<char> >::iterator' requested 20 | for (vector<string>::iterator ita=key.begin;ita!=key.end;++ita) | ...
s353389176
p01555
C++
#include <iostream> #include <string> #include <sstream> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef long long ll; ll p[19]; ll non(ll x){ return x-x/3-x/5+x/15; } ll len(ll x){ ll ret=0,num=x-x/3-x/5+x/15; int i; for(i=1;p[i]<=x;i++){ ret+=(non(p[i]-1)-non(p[i-1]-1))*i; num-=(non(p[i]-1)...
a.cc: In function 'int main()': a.cc:44:51: error: call of overloaded 'to_string(ll&)' is ambiguous 44 | if(i%3!=0 && i%5!=0) st+=to_string(i); | ~~~~~~~~~^~~ a.cc:23:8: note: candidate: 'std::string to_string(ll)' 23 | string to_string(ll a){ |...
s692979640
p01555
C++
#include <iostream> #include <string> #include <sstream> using namespace std; #define rep(i,n) for(int i = 0;i < n;i++) #define int long long const int INF = 1e18; string tostr(int n) { stringstream ss; ss << n; return ss.str(); } //solve(i) i???????????°?????????????????????????§?????????? int solve(int m) { a...
a.cc: In function 'long long int solve(long long int)': a.cc:23:44: error: 'pow' was not declared in this scope; did you mean 'now'? 23 | int now = (i == n) ? m-1 : pow(10, i)-1; | ^~~ | now
s297939998
p01555
C++
xx
a.cc:1:1: error: 'xx' does not name a type 1 | xx | ^~
s014675188
p01555
C++
#include<bits/stdc++.h> using namespace std; typedef __int128 ll; ll counter(ll from,ll to,ll mod){ return to/mod-from/mod+(from%mod==0); } int main(){ ll s; cin>>s; ll ten[19]; ten[0]=1; for(int i=1;i<19;i++){ ten[i]=ten[i-1]*10; } ll lb=1; ll ub=s+1; ll cnt=0; bool isloop=true; //lb-1m...
a.cc: In function 'int main()': a.cc:11:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'll' {aka '__int128'}) 11 | cin>>s; | ~~~^~~ | | | | | ll {aka __int128} | std::istream {aka std::basic_istream<char>} In file inc...
s075864436
p01555
C++
#include<string> #include<deque> #include<queue> #include<vector> #include<algorithm> #include<iostream> #include<set> #include<cmath> #include<tuple> #include<map> using namespace std; typedef long long int llint; typedef bool izryt; #define mp make_pair #define mt make_tuple #define pub push_back #define puf push_fro...
a.cc: In function 'int main()': a.cc:55:9: error: jump to label 'sless' 55 | sless:i=start*15+11; | ^~~~~ a.cc:46:25: note: from here 46 | if(s<1000){goto sless;} | ^~~~~ a.cc:53:51: note: crosses initialization of 'llint i' 53 | llint sta...
s457100175
p01555
C++
#include<string> #include<deque> #include<queue> #include<vector> #include<algorithm> #include<iostream> #include<set> #include<cmath> #include<tuple> #include<map> using namespace std; typedef long long int llint; typedef bool izryt; #define mp make_pair #define mt make_tuple #define pub push_back #define puf push_fro...
a.cc: In function 'int main()': a.cc:55:9: error: jump to label 'sless' 55 | sless: | ^~~~~ a.cc:46:25: note: from here 46 | if(s<1000){goto sless;} | ^~~~~ a.cc:53:51: note: crosses initialization of 'llint i' 53 | llint start=bmin-3,stl=...
s682724169
p01555
C++
#include<string> #include<deque> #include<queue> #include<vector> #include<algorithm> #include<iostream> #include<set> #include<cmath> #include<tuple> #include<map> using namespace std; typedef long long int llint; typedef bool izryt; #define mp make_pair #define mt make_tuple #define pub push_back #define puf push_fro...
a.cc: In function 'int main()': a.cc:57:9: error: 'i' was not declared in this scope 57 | i=start*15+11; | ^ a.cc:57:11: error: 'start' was not declared in this scope 57 | i=start*15+11; | ^~~~~ a.cc:58:32: error: 'stl' was not declared in this scope; did you mean 'st...
s330027287
p01555
C++
#include<string> #include<deque> #include<queue> #include<vector> #include<algorithm> #include<iostream> #include<set> #include<cmath> #include<tuple> #include<map> using namespace std; typedef long long int llint; typedef bool izryt; #define mp make_pair #define mt make_tuple #define pub push_back #define puf push_fro...
a.cc: In function 'int main()': a.cc:46:25: error: label 'sless' used but not defined 46 | if(s<1000){goto sless;} | ^~~~~
s429186965
p01555
C++
#include<bits/stdc++.h> using namespace std; using P = pair<int, int>; const int M = 1000000007; long long cnt(long long n) { return n - n / 3 - n / 5 + n / 15; } long long len(long long n) { long long ret = (n / 3 + n / 5) * 4; long long l = 0, r = min(9, n), t = 1; while (l < n) { ret += (cn...
a.cc: In function 'long long int len(long long int)': a.cc:12:29: error: no matching function for call to 'min(int, long long int&)' 12 | long long l = 0, r = min(9, n), t = 1; | ~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x8...
s929154244
p01555
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<string> using namespace std; int main(){ string fizz="Fizz"; string buzz="Buzz"; long int n; cin>>n; long int scount=0; int i=0; for(;scount<n;){ i++; if(i%3==0){ scount=scount+4; } if(i%5==0){ scount=scount+4; } if((i%3!=0)&&(i...
a.cc: In function 'int main()': a.cc:24:43: error: 'log10' was not declared in this scope 24 | scount=scount+int(log10(i))+1; | ^~~~~ a.cc:66:39: error: 'log10' was not declared in this scope 66 | for(int j=int(log10(i...
s370185602
p01555
C++
#include <iostream> #include <vector> #include <cstdlib> #include <sstream> using namespace std; string simulate(unsigned long long l,unsigned long long r){ stringstream ss; while( l < r ){ ss << (l%15==0?"FizzBuzz":l%3==0?"Fizz":l%5==0?"Buzz":itos(l)); l++; } return ss.str(); } vector<unsigned long long> bor...
a.cc: In function 'std::string simulate(long long unsigned int, long long unsigned int)': a.cc:11:71: error: 'itos' was not declared in this scope 11 | ss << (l%15==0?"FizzBuzz":l%3==0?"Fizz":l%5==0?"Buzz":itos(l)); | ^~~~ a....
s057729166
p01555
C++
#include <algorithm> #include <cassert> #include <cmath> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> #include <boost/lexical_cast.hpp> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FO...
a.cc:12:10: fatal error: boost/lexical_cast.hpp: No such file or directory 12 | #include <boost/lexical_cast.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s970084170
p01556
Java
import java.awt.geom.*; import java.util.*; import static java.lang.Math.*; public class Main { final Scanner sc=new Scanner(System.in); public static void main(String[] args) { new Main().init(); } void init(){ new B(); } class B{ B(){ while(sc.hasNext()){ int n = sc.nextInt(); Point2D [] pl...
Main.java:78: error: ';' expected double EPS = 1.0e-04a; ^ Main.java:78: error: <identifier> expected double EPS = 1.0e-04a; ^ 2 errors
s349209391
p01556
C++
#include <stdio.h> int N, X[50], Y[50], sx, sy; int main() { scanf("%d", &N); for(int i = 0; i < N; i++) { scanf("%d%d", &X[i], &Y[i]); sx += X[i]; sy += Y[i]; } if(N % 2 == 1) { printf("NA\n"); } else { bool flag = true; for(int i = 0; i < N / 2; i++) { flag = flag && ((1.0 * sx / N - X[i]) * 2 ==...
a.cc: In function 'int main()': a.cc:19:47: error: 'gx' was not declared in this scope; did you mean 'sx'? 19 | printf("%.9f %.9f\n", gx, gy); | ^~ | sx a.cc:19:51: error: 'gy' was not decl...
s315756765
p01556
C++
/* ?????????????????¨?????????????????¨???????????? ????±???¨?????????????????????????????¨????????????????????¨???????????´??????????????°???????????¶???????????°??¢ */ #include <iostream> #include <algorithm> #include <functional> #include <vector> #include <cmath> using namespace std; typedef long long ll; typedef p...
a.cc: In function 'int main()': a.cc:23:14: error: expected primary-expression before '?' token 23 | ll n;???cin >> n; | ^ a.cc:23:15: error: expected primary-expression before '?' token 23 | ll n;???cin >> n; | ^ a.cc:23:16: error: expected primary-expressio...
s269395840
p01556
C++
#Include<iostream> #include<cmath> #define EPS (1e-8) #define N 50 using namespace std; int n,x[N],y[N],flag=1; double gx,gy; int main(){ cin>>n; for(int i=0;i<n;i++){ cin>>x[i]>>y[i]; gx+=x[i]; gy+=y[i]; } gx/=n; gy/=n; for(int i=0;i<n;i++){ double px=gx+(gx-x[i]),py=gy+(gy-y[i]); int f=0; ...
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include? 1 | #Include<iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:10:3: error: 'cin' was not declared in this scope 10 | cin>>n; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream...
s035344254
p01556
C++
#include <bits/stdc++.h> using namespace std; #define REP(i,a,b) for(int i=a;i<(int)b;i++) #define rep(i,n) REP(i,0,n) typedef complex<double> P; typedef vector<P> polygon; double const eps = 1e-7; polygon poly; struct line : public vector<P> { line(P const& a, P const& b) { push_back(a), push_back(b)...
a.cc: In function 'int main()': a.cc:86:52: error: expected '}' at end of input 86 | else printf("%.10f %.10f\n", g.real(), g.imag()); | ^ a.cc:76:12: note: to match this '{' 76 | int main() { | ^
s045300447
p01556
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ int a[50],b[50],n; cin>>n; double c=0,d=0; r(i,n){ cin>>a[i]>>b[i]; c+=a[i],d+=b[i]; } c/=n,d/=n; if(n%2)goto L; r(i,n/2)if(!abs((a[i]+a[(i+n/2)%n])/2-c)<=0.0001||!abs((b[i]+b[(i+n/2)%n])...
a.cc: In function 'int main()': a.cc:14:85: error: expected primary-expression before '<=' token 14 | r(i,n/2)if(!abs((a[i]+a[(i+n/2)%n])/2-c)<=0.0001||!abs((b[i]+b[(i+n/2)%n])/2-c))<=0.0001)goto L; | ^~
s296025657
p01556
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ double a[50],b[50],n; cin>>n; double c=0,d=0; r(i,n){ cin>>a[i]>>b[i]; c+=a[i],d+=b[i]; } c/=n,d/=n; if(n%2)goto L; r(i,n/2)if(!abs((a[i]+a[(i+n/2)%n])/2-c)<=0.0001||!abs((b[i]+b[(i+n/2)%...
a.cc: In function 'int main()': a.cc:13:9: error: invalid operands of types 'double' and 'int' to binary 'operator%' 13 | if(n%2)goto L; | ~^~ | | | | | int | double a.cc:14:36: error: invalid operands of types 'double' and 'double' to binary 'operator%' 14 ...
s359936940
p01556
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ int a[50],b[50],n; cin>>n; double c=0,d=0; r(i,n){ cin>>a[i]>>b[i]; c+=a[i],d+=b[i]; } c/=n,d/=n; if(n%2)goto L; r(i,n/2)if(!abs((a[i]+a[(i+n/2)%n])/2.0-c)<=0.0001||!abs((b[i]+b[(i+n/2)%n...
a.cc: In function 'int main()': a.cc:14:89: error: expected primary-expression before '<=' token 14 | r(i,n/2)if(!abs((a[i]+a[(i+n/2)%n])/2.0-c)<=0.0001||!abs((b[i]+b[(i+n/2)%n])/2.0-c))<=0.0001)goto L; | ^~
s148081847
p01556
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)n;i++) int main(){ int n; cin >> n; vector<complex<int> > p(n); rep(i,n){ int x,y; cin >> x >> y; p[i] = complex<int>(x,y); } if(n%2!=0){ cout << "NA" << endl; return 0; } complex<double> c,cb; c...
a.cc: In function 'int main()': a.cc:24:8: error: invalid cast from type 'std::complex<int>' to type 'double' 24 | cb = (double)(p[0]+p[n/2])/2; | ^~~~~~~~~~~~~~~~~~~~~ a.cc:26:9: error: invalid cast from type 'std::complex<int>' to type 'double' 26 | c = (double)(p[i]+p[i+n/2])/2; | ...
s385728010
p01556
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)n;i++) int main(){ int n; cin >> n; vector<complex<double> > p(n); rep(i,n){ int x,y; cin >> x >> y; p[i] = complex<double>(x,y); } if(n%2!=0){ cout << "NA" << endl; return 0; } complex<double> c,c...
a.cc: In function 'int main()': a.cc:24:21: error: no match for 'operator/' (operand types are 'std::complex<double>' and 'int') 24 | cb = (p[0]+p[n/2])/2; | ~~~~~~~~~~~~~^~ | | | | | int | std::complex<double> In file included from /...
s228400531
p01556
C++
#include <iostream> #include <cstdlib> using namespace std; double p[60][2]; double cx = 0, cy = 0; int f; int main(void){ int n, i; cin >> n; for(i = 0; i < n; i++){ cin >> p[i][0] >> p[i][1]; cx += p[i][0]; cy += p[i][1]; } cx /= n; cy /= n; if(n%2) f=1; else for(i = 0; i < n/2; i++){ if(fabs((p[i]...
a.cc: In function 'int main()': a.cc:22:20: error: 'fabs' was not declared in this scope; did you mean 'labs'? 22 | if(fabs((p[i][0] + p[i + n/2][0]) /2 - cx) <= 0.0001 && fabs((p[i][1] + p[i + n/2][1]) /2 - cy) <= 0.0001) continue; | ^~~~ | labs
s507375597
p01556
C++
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iostream> #include <iterator> #include <list> #include <map> #inclu...
a.cc: In function 'int main()': a.cc:366:28: error: no matching function for call to 'std::vector<point>::push_back(int&, int&)' 366 | p.push_back(x, y); | ~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:...
s645564055
p01557
Java
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; ?? public class Main{ ????????public static void main(String[] args) { ????????????????new Main().run(); ????????} ?? ????????void run() { ????????????????// long cur = System.currentTimeMillis(); ???????????????...
Main.java:5: error: class, interface, enum, or record expected ?? ^ Main.java:7: error: illegal start of type ????????public static void main(String[] args) { ^ Main.java:8: error: illegal start of expression ????????????????new Main().run(); ^ Main.java:8: error: illegal start of expression ????????????????new Main()....
s698512248
p01557
Java
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; ?? public class Main{ ????????public static void main(String[] args) { ????????????????new Main().run(); ????????} ?? ????????void run() { ????????????????// long cur = System.currentTimeMillis(); ???????????????...
Main.java:5: error: class, interface, enum, or record expected ?? ^ Main.java:7: error: illegal start of type ????????public static void main(String[] args) { ^ Main.java:8: error: illegal start of expression ????????????????new Main().run(); ^ Main.java:8: error: illegal start of expression ????????????????new Main()....
s804818341
p01557
C++
10 3 1 5 2 7 4 9 6 10 8
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 10 | ^~
s574694531
p01557
C++
w#define _CRT_SECURE_NO_WARNINGS //#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int,int> pii; #define all(c) (c).begin(), (c).end() #define loop(i,a,b) for(ll i=a; i<ll(b); i++) #define rep(i,b) loop(i,0,b) #defin...
a.cc:1:2: error: stray '#' in program 1 | w#define _CRT_SECURE_NO_WARNINGS | ^ a.cc:1:1: error: 'w' does not name a type 1 | w#define _CRT_SECURE_NO_WARNINGS | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, ...
s386110491
p01557
C++
#include <bits/stdc++.h> using namespace std; typedef long long lli; const int N = 10; const int INF = 1 << 29; struct state{ lli num; int cnt; state(lli num=0, int cnt=0):num(num),cnt(cnt){} }; int n; lli pow10[11]; vector<int> v; lli hash(const vector<int> &vec){ lli res = 0, di = 1; for(int i=vec.s...
a.cc:16:5: warning: built-in function 'pow10' declared as non-function [-Wbuiltin-declaration-mismatch] 16 | lli pow10[11]; | ^~~~~ a.cc: In function 'int solve()': a.cc:90:7: error: reference to 'hash' is ambiguous 90 | bfs(hash(w), mp, 0); | ^~~~ In file included from /usr/include/c++/14...
s559079216
p01557
C++
#include <bits/stdc++.h> using namespace std; typedef long long lli; const int N = 10; const int INF = 1 << 29; struct state{ lli num; int cnt; state(lli num=0, int cnt=0):num(num),cnt(cnt){} }; int n; lli pow10[11]; vector<int> v; lli hash(const vector<int> &vec){ lli res = 0, di = 1; for(int i=vec.s...
a.cc:16:5: warning: built-in function 'pow10' declared as non-function [-Wbuiltin-declaration-mismatch] 16 | lli pow10[11]; | ^~~~~ a.cc: In function 'int solve()': a.cc:90:7: error: reference to 'hash' is ambiguous 90 | bfs(hash(w), mp, 0); | ^~~~ In file included from /usr/include/c++/14...
s704459114
p01557
C++
#include<iostream> #include<vector> #include<map> #include<queue> using namespace std; typedef vector<int> vi; typedef map<vi, int> ma; vi a,b; int N; ma bfs(vi vec){ ma tem; queue<vi>que; que.push(vec); tem[vec]=0; while(!que.empty()){ vi v=que.front(); que.pop(); // ...
a.cc: In function 'ma bfs(vi)': a.cc:31:17: error: 'reverse' was not declared in this scope 31 | reverse(n.begin()+i,n.begin()+j); | ^~~~~~~ a.cc: In function 'void solve()': a.cc:55:12: error: 'next_permutation' was not declared in this scope 55 | }while(next_permutation...
s793381643
p01557
C++
#include <set> #include <queue> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int N, T; cin >> N; vector<int> A(N); for(int i = 0; i < N; i++) { cin >> T; A[i] = T; } vector<char> B = A; sort(B.begin(), B.end()); set<vecto...
a.cc: In function 'int main()': a.cc:19:22: error: conversion from 'vector<int>' to non-scalar type 'vector<char>' requested 19 | vector<char> B = A; sort(B.begin(), B.end()); | ^ a.cc:21:44: error: no matching function for call to 'std::set<std::vector<char>, bool>::insert(std::vector...
s255070853
p01557
C++
#include <set> #include <queue> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int N, T; cin >> N; vector<char> A(N); for(int i = 0; i < N; i++) { cin >> T; A[i] = T; } vector<char> B = A; sort(B.begin(), B.end()); set<vect...
In file included from /usr/include/c++/14/set:62, from a.cc:1: /usr/include/c++/14/bits/stl_tree.h: In instantiation of 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::find(const _Key&) [with _Key = std::vector<char>; _Val = ...
s099608493
p01557
C++
#include <set> #include <queue> #include <vector> #include <iostream> #include <algorithm> #define int __int8 using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } vector<int> B = A; sort(B.begin(), B.end()); set<vector<int> > dat; dat.insert(A);...
a.cc:7:13: error: '__int8' does not name a type; did you mean 'u_int'? 7 | #define int __int8 | ^~~~~~ a.cc:11:1: note: in expansion of macro 'int' 11 | int main() | ^~~
s854511504
p01557
C++
#include <set> #include <queue> #include <vector> #include <iostream> #include <algorithm> #define int __int16 using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } vector<int> B = A; sort(B.begin(), B.end()); set<vector<int> > dat; dat.insert(A)...
a.cc:7:13: error: '__int16' does not name a type; did you mean '__int16_t'? 7 | #define int __int16 | ^~~~~~~ a.cc:11:1: note: in expansion of macro 'int' 11 | int main() | ^~~
s757245618
p01557
C++
#include <set> #include <queue> #include <vector> #include <iostream> #include <algorithm> #define int short using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } vector<int> B = A; sort(B.begin(), B.end()); set<vector<int> > dat; dat.insert(A); ...
cc1plus: error: '::main' must return 'int'
s627075111
p01557
C++
#include <map> #include <queue> #include <vector> #include <utility> #include <iostream> #include <algorithm> using namespace std; int bfs(vector<int> v) { map<vector<int>, int> D; D[v] = 1; vector<int> sorted = v; sort(sorted.begin(), sorted.end()); queue<pair<vector<int>, int> que; que.push(ma...
a.cc: In function 'int bfs(std::vector<int>)': a.cc:16:34: error: template argument 1 is invalid 16 | queue<pair<vector<int>, int> que; que.push(make_pair(v, 1)); | ^~~ a.cc:16:34: error: template argument 2 is invalid a.cc:16:39: error: 'que' was not declared in this scope...
s937636965
p01557
C++
#include <map> #include <queue> #include <vector> #include <utility> #include <iostream> #include <algorithm> using namespace std; int bfs(vector<int> v) { map<vector<int>, int> D; D[v] = 1; vector<int> sorted = v; sort(sorted.begin(), sorted.end()); queue<pair<vector<int>, int> > que; que.push(...
a.cc: In function 'int bfs(std::vector<int>)': a.cc:34:35: error: cannot convert 'std::vector<int>' to 'int' in return 34 | return p1.first; | ~~~^~~~~ | | | std::vector<int>
s551435424
p01557
C++
#include <map> #include <queue> #include <vector> #include <iostream> #include <algorithm> #include <functional> using namespace std; int n; vector<int> a; struct state { vector<int> v; int dist1; int dist2; state(vector<int> v1, int d1, int d2) : v(v1), dist1(d1), dist2(d2) { } }; bool op...
a.cc: In function 'int main()': a.cc:48:13: error: expected primary-expression before '{' token 48 | if(a == {3, 1, 5, 2, 7, 4, 9, 6, 10, 8}) { printf("9\n"); return 0; } | ^ a.cc:48:12: error: expected ')' before '{' token 48 | if(a == {3, 1, 5, 2, 7, 4, 9, 6, 10, 8}) { printf("9\n"); r...
s766394339
p01557
C++
#include <bits/stdc++.h> using namespace std; #define int short #define FOR(i,k,n) for(int 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 long long ll; typedef long double ld; typedef vector<int> vi; ...
a.cc:14:17: warning: overflow in conversion from 'int' to 'short int' changes value from '1000000007' to '-13817' [-Woverflow] 14 | const int MOD = 1000000007; | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:62:60: error: no matching function for call to 'chmin(short int&, int)' 62 | ...
s148889613
p01557
C++
#include <iostream> #include <unordered_set> #include <queue> #include <vector> using namespace std; typedef long long ll; typedef pair<ll,int> pli; #define rep(i,n) for(int i = 0; i < (n); i++) #define rrep(i,n) for(int i = (n)-1; i >= 0; i--) int main() { int N; cin >> N; vector<int> A(N); rep(i,N) cin >> A[i]; ...
a.cc: In function 'int main()': a.cc:42:41: error: 'reverse' was not declared in this scope 42 | reverse(vv.begin()+i, vv.begin()+j+1); | ^~~~~~~ a.cc:54:17: error: 'sort' was not declared in this scope; did you mean 'short'? 54...
s899381499
p01557
C++
#include <map> #include <queue> #include <vector> #include <iostream> using namespace std; int n; vector<int> a; int main() { cin >> n; a.resize(n); for (int i = 0; i < n; i++) cin >> a[i], a[i]--; map<vector<int>, int> dist; dist[a] = 1; queue<vector<int> > que1; que1.push(a); while (!que1.empty()) { vector<int...
a.cc: In function 'int main()': a.cc:17:33: error: 'reverse' was not declared in this scope 17 | reverse(v1.begin() + i, v1.begin() + j); | ^~~~~~~ a.cc:36:33: error: 'reverse' was not declared in this scope 36 | ...
s783309220
p01557
C++
//半数列挙で答えが8以下かを判定する. //順列は, 16進数で表現する. #include <iostream> #include <vector> #include <algorithm> #define int long long using namespace std; int n; int a[10], decA, basePermDec; vector<int> perms[2][5]; void dfs(int type, int depth, int maxDepth, int nowP) { perms[type][depth].push_back(nowP); if (depth == maxDepth...
a.cc: In function 'bool isMatch(long long int, long long int)': a.cc:45:27: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = long long int; _Alloc = std::allocator<long long int>; size_type = long unsigned int]' (did you forget the '()' ?) ...
s178660631
p01557
C++
#include <iostream> #include <vector> #include <unordered_map> #include <string> #include <queue> using namespace std; typedef pair<string, int> P; int N; int bfs(const string& str) { int ans = 0; string sorted = str; sort(sorted.begin(), sorted.end()); unordered_map<string, int> mp; mp[str] = 0; queue<P...
a.cc: In function 'int bfs(const std::string&)': a.cc:16:24: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | string sorted = str; sort(sorted.begin(), sorted.end()); | ^~~~ | short a.cc:36:9: error: 'reverse' was not declared in thi...
s660110153
p01557
C++
// // main.cpp // AOJ // // Created by user on 2014/06/01. // Copyright (c) 2014年 user. All rights reserved. // #include <iostream> #include <vector> #include <queue> #include <set> #include <algorithm> using namespace std; const int SIZE = 3628810; typedef pair< vector<int>, int > Pack; int getPermId(const vect...
a.cc: In function 'int bfs(const std::vector<int>&, const std::vector<int>&)': a.cc:41:5: error: 'memset' was not declared in this scope 41 | memset(dist, -1, sizeof(dist)); | ^~~~~~ a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1...
s476283177
p01557
C++
// // main.cpp // AOJ // // Created by user on 2014/06/01. // Copyright (c) 2014年 user. All rights reserved. // #include <iostream> #include <vector> #include <queue> #include <set> #include <algorithm> #include <cstring> using namespace std; const int SIZE = 3628810; typedef pair< vector<int>, int > Pack; int g...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s476370511
p01558
Java
import java.util.Arrays; import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class AOJ_2444 { MyScanner sc = new MyScanner(); Scanner sc2 = new Scanner(System.in); long start = System.currentTimeMillis(); long fin = System.currentTimeMillis(); final int MOD = 1000000007; int[] dx = {...
Main.java:6: error: class AOJ_2444 is public, should be declared in a file named AOJ_2444.java public class AOJ_2444 { ^ 1 error
s860944402
p01558
C
#include<stdio.h> long long a[2]={101,103}; long long M[2]={1e9+7,1e9+9}; long long d[2][300010],k[2][300010]; long long R=1,C=1,H[2000010],N[2000010],h[300010]; //評価関数(いまはMIN) int hyouka(int a,int b){ if(C<b)return 1; if(C<a||b==0)return 0; return N[H[a]]<N[H[b]]||N[H[a]]==N[H[b]]&&h[H[a]]<h[H[b]]?1:0; } //挿入関数 ...
main.c: In function 'getlr': main.c:37:38: error: invalid operands to binary % (have 'long long int' and 'long long int *') 37 | return (d[i][r]-(d[i][l]*k[i][r-l])%M+M[i])%M[i]; | ~~~~~~~~~~~~~~~~~~~^ | | | | | ...
s460231788
p01558
C++
#include "bits/stdc++.h" using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vector<int>>; using vl = vector<ll>; using vll = vector<vector<ll>>; using pii = pair<int,int>; #define FOR(i,a,b) for(ll i = (a); i < (b); i++) #define ...
a.cc: In function 'int main()': a.cc:50:39: error: 'b' was not declared in this scope 50 | gr.insert(hash[r+1]-hash[l]*power(b,r+1-l)); | ^
s343388294
p01558
C++
w#include<iostream> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<vector> #include<cmath> #include<cstdio> #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 mp make_pair #define it ::iterator #define all(in) in.begin(),in.en...
a.cc:1:2: error: stray '#' in program 1 | w#include<iostream> | ^ a.cc:1:1: error: 'w' does not name a type 1 | w#include<iostream> | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c+...
s629692301
p01558
C++
#include <set> #include <string> #include <vector> using namespace std; int main() { int N, M, L, R; char E[300001]; char Q[4]; scanf("%d", &N); scanf("%d", &M); scanf("%s", E); L = 0; R = 0; vector<vector<int> > D(N + 1, vector<int>()); for (int i = 0; i < M; i++) { scanf("%s", Q); if (Q[0] == 'L')...
a.cc: In function 'int main()': a.cc:64:25: error: 'memcpy' was not declared in this scope 64 | memcpy(buf, &E[D[i][j]], i); buf[i] = '\0'; | ^~~~~~ a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'...
s798186057
p01558
C++
#include <set> #include <vector> #include <cstring> using namespace std; int main() { int N, M, L, R; char E[300001]; char Q[4]; scanf("%d", &N); scanf("%d", &M); scanf("%s", E); L = 0; R = 0; vector<vector<int> > D(N + 1, vector<int>()); for (int i = 0; i < M; i++) { scanf("%s", Q); if (Q[0] == 'L'...
a.cc: In function 'int main()': a.cc:11:9: error: 'scanf' was not declared in this scope 11 | scanf("%d", &N); | ^~~~~ a.cc:72:9: error: 'printf' was not declared in this scope 72 | printf("%d\n", Answer); | ^~~~~~ a.cc:4:1: note: 'printf' is defined in header '<cstdio>...
s383428911
p01558
C++
#include <iostream> #include <vector> #include <string> #include <map> #include <set> #include <algorithm> #include <cmath> using namespace std; #define rep(i,n) for(int i = 0;i < n;i++) #define ull __int128 #define int ull #define ll int ll mod_pow(ll x, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1)re...
a.cc: In function 'int main()': a.cc:32:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128') 32 | cin >> n >> m; | ~~~ ^~ ~ | | | | | __int128 | std::istream {aka std::basic_is...
s696104627
p01558
C++
#include <iostream> #include <vector> #include <string> #include <map> #include <set> #include <algorithm> #include <cmath> using namespace std; #define rep(i,n) for(int i = 0;i < n;i++) #define ull unsigned long long #define int ull #define ll int ll mod_pow(ll x, ll n, ll mod) { ll res = 1; while (n > 0) { if...
a.cc:28:17: error: unable to find numeric literal operator 'operator""ui64' 28 | const int mod = 0xffffffffffffffffui64; | ^~~~~~~~~~~~~~~~~~~~~~
s993371556
p01558
C++
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <complex> #include <queue> #include <deque> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <iomanip> #include <assert.h> #include <array> #include <cstdio> #include <cstring> #include <random> ...
a.cc:103:61: error: 'shared_ptr' has not been declared 103 | bool same(int a_start, int a_end, int b_start, int b_end, shared_ptr<RollingHash<T>> const& rh) const { | ^~~~~~~~~~ a.cc:103:71: error: expected ',' or '...' before '<' token 103 | boo...
s034376560
p01558
C++
#include <bits/stdc++.h> using lll = __int128; using namespace std; const lll B = 100000007; lll Pow(lll a, lll b) { lll res = 1; for (lll i = 0; i < 0x80;i++) { if (b & (1ull << i)) { res *= a; } a *= a; } return res; } int main() { lll n, m, l = 0, r = 0; lll hash; string S, cmd; set<lll> hass; c...
a.cc: In function 'int main()': a.cc:25:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'lll' {aka '__int128'}) 25 | cin >> n >> m >> S; | ~~~ ^~ ~ | | | | | lll {aka __int128} | std:...
s963963307
p01558
C++
#include <bits/stdc++.h> using namespace std; const __int128 B = 100000007; __int128 Pow(__int128 a, __int128 b) { __int128 res = 1; for (__int128 i = 0; i < 0x80;i++) { if (b & (1ull << i)) { res *= a; } a *= a; } return res; } int main() { __int128 n, m, l = 0, r = 0; __int128 hash; string S, cmd; ...
a.cc: In function 'int main()': a.cc:24:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128') 24 | cin >> n >> m >> S; | ~~~ ^~ ~ | | | | | __int128 | std::istream {aka std::bas...
s163745643
p01558
C++
#include <bits/stdc++.h> typedef (unsigned __int128) ull; using namespace std; const ull B = 100000007; ull Rev(ull a) { ull res = 1; for (ull i = 0; i < 0x80; i++) { res *= a; a *= a; } return res; } ull Pow(ull a, ull b) { ull res = 1; for (ull i = 0; i < 0x80;i++) { if (b & (1ull << i)) { res *= a;...
a.cc:2:10: error: expected unqualified-id before 'unsigned' 2 | typedef (unsigned __int128) ull; | ^~~~~~~~ a.cc:2:10: error: expected ')' before 'unsigned' 2 | typedef (unsigned __int128) ull; | ~^~~~~~~~ | ) a.cc:5:7: error: 'ull' does not name a type 5 | const ...
s512226550
p01558
C++
#include <bits/stdc++.h> using ull = unsigned __int128; using namespace std; const ull B = 100000007; ull Rev(ull a) { ull res = 1; for (ull i = 0; i < 0x80; i++) { res *= a; a *= a; } return res; } ull Pow(ull a, ull b) { ull res = 1; for (ull i = 0; i < 0x80;i++) { if (b & (1ull << i)) { res *= a; ...
a.cc: In function 'int main()': a.cc:34:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'ull' {aka '__int128 unsigned'}) 34 | cin >> n >> m >> S; | ~~~ ^~ ~ | | | | | ull {aka __int128 unsigned} ...
s273326495
p01558
C++
#include<bits/stdc++.h> #define ll unsigned long long using namespace std; int main(){ set<ll>a; int n,m,l=0,r=0,sum=0;; string s; cin>>n>>m>>s; while(m--){ string t; cin>>t; if(t[0]=='R')t[1]=='+'?(r++):(r--); else t[1]=='+'?(l++):(l--); string tt=substr(l,r); //a.insert(); } cout<<1543<<endl; }
a.cc: In function 'int main()': a.cc:14:27: error: 'substr' was not declared in this scope; did you mean 'strstr'? 14 | string tt=substr(l,r); | ^~~~~~ | strstr
s043675694
p01558
C++
#include<bits/stdc++.h> #define ll unsigned long long using namespace std; int main(){ unordered_set<ll>a; int n,m,l=0,r=1,sum=0;; string s; cin>>n>>m>>s; ll pp[13]; pp[0]=1; for(int i=0;i<13;i++)pp[i]=pp[i-1]*26; while(m--){ string t; cin>>t; if(t[0]=='R')t[1]=='+'?(r++):(r--); else t[1]=='+'?(l++,r...
a.cc: In function 'int main()': a.cc:2:12: error: expected ',' or ';' before 'unsigned' 2 | #define ll unsigned long long | ^~~~~~~~ a.cc:18:5: note: in expansion of macro 'll' 18 | ll p=0; | ^~ a.cc:19:34: error: 'p' was not declared in this scope 19 | for(int i=0;i<tt.size...
s145197791
p01558
C++
#include<bits/stdc++.h> using namespace std; #define ull unsigned long long vector<ull>hash,power; Roliha(string &s){ ull B=1000000007; int sz=s.size(); hash.assign(sz+1,0); power.assign(sz+1,0); power[0]=1; for(int i=0;i<sz;i++)power[i+1]=power[i]*B; for(int i=0;i<sz;i++)hash[i+1]=(hash[i]+s[i])*B; } get...
a.cc:5:1: error: ISO C++ forbids declaration of 'Roliha' with no type [-fpermissive] 5 | Roliha(string &s){ | ^~~~~~ a.cc: In function 'int Roliha(std::string&)': a.cc:8:3: error: reference to 'hash' is ambiguous 8 | hash.assign(sz+1,0); | ^~~~ In file included from /usr/include/c++/14/string_vi...
s887391949
p01558
C++
#include<bits/stdc++.h> using namespace std; #define ull unsigned long long vector<ull>hash,power; Roliha(string &s){ ull B=1000000007; int sz=s.size(); hash.assign(sz+1,0); power.assign(sz+1,0); power[0]=1; for(int i=0;i<sz;i++)power[i+1]=power[i]*B; for(int i=0;i<sz;i++)hash[i+1]=(hash[i]+s[i])*B; } get...
a.cc:5:1: error: ISO C++ forbids declaration of 'Roliha' with no type [-fpermissive] 5 | Roliha(string &s){ | ^~~~~~ a.cc: In function 'int Roliha(std::string&)': a.cc:8:3: error: reference to 'hash' is ambiguous 8 | hash.assign(sz+1,0); | ^~~~ In file included from /usr/include/c++/14/string_vi...