submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s602375863
p03761
C++
#include <iostream> #include <unordered_map> #include <vector> #include <map> #include <set> #include <algorithm> #define ll long long #define pr pair<int,int> #define all vec.begin(),vec.end() #define REP(i,a,b) for (int i = a; i < b; i++) #define fi first #define se second #define pushb push_back #define makep make_p...
a.cc: In function 'int main()': a.cc:23:9: error: 'memset' was not declared in this scope 23 | memset(ch,0,sizeof(ch)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <algorithm> +++ |+#include <cstr...
s387802576
p03761
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <queue> #include <climits> #include <set> #include <map> #include <stack> #include <iomanip> #include <tuple> #define ll long long #define rep(i,s,n) for(ll i = (ll)(s); i < (ll)(n); i++) #define all(a) (a).begin(),a....
a.cc: In function 'int main()': a.cc:124:30: error: 'i' was not declared in this scope 124 | s+=string(ans[j],i+'a'); | ^
s521838418
p03761
C++
// >>> TEMPLATES #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using i32 = int32_t; using i64 = int64_t; #define int ll #define double ld #define rep(i,n) for (int i = 0; i < (int)(n); i++) #define rep1(i,n) for (int i = 1; i <= (int)(n); i++) #define repR(i,n) for (int i =...
a.cc: In function 'int32_t main()': a.cc:81:31: error: no matching function for call to 'chmin(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 81 | rep (c,...
s363729108
p03761
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < n; i++) int main(){ int n; cin >> n; vector<string> s(n); rep(i,n)cin>>s.at(i); rep(j,26){ m = 100; rep(i,n)m = min(m,(int) count(s.at(i).begin(),s.at(i).end(),(char)('a'+j))); rep(i,m)cout<<(char)('a'+j); } cou...
a.cc: In function 'int main()': a.cc:12:5: error: 'm' was not declared in this scope 12 | m = 100; | ^
s442633591
p03761
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < n; i++) int main(){ int n; cin >> n; vector<string> s(n); rep(i,n)cin>>s.at(i); rep(j,26){ m = 100; rep(i,n)m = min(m, count(s.at(i).begin(),s.at(i).end(),(char)('a'+j))); rep(i,m)cout<<(char)('a'+j); } cout<<en...
a.cc: In function 'int main()': a.cc:12:5: error: 'm' was not declared in this scope 12 | m = 100; | ^
s835134717
p03761
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n;cin>>n;vector<int>X(26,50); for(int i=0;i<n;i++){ string S;cin>>S;char w='a'; for(int j=0;j<26;j++){ X.at(j)=min(X.at(j),count(S.begin(),S.end(),w)); w++; } } for(int i=0;i<26;i++){ char w='a';w+=i; for(int j=0;j<X.a...
a.cc: In function 'int main()': a.cc:8:18: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 8 | X.at(j)=min(X.at(j),count(S.begi...
s809516633
p03761
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n;cin>>n;vector<int>X(26,50); for(int i=0;i<n;i++){ string S;cin>>S; for(int j=0;j<26;j++)X.at(j)=min(X.at(j),count(S.begin(),S.end(),'a'+j)); } for(int i=0;i<26;i++)for(int j=0;j<X.at(i);j++)cout<<'a'+i; cout<<endl; }
a.cc: In function 'int main()': a.cc:7:37: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 7 | for(int j=0;j<26;j++)X.at(j)=min(X...
s867225802
p03761
C++
#include<bits/stdc++.h> using namespace std; int main() { vector<int> cnt[256]; vector<char> alp(26); iota(alp.begin(), alp.end(), 'a'); int n; cin >> n; for (int i = 0; i < n; i++) { string s; cin >> s; for (char c : alp) { cnt[c].push_back(count(s.begin(), s.end(), c)); } } for (char c...
a.cc: In function 'int main()': a.cc:15:21: error: 'min_elements' was not declared in this scope 15 | cout << string(*min_elements(cnt[c].begin(), cnt[c].end()), c); | ^~~~~~~~~~~~
s932098963
p03761
C++
#include<bits/stdc++.h> int main() { vector<int> cnt[256]; vector<char> alp(26); iota(alp.begin(), alp.end(), 'a'); int n; cin >> n; for (int i = 0; i < n; i++) { string s; cin >> s; for (char c : alp) { cnt[c].push_back(count(s.begin(), s.end(), c)); } } for (char c : alp) { cout <<...
a.cc: In function 'int main()': a.cc:3:3: error: 'vector' was not declared in this scope 3 | vector<int> cnt[256]; | ^~~~~~ a.cc:3:3: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/inclu...
s281923793
p03761
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define all(x) (x).begin(),(x).end() #define pb push_back #define eb emplace_back using namespace std; typedef long long ll; typedef pair<int, int> pi...
a.cc: In function 'int main()': a.cc:45:18: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 45 | cnt = min(cnt, count(all(S[i]),c)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In...
s454326438
p03761
C++
#include <bits/stdc++.h> using namespace std ; int main () { ios_base::sync_with_stdio(false); cin.tie(NULL) ; int n ; vector <string> s ; cin >> n ; while ( n-- ) { string a ; cin >> a ; s.push_back(a) ; } int arr[26] ; for ( int i = 'a' ; i <= 'z' ; i ++ ) { char c = i ; int minimum ...
a.cc: In function 'int main()': a.cc:22:30: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 22 | minimum = min(minimum,count(str.begin(),str.end(),c) ); | ...
s815236134
p03761
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for(int i=0; i<N; i++) typedef long long ll; #define dump(x) cerr<<#x<<"="<<x<<endl using P = pair<int, int>; int main() { int n; cin >> n; vector<string> s(n); rep(i, n){ cin >> s.at(i); } if(n==1){ cout << s.at(0) <...
a.cc: In function 'int main()': a.cc:48:23: error: 'e3ndl' was not declared in this scope 48 | cout << v << +e3ndl; | ^~~~~
s756614286
p03761
C++
#include<bits/stdc++.h> #include <iostream> #include <string> #include <cmath> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i,a,b) for(ll i=(a);i<(b);i++) #define FORR(i,a,b)for(ll i=(a);i<=(b);i++) #define repR(i,n) for(ll i=n;i>=0;i--) #define all(v)(v).begin(),...
a.cc: In function 'int main()': a.cc:58:15: error: request for member 'size' in 'a.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} 58 | ll h=...
s548899912
p03761
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> #include <vector> #include <set> #include <queue> #include <string> #define rep(i, a, b) for ( int i = (a); i < (b); i++ ) #define per(i, a, b) for ( int i = (b)-1; i >= (a); i--) #define pb push_back #define mp make_pair #define bg begin() #d...
a.cc: In function 'int main()': a.cc:36:34: error: 'strlen' was not declared in this scope 36 | for (int j = 0; j < (int)strlen(S[i]); j++) { | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' ...
s366471770
p03761
C++
#include <iostream> #include <algorithm> #include <string> #include <cmath> #include <vector> #include <set> #include <queue> #include <map> #define rep(i, a, b) for ( int i = (a); i < (b); i++ ) #define per(i, a, b) for ( int i = (b)-1; i >= (a); i--) #define pb push_back #define mp make_pair #define bg begin() #defi...
a.cc: In function 'int main()': a.cc:36:34: error: 'strlen' was not declared in this scope 36 | for (int j = 0; j < (int)strlen(S[i]); j++) { | ^~~~~~ a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' ...
s997855913
p03761
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);++i) #define all(a) (a).begin(),(a).end() #define dunk(a) cout << (a) << endl using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<string> s(n); rep(i, n) cin >> s[i]; string ans = ""...
a.cc: In function 'int main()': a.cc:20:32: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 20 | k = min(k, count(all(s[j]), i)); | ~~~^...
s035581108
p03761
C++
#include <iostream> using namespace std; int cnt[26][50]; string s[50]; int main() { int n; cin>>n; string ans=""; for(int i=0;i<n;i++) { cin>>s[i]; for(int j=0;j<s[i].size();j++) cnt[s[i][j]-'a'][i]++; } for(int i=0;i<26;i++) { sort(cnt[i],cnt[i]+n); ...
a.cc: In function 'int main()': a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(cnt[i],cnt[i]+n); | ^~~~ | short
s731504538
p03761
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++) #define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(),(a).end() #define vi vector<int> #define vii vector<vi> #define pii pair<int,int> #define priq...
a.cc: In function 'int main()': a.cc:36:6: error: could not convert 'ans' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 36 | if(ans) | ^~~ | | | std::string {aka std::__cxx11::basic_string<char>}
s964598881
p03761
C++
#include<iostream> #include<cstdio> #include<string> using namespace std; int n; string s; int a[27]; int minn[27];/ int main() { cin>>n; for(int i=1;i<=26;i++)minn[i]=100864; for(int i=1;i<=n;i++) { for(int j=1;j<=26;j++)a[j]=0; cin>>s; for(auto j:s)a[j-'a'+1]++; for(...
a.cc:10:14: error: expected unqualified-id before '/' token 10 | int minn[27];/ | ^
s533347516
p03761
C++
#include<bits/stdc++.h> #define INF 1e9 #define llINF 1e18 #define MOD 1000000007 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long #define ull unsigned long long #define vi vector<ll> #define vvi vector<vi> #define BITLE(n) (1LL<<((ll)n)) #define BITCNT(n) (__builtin_popc...
a.cc: In function 'int main()': a.cc:32:13: error: no matching function for call to 'min(long long int&, int&)' 32 | mi=min(mi,cnt[j][i]); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s149082788
p03761
C++
#include <bits/stdc++.h> using namespace std; #define LOOP(i,o) for(i=0;i<o;i++) #define ALL(a) (a).begin(),(a).end() int main() { int n; cin>>n; vector<string> s(n); int i=0; LOOP(i,n){ cin>>s[i]; } vector<int> a(26,51); LOOP(i,n){ for(int j=0;j<s.at(i).size();j++){ int hh=1;...
a.cc: In function 'int main()': a.cc:28:4: error: expected '}' at end of input 28 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s943911304
p03761
C++
/*Function Template*/ #include<bits/stdc++.h> using namespace std; const int mod = 1000000007; #define rep(i, n) for(int i = 0; i < (n); i++) int Len(int n) { int s=0; while(n!=0) s++, n/=10; return s; } int Sint(int n) { int m=0,s=0,a=n; while(a!=0) s++, a/=10; for(int i=s-1;i>=0;i--) m+=n/((int)pow(10...
a.cc: In function 'int main()': a.cc:62:42: error: expected primary-expression before ')' token 62 | vector<map<char,int>> w(n,map<char,int>); | ^
s181026275
p03761
C++
#include<bits/stdc++.h> using namespace std; const int mod = 1000000007; #define rep(i, n) for(int i = 0; i < (n); i++) int n,cnt[50][30]; string s[50]; char res[51]; int main() { cin>>n; int index=0; rep(i,n) cin>>s[i]; rep(i,n) rep(j,s.size()) cnt[i][s[i][j]-'a']++; rep(i,26){ int c=cnt...
a.cc: In function 'int main()': a.cc:14:22: error: request for member 'size' in 's', which is of non-class type 'std::string [50]' {aka 'std::__cxx11::basic_string<char> [50]'} 14 | rep(i,n) rep(j,s.size()) cnt[i][s[i][j]-'a']++; | ^~~~ a.cc:4:39: note: in definition of macro 'rep' ...
s111402206
p03761
C++
#include <iostream> #include <vector> using namespace std; vector <char> ALPHABET(26); int main(){ int n; cin >> n; //init APLPHABET for(int i = 0; i < 26; i++){ ALPHABET[i] = char('a' + i); } vector<string> S(n); for(int i = 0; i < n; i++) cin >> S[i]; vector<int> isect(26,51); for(a = 0;...
a.cc: In function 'int main()': a.cc:20:7: error: 'a' was not declared in this scope 20 | for(a = 0; a<isect.size(); a++){ | ^ a.cc:21:21: error: expected ';' before '<' token 21 | for(int i = 0, i < n; i++){ | ^~ | ; a.cc:21:22: error: expecte...
s343467494
p03761
C++
#include <bits/stdc++.h> #define itn int #define REP(i, n) for (int i = 0; i < n; i++) #define IREP(i, n) for (int i = n - 1; i >= 0; i--) #define REPEACH(i,k) for(auto& i:k) #define all(a) a.begin(),a.end() #define MOD 1000000007 #define int long long using namespace std; typedef long long ll; const ll INF = 1LL << 6...
a.cc: In function 'int main()': a.cc:23:35: error: no matching function for call to 'std::map<char, bool>::find(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)' 23 | if(m2.find(s[i])==m2.end()){ | ...
s711804881
p03761
C++
#include<iostream> #include<cstdio> #include<string> #include<algorithm> using namespace std; int read() { char c=getchar(); int d=0; while(c<'0' || c>'9')c=getchar(); while(c>='0' && c<='9'){d=(d<<3)+(d<<1)+(c^48);c=getchar();} return d; } #define MAXN 50 int n; string s[MAXN+1]; int a[MAXN+1][...
a.cc: In function 'int main()': a.cc:28:16: error: no matching function for call to 'getline(std::istream&, std::string [51])' 28 | getline(cin,s); | ~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s590964922
p03761
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main() { int n; cin >> n; vector<string>s(n); for (int i = 0; i < n; i++) cin >> s[i]; string abc = "abcdefghijklmnopqrstuvwxyz"; string ans; for (int i = 0; i < 26; i++) { int cnt = (int)1e9; for (int j = 0; j...
a.cc: In function 'int main()': a.cc:17:34: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 17 | cnt = min(cnt, count(s[j].begin(), s[j].end(), abc[i])); | ...
s687342057
p03761
C++
n=int(input()) a=input() for i in range(n-1) a=a.intersection(input()) print(a)
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^
s153717979
p03761
C++
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <functional> #include <iomanip> #include <stdlib.h> #include <string.h> #include <cmath> #include <map> #include <queue> #include <deque> #include <stack> #include <set> #define rep(i,n) for(int i=0; i<n; i++) const ...
a.cc: In function 'int main()': a.cc:36:25: error: 'INT_MAX' was not declared in this scope 36 | int m = INT_MAX; | ^~~~~~~ a.cc:16:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 15 | #include <set> +++ |...
s346685781
p03761
C++
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <functional> #include <iomanip> #include <stdlib.h> #include <string.h> #include <cmath> #include <map> #include <queue> #include <deque> #include <stack> #include <set> #define rep(i,n) for(int i=0; i<n; i++) const ...
a.cc: In function 'int main()': a.cc:36:25: error: 'INT_MAX' was not declared in this scope 36 | int m = INT_MAX; | ^~~~~~~ a.cc:16:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 15 | #include <set> +++ |...
s771268143
p03761
C++
#include<bits/stdc++.h> using namespace std; int t[200],ans[200],ch[200]; int main(){ int n; cin>>n; string s; for(int i=0;i<n;i++) { cin>>s; for(int i=0;i<s.size();i++) { ch[s[i]]++; } for(int i='a';i<...
a.cc: In function 'int main()': a.cc:18:48: error: expected ';' before '}' token 18 | ans[i]=min(ans[i],ch[i]) | ^ | ; 19 | } | ~
s783395481
p03761
C++
#include <iostream> #include <string> #include <iomanip> #include <vector> #include <algorithm> using namespace std; int main(void){ int N; cin >> N; vector<string>word(N); for(int i=0;i<N;i++){ cin >> word[i]; } vector<vector<int> >check(N,vector<int>(26,0)); for(int i=0;i<N;i++){ int n = word[...
a.cc: In function 'int main()': a.cc:20:24: error: no match for 'operator-' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'char') 20 | check[i][word[j] - 'a']++; In fi...
s651901226
p03761
C++
#include <bits/stdc++.h> #define rep(i,b) for(ll i=0;i<b;i++) using namespace std; string s[50]; int n,m; signed main() { cin>>n; rep(i,n)cin>>s[i]; rep(j,26) { m = 100; rep(i, n)m = min(m, (int) count(begin(s[i]), end(s[i]),(char)j+97)); rep(i, m) cout <<(char)(j+97); } cout...
a.cc: In function 'int main()': a.cc:2:22: error: 'll' was not declared in this scope 2 | #define rep(i,b) for(ll i=0;i<b;i++) | ^~ a.cc:8:5: note: in expansion of macro 'rep' 8 | rep(i,n)cin>>s[i]; | ^~~ a.cc:8:9: error: 'i' was not declared in this scope 8 | re...
s722363488
p03761
C++
#include<iostream> #include<algorithm> #include<cmath> using namespace std; int main() { int n; string s; cin >> n; vector<int> a(26,50); vector<int> b(26,0); for(int i=0; i<n; i++) { cin >> s; for(int j=0; j<s.size(); j++) { b[s[j]-'a']++; } for(int j=0; j<26; j++) { a[j]=min(a[...
a.cc: In function 'int main()': a.cc:9:3: error: 'vector' was not declared in this scope 9 | vector<int> a(26,50); | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include<cmath> +++ |+#include <vector> 4 | using ...
s823811281
p03761
C++
#include <bits/stdc++.h> #define ld long double #define ll long long int #define ull unsigned long long int #define vi vector<int> #define vl vector<ll> #define vvi vector< vector<int> > #define vvl vector< vector<ll> > #define repd(i, a, b) for (int i=(a);i<(b);i++) #define rep(i, n) repd(i,0,n) #define ALL(v) v.begi...
a.cc: In function 'int main()': a.cc:76:9: error: expected ',' or ';' before 'for' 76 | for (int i = 0; i < N; ++i) { | ^~~ a.cc:76:35: error: expected ';' before ')' token 76 | for (int i = 0; i < N; ++i) { | ^ | ...
s810416094
p03761
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; char f; vector<string>c(a); vector<int>d(26); vector<int>e(26); for(int i=0;i<26;i++){ d[i]=1000; } for(int i=0;i<a;i++){ cin>>c[i]; } for(int i=0;i<a;i++){ for(int j=0;j<c[i].size();j++){ for(int u=0;u<26;u++)...
a.cc:31:3: error: expected unqualified-id before 'for' 31 | for(int i=0;i<26;i++){ | ^~~ a.cc:31:15: error: 'i' does not name a type 31 | for(int i=0;i<26;i++){ | ^ a.cc:31:20: error: 'i' does not name a type 31 | for(int i=0;i<26;i++){ | ^ a.cc:43:1: ...
s194097823
p03761
C++
#include<bits/stdc++.h> using namespace std; char h[1000][1000];//第一个方括号记录第i个字符串,第二个方括号记录第i个字符串的第j个字符。 int s[1000],ans1[1000],ans2[1000]; int main(){ int n,flag = 0; scanf("%d",&n); for(int i = 1;i <= n;i++){ scanf("%s",h[i]);//这里字符串的输入要注意一下 s[i] = strlen(h[i]); } for(int i = 49;i <=74;i++){ ...
a.cc:8:19: error: expected initializer before '\U0000ff1b' 8 | char h[1000][1000];//第一个方括号记录第i个字符串,第二个方括号记录第i个字符串的第j个字符。 | ^~ a.cc: In function 'int main()': a.cc:22:28: error: 'h' was not declared in this scope 22 | scanf("%s",h[i]);//这里字符串的输入要注意一下 | ...
s352933604
p03761
C++
#include <iostream> #include <cstdio> #include <queue> #include <vector> #include <stack> #include <string> #include <tuple> #include <random> #include <map> #include <set> #include <complex> #include <algorithm> #include <cassert> #include <iterator> #include <numeric> #include <cmath> #include <stdio.h> #include <fun...
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 'std::vector<std::__cxx11::basic_string<char> >') 34 | cin >>S[i]; | ~~~ ^~~~~~ | | | | | std::vector<std...
s208120475
p03761
C++
#include <iostream> #include <cstdio> #include <queue> #include <vector> #include <stack> #include <string> #include <tuple> #include <random> #include <map> #include <set> #include <complex> #include <algorithm> #include <cassert> #include <iterator> #include <numeric> #include <cmath> #include <stdio.h> #include <fun...
a.cc: In function 'int main()': a.cc:34:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 34 | cin>>S[i]; | ~~~^~~~~~ | | | | | std::vector<std::__...
s651509061
p03761
C++
#include <vector> #include <cstdio> #include <iostream> #include <cmath> #include <string> #include <cstring> #include <algorithm> #include <numeric> #include <cstdlib> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define REP(i,n) for(int i=0;i<n;i++) #define SORT(...
a.cc: In function 'int main()': a.cc:27:14: error: 'INF' was not declared in this scope 27 | a[i] = INF; | ^~~
s511684553
p03761
C++
#include <vector> #include <queue> #include <algorithm> #include <iostream> #include <string> #include <tuple> #include <set> #include <map> #include <complex> #include <iomanip> #include <cmath> using namespace std; typedef long long ll; int main() { int n; cin >> n; string s[n]; for (int i = 0; i < n; i++) c...
a.cc: In function 'int main()': a.cc:22:3: error: 'memset' was not declared in this scope 22 | memset(cnt, 0, sizeof(cnt)); | ^~~~~~ a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 11 | #include <cmath> +++ |+#include <cstring> 12 ...
s664292328
p03761
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string S; vector<int> counter(26, INT_MAX); for (int i = 0; i < n; i++) { cin >> S; for (int j = 0; j < 26; j++) { counter[j] = min(counter[j], count(S.begin(), S.end(), 'a' + j)); ...
a.cc: In function 'int main()': a.cc:16:29: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 16 | counter[j] = min(counter[...
s976857806
p03761
C++
#include "bits/stdc++.h" #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) for (int i = 0; i < (n); ++i) typedef long long LL; typedef unsigned long UL; using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; string s; vector<int> abc('z' - 'a' + 1, ...
a.cc: In function 'int main()': a.cc:29:43: error: no matching function for call to 'min(std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)' 29 | abc[j - 'a'] ...
s938729423
p03761
C++
#include <bits/stdc++.h> using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } typedef long long int ll; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) #d...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Ite...
s376491887
p03761
C++
#include <vector> #include <iostream> #include <cmath> #include <numeric> #include <cstring> #include <algorithm> using namespace std; int main(){ int n,a[26]; char c[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; cin >> n; vector<string>s...
a.cc: In function 'int main()': a.cc:20:18: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 20 | b=min(b,count(s[j].begin(),s[j].end(),c[i])); | ~~~^~~~~~~~~~~~~~...
s103515235
p03761
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,n) for(int i=0;i<n;i++) int main(){ int n,memo[100][100]={0},mini=100,v,memo2[100]; string s[100],ans; cin >> n; FOR(i,n){ cin >> s[i]; } FOR(i,n){ FOR(j,s[i].size()){ memo[i][s[i].at(j)-'`']++; } } FOR(i,23){ FOR(j,n){ ...
a.cc:28:23: error: macro "FOR" requires 2 arguments, but only 1 given 28 | FOR(int i=1;i<24;i++){ | ^ a.cc:3:9: note: macro "FOR" defined here 3 | #define FOR(i,n) for(int i=0;i<n;i++) | ^~~ a.cc: In function 'int main()': a.cc:28:3: error: 'FOR' was not declared in th...
s779063046
p03761
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,n) for(int i=0;i<n;i++) int main(){ int n,memo[100][100]={0},mini=100,v; string s[100],ans; cin >> n; FOR(i,n){ cin >> s[i]; } FOR(i,n){ FOR(j,s[i].size()){ memo[i][s[i].at(j)-'`']++; } } FOR(i,23){ FOR(j,n){ v=mem...
a.cc: In function 'int main()': a.cc:25:5: error: 'memo2' was not declared in this scope; did you mean 'memo'? 25 | memo2[i]=mini; | ^~~~~ | memo a.cc:29:11: error: 'memo2' was not declared in this scope; did you mean 'memo'? 29 | FOR(j,memo2[i]){ | ^~~~~ a.cc:3:32: not...
s775841043
p03761
C++
#include <bits/stdc++.h> #define double long double #define int long long #define mii map<int,int> #define low lower_bound #define upp upper_bound #define inf 1000000007 //10^9+7 #define rep(i,n) for(int i=0;i<n;i++) #define all(vec) vec.begin(),vec.end() #define vsort(vec) sort(all(vec)) #define vrever(vec) reverse(al...
a.cc: In function 'int main()': a.cc:29:28: error: expected ';' before 'cnt' 29 | rep(j,m) {7 | ^ | ; 30 | cnt[i][s[j]-'a']++; | ~~~
s409203242
p03761
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> C(26, n); for(int i=0; i<n; i++) { string S; cin >> S; sort(S.begin(), S.end()); char tmp = 'a'; int tmpi = 0; for(int j=0; j<26; j++) { int count = 0; while(tmpi < S.size() ...
a.cc: In function 'int main()': a.cc:14:17: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(S.begin(), S.end()); | ^~~~ | short
s101469353
p03761
Java
import com.sun.javafx.collections.MappingChange; import java.awt.*; import java.io.PrintWriter; import java.util.*; import java.util.List; public class Main { public static void main(String[] args) { PrintWriter out = new PrintWriter(System.out); Scanner sc = new Scanner(System.in); Task ...
Main.java:1: error: package com.sun.javafx.collections does not exist import com.sun.javafx.collections.MappingChange; ^ 1 error
s090599011
p03761
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int n, ans[27], a[27]; string s; cin >> n; for(int j = 0; j < 27; j++){ ans[i] = 0; } for(int i = 0; i < n; i++){ cin >> s; for(int j = 0; j < 27; j++){ a[i] = 0; } for(int j = 0; j < s.length(); j++){ ...
a.cc: In function 'int main()': a.cc:10:11: error: 'i' was not declared in this scope 10 | ans[i] = 0; | ^ a.cc:18:25: error: expected unqualified-id before 'int' 18 | for(char c = 'a', int k = 0; c <= 'z'; c++, k++){ | ^~~ a.cc:18:24: error: expected ';' ...
s519176887
p03761
C++
#include<bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; int main() { ll N; cin >> N; map<char, ll>mp; map<char, ll>min_v; for (char c = 'a'; c <= 'z'; c++) { min_v[c] = 100000000; //初期化 } for (ll i = 0; i < N; i++) { string S; cin >> S; for (ll i = 0; i < S.size(); i++...
a.cc:11:38: error: extended character   is not valid in an identifier 11 | min_v[c] = 100000000; //初期化 | ^ a.cc: In function 'int main()': a.cc:11:38: error: '\U00003000' was not declared in this scope 11 | min_v[c] = 100000000; //初期化 ...
s265547045
p03761
C++
#include<iostream> #include<map> #include<vector> using namespace std; int main() { int n; cin >> n; vector<string> v(n); for(int i = 0; i < n; i++) cin >> v[i]; int cc[26]; fill(cc, cc+26, 1e9+1); for(int i = 0; i < n; i++) { for(char c = 'a'; c <= 'z'; c++) { cc[c-'a'...
a.cc: In function 'int main()': a.cc:16:45: error: 'count' was not declared in this scope 16 | cc[c-'a'] = min(cc[c-'a'], (int)count(v[i].begin(), v[i].end(), c)); | ^~~~~
s691832501
p03761
C++
#include <iostream> #define REP(i, n) for (int i = 0; i < n; ++i) using namespace std; int N, m[26][50]; int main(){ cin >> N; REP(i,N) { string s; cin >> s; for (char c: s) { m[c - 'a'][i]++; } } REP(i,26) { int me = *min_element(m[i], m[i] + N); ...
a.cc: In function 'int main()': a.cc:16:18: error: 'min_element' was not declared in this scope 16 | int me = *min_element(m[i], m[i] + N); | ^~~~~~~~~~~
s840736236
p03761
C++
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<cmath> #include<climits> #include<map> #include<set> #include<queue> #include<stack> #include<bitset> #include<iomanip> using namespace std; #define rep(i,j,n) for(int i=(j);i<(n);i++) #define rep2(i,j,n) for(int i=(j);i<=(n);i++) #defin...
a.cc: In function 'int main()': a.cc:35:37: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 35 | cou[j] = min(...
s983618785
p03761
C++
#include <iostream> #include <string> #include <vector> #include <alogirhtm> using namespace std; int main(void){ int n; cin >> n; vector<int> alp(26, 1000); string s; for (int i = 0; i < n; i++){ cin >> s; vector<int> temp(26, 0); for (int j = 0; j < s.size(); j++){ temp[s[j] - 'a']++; } for ...
a.cc:4:10: fatal error: alogirhtm: No such file or directory 4 | #include <alogirhtm> | ^~~~~~~~~~~ compilation terminated.
s128058443
p03761
C++
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> #include <sstream> #include <functional> #include <map> #include <string> #include <cstring> #include <vector> #include <queue> #include <stack> #include <deque> #include <set> #include <li...
a.cc: In function 'int main()': a.cc:52:26: error: request for member 'size' in 'b', which is of non-class type 'll [26]' {aka 'long long int [26]'} 52 | rep(j, b.size()) b[s[j]-'a']++; | ^~~~ a.cc:28:41: note: in definition of macro 'rep' 28 | #define rep(i,n) for(i...
s644916612
p03761
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #define PB push_back #define PQ priority_que...
a.cc: In function 'int main()': a.cc:37:17: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 37 | cnt[j]=min(cnt[j],count(S.begin(),S.end(),(char)'a'+j)); | ~~~^~~~~~~~~~...
s384405509
p03761
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #define PB push_back #define PQ priority_que...
a.cc: In function 'int main()': a.cc:37:17: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 37 | cnt[j]=min(cnt[j],count(S.begin(),S.end(),(char)'a'+j)); | ~~~^~~~~~~~~~...
s673850890
p03761
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #define PB push_back #define PQ priority_que...
a.cc: In function 'int main()': a.cc:37:17: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 37 | cnt[j]=min(cnt[j],count(S.begin(),S.end(),'a'+j)); | ~~~^~~~~~~~~~~~~~~~...
s892002831
p03761
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #define PB push_back #define PQ priority_que...
a.cc: In function 'int main()': a.cc:37:20: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 37 | mincnt[j]=min(mincnt[j],count(S[i].begin(),S[i].end(),'a'+j)); | ~~~^...
s235540740
p03761
C
#include<stdio.h> #include<string.h> int main(){ int num; char inStr[50][51]; int moji[26][51]; memset(moji,0,sizeof(moji)); scanf("%d",&num); for(int i = 0;i < num;i++){ scanf("%s", inStr[i]); fpurge(stdin); } for(int i=0;i< num;i++){ for(int j=0;j<strlen(inStr[i]);j++){ moji[i][inSt...
main.c: In function 'main': main.c:11:5: error: implicit declaration of function 'fpurge' [-Wimplicit-function-declaration] 11 | fpurge(stdin); | ^~~~~~
s692363463
p03761
C++
#include <stdio.h> #include <iostream> #include <sstream> #include <algorithm> #include <functional> #include <queue> #include <string.h> #define FOR(x, z, y) for(int x = (z); y; x++) #define rep(x, y) for(int x = 0; x < (y); x++) #define REP(x, z, y) for(int x = (z); x < (y); x++) #define all(x) x.begin(), x.end() #de...
a.cc: In function 'int main()': a.cc:32:23: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 32 | a[c - 'a'] = min(a[c - 'a'], count(all(line), c)); | ~~~^~~~~~~~~~...
s138863590
p03761
C
#include <stdio.h> int main(void){ int i,j,n,min; char s[51][51]; int a[51][26]={}; int b[26]={}; scanf( "%d",&n); for( i = 0; i < n; i++ ){ scanf( "%s",s[i] ); } for( i = 0; i < n; i++ ){ for( j = 0; s[i][j] != '\0'; j++ ){ a[i][s[i][j]-9...
main.c: In function 'main': main.c:34:32: error: expected ';' before ':' token 34 | printf( "%c",97+i ): | ^ | ;
s504284511
p03761
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; int main() { int n; cin >> n; vector<string> s(n); for (int i = 0; i < n; i++) { cin >> s[i]; sort(s[i].begin(), s[i].end()); } int max_length = s[0].length(), it = 0; for (int ...
a.cc: In function 'int main()': a.cc:21:39: error: request for member 'length' in 'it', which is of non-class type 'int' 21 | for (int j = i + 1; j <= s[it.length(); j++) { | ^~~~~~ a.cc:21:47: error: expected ']' before ';' token 21 | for (int j = i + 1...
s785089333
p03761
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define loop(i,a,b) for(i=a;i<b;i++) #define rloop(i,a,b) for(i=a;i>=b;i--) #define vi vector<int> #define vl vector<ll> #define vii vector< vector<int> > #define vll vector< vector<ll> > #define vs vector<string> const int inf=1000000001; const ll INF=...
a.cc: In function 'int main()': a.cc:36:30: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 36 | m=min(m,count(s[j].begin(),s[j].end(),s[mi][i-m])); | ...
s290566840
p03761
C++
#include <iostream> #include <vector> #include <string> #include <sys/time.h> using namespace std; void solve(int n, vector<string> s){ //vector< vector<int> > bin(n vector<int>(26,0)); vector< vector<int> > bin(26, vector<int>(n+1,0)); string answer = ""; for (int i = 0; i < n; i++) { while (...
a.cc: In function 'void solve(int, std::vector<std::__cxx11::basic_string<char> >)': a.cc:24:22: error: 'min_element' was not declared in this scope 24 | bin[i][n] = *min_element(bin[i].begin(), bin[i].end()-1); | ^~~~~~~~~~~
s181112030
p03761
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) int main() { int n; string o[52],s[52],much; cin >> n; rep(i, 0, n) { cin >> o[i]; s[i] = o[i]; //cout << s[i] << " " << o[i] << endl; } rep(i, 0, s[0].size()) { char m = s[0][i]; //cout << m <<" "<<"start"<< endl; b...
a.cc: In function 'int main()': a.cc:34:33: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'e' 34 | sort(much.begin(), much.e | ^ a.cc:34:34: error: expected '}' at end of input 34 | sort(much.begin(), much.e | ...
s754623612
p03761
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> int main() { int n = 0; std::cin >> n; std::vector<std::string>str(n); std::vector<std::pair<char, int>>str_char_pair{}; bool enable = false; for (int i = 0; i < n; i++) { std::cin >> str[i]; for (char c = 'a'; c <= 'z'; c++) { ...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, 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...
s366356890
p03761
C++
//http://abc058.contest.atcoder.jp/tasks/arc071_a #include <iostream> using namespace std; int n; string S[50]; void readInput(){ cin >> n; for(int i=0; i<n; i++){ cin >> S[i]; } } int main(void){ readInput(); int count[50][26]; for(int i=0; i<n; i++){ for(int j=0; j<S[i].size...
a.cc: In function 'int main()': a.cc:33:28: error: 'a' was not declared in this scope 33 | cout << char(i+a); | ^
s280659159
p03761
C++
//http://abc058.contest.atcoder.jp/tasks/arc071_a #include <iostream> using namespace std; int n; string S[50]; void readInput(){ cin >> n; for(int i=0; i<n; i++){ cin >> S[i]; } } int main(void){ readInput(); int count[50][26]; const int a = int('a'); for(int i=0; i<n; i++){...
a.cc: In function 'int main()': a.cc:24:15: error: '::count' has not been declared 24 | ::count[i][c]++; | ^~~~~ a.cc:31:24: error: '::count' has not been declared 31 | if(min > ::count[j][i]){ | ^~~~~ a.cc:32:25: error: '::count' has not be...
s105917470
p03761
C++
#include <iostream> using namespace std; string s[60]; int main(void){ int N; cin >> N; int i; for (int i=0;i<N;i++) cin >> s[i]; string ans; for(char c="a";c<="z";c++){ int small = 60; for (int i=0;i<N;i++){ int cnt = 0; for(int j=0;j<s[i].length();j++)//cが何回現れるか if(s[i][j]==c) cnt++;...
a.cc: In function 'int main()': a.cc:11:14: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 11 | for(char c="a";c<="z";c++){ | ^~~ | | | const char* a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive...
s754132737
p03761
C++
#include <iostream> using namespace std; int main() { int n; cin >> n; string s[n]; int m[n][26] = {}; for (int i = 0; i < n; i++) { cin >> s[i]; for (int j = 0; s[i][j] != '\0'; j++) { m[i][s[i][j] - 'a']++; } } for (int i = 0; i < 26; i++) { int cn = 50; for (int j = 0; j < n...
a.cc: In function 'int main()': a.cc:19:15: error: no matching function for call to 'min(int&, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)' 19 | cn = min(cn, s[j][i]); | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/inc...
s468462122
p03761
Java
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Scanner; public class Sample { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); List<Character> a = new ArrayList<Character>(51); List...
Main.java:5: error: class Sample is public, should be declared in a file named Sample.java public class Sample { ^ 1 error
s981249402
p03761
Java
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Scanner; public class Sample { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); List<Character> a = new ArrayList<Character>(50); List...
Main.java:5: error: class Sample is public, should be declared in a file named Sample.java public class Sample { ^ 1 error
s866848580
p03761
C++
#include <iostream> #include <sstream> #include <vector> #include <cmath> #include <ctime> #include <cassert> #include <iomanip> #include <cstdio> #include <float.h> #include <queue> #include <set> #include <map> #include <fstream> #include <cstdlib> #include <string> #include <cstring> #include <algorithm> #include <n...
a.cc: In function 'int main()': a.cc:102:57: error: expected ';' before 'itt' 102 | it->second = min(it->second,itt->second) | ^ | ; 103 | itt++; | ...
s919113286
p03761
C++
#include <iostream> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<string> #include<stack> #include <queue> #include<algorithm> typedef long long int ll; using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define REP(i,n) for (int i=0;i<(n);i++) #define EREP(i,n) for (int i...
a.cc: In function 'int main()': a.cc:40:11: error: lvalue required as left operand of assignment 40 | DEB((int)x-(int)'a') | ~~~~~~^~~~~~~~~ a.cc:21:17: note: in definition of macro 'DEB' 21 | #define DEB(X) {X=X;} | ^
s361590746
p03761
Java
package AtCoder; public class DubiousDocument { public static void main(String[] args) { String count = System.console().readLine(); int iCount = Integer.parseInt(count); int[] alphabetTable = new int[26]; for (int i = 0; i < 26; i++) { alphabetTable[i] = 1000; }...
Main.java:3: error: class DubiousDocument is public, should be declared in a file named DubiousDocument.java public class DubiousDocument { ^ 1 error
s562453054
p03761
C++
#include <string> #include <vector> #include <algorithm> using namespace std; int main(){ int n; cin >> n; //初期条件 int x[27] = {}; string str; cin >> str; for (int i = 0; i < str.size(); ++i){ x[str[i]-'a']++; } //比較 for (int i = 1; i < n; ++i){ string str2; ...
a.cc: In function 'int main()': a.cc:9:5: error: 'cin' was not declared in this scope 9 | cin >> n; | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <algorithm> +++ |+#include <iostream> 4 | a.cc:35:13:...
s460294193
p03761
C++
#include <iostream> #include <string> #include <algorithm> #include <map> using namespace std; int main() { int n; cin >> n; string buf, ans; map<char, int> word_map, tmp_map; cin >> buf; map<char, int>::iterator it; for (int i = 0; i < buf.size(); i++) { word_map[buf[i]]++; ...
a.cc: In function 'int main()': a.cc:30:17: error: 'word' was not declared in this scope 30 | if (word[it->first] > tmp[it->first]) | ^~~~ a.cc:30:35: error: 'tmp' was not declared in this scope; did you mean 'tm'? 30 | if (word[it->first] > tmp[it->first]) | ...
s923429328
p03761
C++
#include <iostream> #include <string> #include <algorithm> #include <map> using namespace std; int main() { int n; cin >> n; string buf, ans; map<char, int> word_map, tmp_map; cin >> buf; for (int i = 0; i < buf.size(); i++) { word_map[buf[i]]++; } for (int i = 1; i < n; i...
a.cc: In function 'int main()': a.cc:27:13: error: 'it' was not declared in this scope; did you mean 'i'? 27 | for(it = word_map.begin(); it!=word_map.end(); it++ ) { | ^~ | i a.cc:28:17: error: 'word' was not declared in this scope 28 | if (word[it->first] ...
s748082266
p03761
C
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s288649647
p03761
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <string> using namespace std; int main() { int i,j,k,n; string S[50]; char T[100],Temp1[100]; string Temp; char A[1000]={}; cin >> n; j=0; for(i=0;i<n;i++){ cin >> T; sort(T,T+strlen(T)); S[i]=T; } Temp=S[0]; int...
a.cc: In function 'int main()': a.cc:22:26: error: 'strlen' was not declared in this scope 22 | sort(T,T+strlen(T)); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <vector> +...
s574810764
p03761
C++
#include<stdio.h> #include<string.h> main(){ int l,n,i,j; char b[100],a[100]; int x[200]={0},h[200]={0}; scanf("%d",&n); getchar(); gets(a); n--; for(i=0;i<strlen(a);i++) h[a[i]]+=1; while(n--){ gets(b); for(i=0;i<strlen(b);i++) { x[b[i]]+=1; } for(i=0;i<strlen(a);i++) { if (x[a[i]]==0...
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets(a); | ^~~~ | getw
s628505178
p03761
C++
#include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(0); string a, b; int n; cin >> n; int c[26]; for(int i = 0; i < 26; i++){ c[i] = 1 << 25; } for(int i = 0; i < n; i++){ string str; cin >> str; sort(str.begin(), str.end()); for(int j = 0; ...
a.cc: In function 'int main()': a.cc:21:17: error: no matching function for call to 'min(int&, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::difference_type)' 21 | c[j] = min(c[j], upper_bound(str.begin(), str.end(), j + 'a') - lower_bound(str.begin(), str.end(), j + 'a')); | ...
s688537999
p03762
C++
#include "bits/stdc++.h" using namespace std; using ll=long long; using vll=vector< ll>; using vvll=vector< vll>; using vvvll=vector< vvll>; using vvvvll=vector<vvvll>; constexpr ll INF = 1LL << 60; struct Fast{ //cin,cout高速化のおまじない+桁数指定 Fast(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << set...
a.cc: In static member function 'static mll_<MOD> mll_<MOD>::Combination(ll, ll)': a.cc:75:21: error: 'i' was not declared in this scope 75 | REP(i,b) c *= a-i; | ^ a.cc:75:17: error: there are no arguments to 'REP' that depend on a template parameter, so a declaration of 'R...
s260332305
p03762
C++
#include <bits/stdc++.h> using namespace std; constexpr int mod = 1e9 + 7; int main() { int n, m; cin >> n >> m; vector<int> x(n), y(m); for (int i=0; i<n; ++i) cin >> x.at(i); for (int i=0; i<m; ++i) cin >> y.at(i); cout << ((((x.back() - x.front()) % mod) * ((y.back() - y.front()) % mod)) % mod) * ((n-...
a.cc: In function 'int main()': a.cc:13:108: error: expected ';' before ')' token 13 | cout << ((((x.back() - x.front()) % mod) * ((y.back() - y.front()) % mod)) % mod) * ((n-1) * (m-1) % mod)) % mod << endl; | ...
s899018113
p03762
C++
#include<bits/stdc++.h> using namespace std; static const int64_t mod=1000000007; int main(){ int N,M; cin>>N>>M; vector<int64_t>x(N); for(int i=0;i<N;i++) cin>>x.at(i); vector<int64_t>y(M); for(int i=0;i<M;i++) cin>>y.at(i); int64_t X=0; for(int i=0;i<N;i++){ int64_t k=(mod+2*i-N+1)%mod; k=...
a.cc: In function 'int main()': a.cc:16:12: error: request for member 'at' in 'X', which is of non-class type 'int64_t' {aka 'long int'} 16 | k=(k*X.at(i))%mod; | ^~ a.cc:21:12: error: request for member 'at' in 'Y', which is of non-class type 'int64_t' {aka 'long int'} 21 | k=(k*Y.at(i))...
s773429085
p03762
C++
#include<bits/stdc++.h> #define inf ((1<<30)-1) #define linf ((1<<62)ll-1) #define LL long long #define F(i,a,b,c) for(register int i=(a);(b);i=(c)) #define Fu(i,a,b) for(register int i=(a);i<=(b);++i) #define Fd(i,a,b) for(register int i=(a);i>=(b);--i) #define Fn(i,a) for(register int i=las[(a)];i;i=nex[i]) #define C...
a.cc: In function 'int main()': a.cc:21:12: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 21 | Fu(i,1,n)in(a[i]); | ^ a.cc:6:36: note: in definition of macro 'Fu' 6 | #define Fu(i,a,b) for(register int i=(a);i<=(b);++i) | ...
s628627802
p03762
C++
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools from collections import deque sys.setrecursionlimit(10**7) inf = 10**20 mod = 10**9 + 7 DR = [1, -1, 0, 0] DC = [0, 0, 1, -1] def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(...
a.cc:1:1: error: 'import' does not name a type 1 | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s231237815
p03762
C++
#include <iostream> #include <bits/stdc++.h> using namespace std; int n, m; const long long MOD = 1000000007; long long C(long long a) { return a * (a - 1) / 2; } int main() { cin >> n >> m; long long ansn = 0; long long resn = 0; cin >> resn; for (int i = 0; i < n-1; ++i) { ...
a.cc:40:1: error: expected declaration before '}' token 40 | } | ^
s456535353
p03762
C++
#include <bits/stdc++.h> using namespace std; #define repr(i,a,b) for(int i=a;i<b;i++) #define rep(i,n) for(int i=0;i<n;i++) #define reprrev(i,a,b) for(int i=b-1;i>=a;i--) // [a, b) #define reprev(i,n) reprrev(i,0,n) typedef long long ll; typedef unsigned long long ull; template<class T> inline bool chmax(T& a, T b) { ...
a.cc: In function 'int main()': a.cc:109:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'modint<1000000007>') 109 | cout << (X*Y) << endl; | ~~~~ ^~ ~~~~~ | | | | | modint<1000000007> | std::ostrea...
s473963531
p03762
C++
#include <iostream> using namespace std; int main(){ int mod=10^9+7; int n,m; int xi[2]={0,0}; int yi[2]={0,0}; int xf=0,yf=0; std::cin>>n>>m; while(cin>>l){ xi[xf]=l; xf=1; } while(cin>>l){ yi[yf]=l; yf=1; } return ((((n-1)%mod)*((m-1%)%mod)%m...
a.cc: In function 'int main()': a.cc:10:16: error: 'l' was not declared in this scope 10 | while(cin>>l){ | ^ a.cc:14:16: error: 'l' was not declared in this scope 14 | while(cin>>l){ | ^ a.cc:18:32: error: expected primary-expression before ')' token 18 | ...
s786922991
p03762
C++
#include <iostream> int main(){ int mod=10^9+7; int n,m; int xi[2]={0,0}; int yi[2]={0,0}; int xf=0,yf=0; std::cin>>n>>m; while(cin>>l){ xi[xf]=l; xf=1; } while(cin>>l){ yi[yf]=l; yf=1; } return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%m...
a.cc: In function 'int main()': a.cc:9:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | while(cin>>l){ | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s971761470
p03762
C++
#include <iostream> int main(){ int mod=10^9+7; int n,m; int xi[2]={0,0}; int yi[2]={0,0}; int xf,yf=0,0; std::cin>>n>>m; while(cin>>l){ xi[xf]=l; xf=1; } while(cin>>l){ yi[yf]=l; yf=1; } return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%m...
a.cc: In function 'int main()': a.cc:7:17: error: expected unqualified-id before numeric constant 7 | int xf,yf=0,0; | ^ a.cc:9:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | while(cin>>l){ | ^~~ | std::cin In file incl...
s138271268
p03762
C++
#include <bits/stdc++.h> #define REP(i, n) for(ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF (1ll << 60) #define sz(x) int(x.size()) using namespace std; typedef long long ll; typedef double db; typedef string str; typedef pair<ll,...
a.cc: In function 'int main()': a.cc:58:22: error: expected initializer before '+=' token 58 | ll x_sum += (x[j] - x[i]) % MOD; | ^~ a.cc:63:22: error: expected initializer before '+=' token 63 | ll y_sum += (y[l] - y[k]) % MOD; | ^~ a....
s801215588
p03762
C++
v#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) #define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--) #define reps(i, n) for (int i = 1; i <= int(n); i++) #define rreps(i, n) for (int i = int(n); i >= 1; i--) #define repi(i, a, b) for (int i = int(a); i < int(b); i++) #define each(x, y)...
a.cc:1:2: error: stray '#' in program 1 | v#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include <bits/stdc++.h> | ^ a.cc:19:14: error: 'vector' does not name a type 19 | using vi32 = vector<i32>; | ^~~~~~ a.cc:20:14: error: 'vector' does not nam...
s721449575
p03762
C++
#include<iostream> #include<cmath> #include<numeric> #include<string> #include<algorithm> #include<vector> #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<n;i++) #define int64 long long #define yokuwaruprime (10*10*10*10*10*10*10*10*10+7) using namespace std; int main(){ int n,m cin>>n>>m; ...
a.cc: In function 'int main()': a.cc:15:3: error: expected initializer before 'cin' 15 | cin>>n>>m; | ^~~ a.cc:16:16: error: 'm' was not declared in this scope 16 | int64 x[n],y[m]; | ^ a.cc:21:10: error: 'y' was not declared in this scope 21 | cin>>y[i]; | ^...
s895313638
p03762
C++
#include<iostream> #include<cmath> #include<numeric> #include<string> #include<algorithm> #include<vector> #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<n;i++) #define int64 long long #define yokuwaruprime (10*10*10*10*10*10*10*10*10+7) using namespace std; int main(){ int n,m cin>>n>>m; ...
a.cc: In function 'int main()': a.cc:15:3: error: expected initializer before 'cin' 15 | cin>>n>>m; | ^~~ a.cc:16:16: error: 'm' was not declared in this scope 16 | int64 x[n],y[m]; | ^ a.cc:21:10: error: 'y' was not declared in this scope 21 | cin>>y[i]; | ^...
s669282789
p03762
Java
import java.util.Scanner; import java.util.Arrays; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); long[] x=new long[n]; long[] y=new long[m]; long mod=1000000007; for(int i = 0; i<n; i++){ x[i]= sc.nextLong(); ...
Main.java:22: error: incompatible types: possible lossy conversion from long to int xsum+=((x[i]*i)%mod)-((x[i]*(n-1-i))%mod); ^ Main.java:22: error: incompatible types: possible lossy conversion from long to int xsum+=((x[i]*i)%mod)-((x[i]*(n-1-i))%mod); ^ Main.java:26: e...