submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s178666741
p03698
C++
int s_len; int s_judge = 0; scanf("%s", s); s_len = strlen(s); if (2 <= s_len && s_len <= 26) { for (int i = 0; i < s_len; i++) { for (int j = i + 1; j < s_len; j++) { if (s[i] == s[j]) { printf("no\n"); s_judge = 1; break; } } if (s_judge == 1) { break; } } if(s_jud...
a.cc:4:14: error: expected constructor, destructor, or type conversion before '(' token 4 | scanf("%s", s); | ^ a.cc:6:9: error: 's_len' does not name a type 6 | s_len = strlen(s); | ^~~~~ a.cc:8:9: error: expected unqualified-id before 'if' 8 | if (2...
s705793809
p03698
C++
#include<stdio.h> #include<string.h> int main() { char s[26]; int i,n,f=0; gets(s); n=strlen(s); for(i=0;i<n;i++) { if(s[i]==s[i+1]) f++; } if(f>=1) printf("no"); else printf("yes"); }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw
s380463603
p03698
C++
#include <stdio.h> #include <string> #include <iostream> #include <algorithm> #include <vector> using namespace std; int n, a, b; int main(void) { bool ok = true; cin >> s; for (int i = 0; i < s.length(); i++) { int tmp = s[i] - 'a'; if (a[tmp]) { ok = false; break; } a[tmp]++; } if (ok) ...
a.cc: In function 'int main()': a.cc:14:16: error: 's' was not declared in this scope 14 | cin >> s; | ^ a.cc:19:22: error: invalid types 'int[int]' for array subscript 19 | if (a[tmp]) | ^ a.cc:24:18: error: invalid types 'int[int]' for arra...
s934690894
p03698
C++
#include<stdio.h> #include<string.h> int main() { char s[30]; int n,f=0; gets(s); n=strlen(s); for(i=0;i<n;i++) { if(s[i]==s[i+1]) f++; } if(f>=1) printf("no"); else printf("yes"); }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw a.cc:9:13: error: 'i' was not declared in this scope 9 | for(i=0;i<n;i++) | ^
s673651799
p03698
C++
#include<stdio.h> #include<string.h> int main() { char s[30]; int i,n,f=0; gets(s); n=strlen(s); for(i=0;i<n;i++) { if(s[i]==s[i+1]) f++; } if(f>=1) printf("no"); else printf("yes"); }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw
s591294655
p03698
C++
#include<stdio.h> #include<string.h> int main() { char s[100]; int i,n,f=0; gets(s); n=strlen(s); for(i=0;i<n;i++) { if(s[i]==s[i+1]) f++; } if(f>=1) printf("no"); else printf("yes"); }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw
s823044415
p03698
C++
#include<stdio.h> #include<string.h> char s[100]; int S[55]; int main(){ gets(s); int flag; int t = strlen(s); for(int i = 0;i < t;i++){ if(s[i]=='a') S[0]++; if(s[i]=='b') S[1]++; if(s[i]=='c') S[2]++; if(s[i]=='d') S[3]++; if(s[i]=='e') S[4]++; if(s[i]=='f') S[5]++; if(s[i]=='g') S[6]++; if(s[i]==...
a.cc: In function 'int main()': a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s315181986
p03698
C++
#include <iostream> #include <string> #include <vector> using namespace std; void main() { string s; cin >> s; for (int target = 0; target < s.size(); target++) { char c = s[target]; for (int watched = 0; watched < s.size(); watched++) { char cc = s[watched]; if (target != watched && c == cc) { cout ...
a.cc:6:1: error: '::main' must return 'int' 6 | void main() { | ^~~~ a.cc: In function 'int main()': a.cc:16:33: error: return-statement with no value, in function returning 'int' [-fpermissive] 16 | return; | ^~~~~~
s759521373
p03698
C++
#include<stdio.h> #include<string.h> #include<algorithm> using namespace std; char s[100]; int S[55]; int main(){ gets(s); int flag; int t = strlen(s); for(int i = 0;i < t;i++){ if(s[i]=='a') S[0]++; if(s[i]=='b') S[1]++; if(s[i]=='c') S[2]++; if(s[i]=='d') S[3]++; if(s[i]=='e') S[4]++; if(s[i]=='f') S[...
a.cc: In function 'int main()': a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(s); | ^~~~ | getw
s532603482
p03698
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> using namespace std; char cc[30]; int main() { int p; gets(cc); for (int i=0; i<=strlen(cc)-2; i++) { for (int j=i+1; j<=strlen(cc)-1; j++) { if (cc[i]==cc[j]) { p=21; break; } } if (p==21) break; } if (p==21) cout<<...
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(cc); | ^~~~ | getw
s990237397
p03698
C++
#include <stdio.h> #include <string.h> int main() { char count[30]; char str[30];; while(gets(str)){ memset(count,0,sizeof(count)); int len=(int)strlen(str); for(int i=0;i<len;i++){ count[str[i]-'A']++; } for(int i=0;i<=57;i++) if(count[i]){ ...
a.cc: In function 'int main()': a.cc:7:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | while(gets(str)){ | ^~~~ | getw
s103878903
p03698
C++
#include <stdio.h> #include <string.h> int main() { char count[100]; char str[1024]; while(gets(str)){ memset(count,0,sizeof(count)); int len=(int)strlen(str); for(int i=0;i<len;i++){ count[str[i]-'A']++; } for(int i=0;i<=57;i++) if(count[i]){ ...
a.cc: In function 'int main()': a.cc:7:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | while(gets(str)){ | ^~~~ | getw
s017804068
p03698
C++
#include<stdio.h> #include<string.h> int main() { char s[27];int i,l,j,k=1; gets(s); l=strlen(s); for(i=0;i<l-1;i++) {for(j=i+1;j<l;j++) { if(s[i]==s[j])k=0; } } if(k==1)printf("yes"); else printf("no"); }
a.cc: In function 'int main()': a.cc:6:1: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s297022944
p03698
C++
#include<stdio.h> #include<string.h> int main() { char s[27];int i,l,j,k=1; gets(s); l=strlen(s); for(i=0;i<l-1;i++) {for(j=i+1;j<l;j++) { if(s[i]==s[j])k=0; } } if(k=1)printf("yes"); else printf("no"); }
a.cc: In function 'int main()': a.cc:6:1: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s330105789
p03698
C++
#include<stdio.h> #include<string.h> int main() { char s[27];int i,l,j,k=1; gets(s); l=strlen(s); for(i=0;i<l-1;i++) {for(j=i+1;j<l;j++) { if(s[i]==s[j])k=0; } } if(k)printf("yes"); else printf("no"); }
a.cc: In function 'int main()': a.cc:6:1: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s319343739
p03698
C++
#include<stdio.h> #include<string.h> int main() { char s[27];int i,l,j,k=1; gets(s); l=strlen(s); for(i=0;i<l-1;i++) {for(j=i+1;j<l;j++) { if(s[i]==s[j])k=0; } } if(k)printf("yes"); else printf("no"); }
a.cc: In function 'int main()': a.cc:6:1: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s145429708
p03698
C++
#include <stdio.h> #include <string.h> int main () { int n,j,k,i,l; char a[100]; gets(a); n=strlen(a)-1; for(i=0;i<n;i++) for(j=0;j<n-i;j++) {if(a[i]==a[j])printf("yes"); else printf("no");} }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(a); | ^~~~ | getw
s761230323
p03698
C++
#include <stdio.h> #include <string.h> bool cnt[128] = {0}; int main(void) { bool flag = false; char str[32]; gets(str); for (int i = 0; i < 32; i++) { if (str[i] == '\0') break; if (cnt[str[i]]) { flag = true; break; } else cnt[str[i...
a.cc: In function 'int main()': a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(str); | ^~~~ | getw
s395341739
p03698
C
#include <stdio.h> int main(){ int i, j, out=0; char s[30]; scanf("%s", s); for(i=0;s[i]!='¥0';i++){ for(j=1;s[j]!='¥0'j++){ if(s[i]==s[j]){ out=1; } } } if(out==1){ printf("no\n"); }else if(out==0){ printf("yes\n"); } return 0; }
main.c: In function 'main': main.c:7:17: warning: multi-character character constant [-Wmultichar] 7 | for(i=0;s[i]!='¥0';i++){ | ^~~~ main.c:8:19: warning: multi-character character constant [-Wmultichar] 8 | for(j=1;s[j]!='¥0'j++){ | ^~~~ main.c:8:23: error:...
s562714506
p03698
C++
#include<stdio.h> #include<string.h> int main() { char a[26];int i,t=0; gets(a); for(i=0;i<strlen(a);i++) { if(a[i]==a[i+1]) t=1; } if(t==1) printf("no"); else printf("yes"); }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(a); | ^~~~ | getw
s689932584
p03698
C++
#include<stdio.h> #include<string.h> int main() { char a[100];int i,j,t=0; gets(a); for(i=0;i<strlen(a);i++) { if(a[i]==a[i+1]) t=1; } if(t==1) printf("no"); else printf("yes"); }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(a); | ^~~~ | getw
s514043286
p03698
C++
#include<map> #include<cmath> #include<queue> #include<cstdio> #include<string> #include<cstring> #include<iostream> #include<algorithm> using namespace std; char s[30]; map<char,int>q; int main() { gets(s); int len=strlen(s); for(int i=0;i<len;i++) { if(q[s[i]]==0)q[s[i]]=1; else ...
a.cc: In function 'int main()': a.cc:16:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 16 | gets(s); | ^~~~ | getw
s187873093
p03698
C++
#include<stdio.h> #include<string.h> int num[200]; int main(){ char a[50]; while(gets(a)){ memset(num,0,sizeof(num)); int s=strlen(a),i,g; for(i=0;i<s;i++){ g=a[i]-'a'; num[g]++; } int flag=0; for(i=0;i<=26;i++){ if(num[i]>1){ flag=1; break; } } if(flag==0) printf("yes\n"); el...
a.cc: In function 'int main()': a.cc:6:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | while(gets(a)){ | ^~~~ | getw
s006603325
p03698
C++
#include<stdio.h> int main() { char s[27]; int t,t1; gets(s); for(t=0;s[t]!='\0';t++) { for(t1=t+1;s[t1]!='\0';t1++) { if(s[t] == s[t1]) { printf("no\n"); return 0; } } } printf("yes\n"); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw
s970727049
p03698
C++
// {{{ #include<vector> #include<list> #include<set> #include<map> #include<queue> #include<deque> #include<stack> #include<bitset> #include<algorithm> #include<functional> #include<numeric> #include<utility> #include<sstream> #include<iostream> #include<iomanip> #include<cstdio> #include<cstdlib> #include<cmath> #incl...
a.cc: In function 'int main()': a.cc:37:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns...
s792777195
p03698
C++
#include <iostream> #include <string> #include <string.h> using namespace std; int main(){ string str; cin >> str; for(int i = 0; i < str.size(); i++){ if(strstr(str, str[i]) != NULL){ cout << "yes"; }else{ cout << "no"; } } }
a.cc: In function 'int main()': a.cc:9:14: error: no matching function for call to 'strstr(std::string&, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)' 9 | if(strstr(str, str[i]) != NULL){ | ~~~~~~^~~~~~~~~~~~~ In file included from a.cc:3: /usr/include/string.h:330:14: note: ...
s600895659
p03699
C++
#include <bits/stdc++.h> #define ln "\n" #define SORT(X) sort(X.begin(), X.end()) #define SORTi(X) sort(X.begin(), X.end(), greater<ll>()) #define REP(x, a, b) for (auto x = a; x <= b; x++) #define REPi(x, b, a) for (auto x = b; x >= a; x--) #define REPit(x, A) for (auto x = A.begin(); x != A.end(); x++) #define REPr(...
a.cc: In function 'int main()': a.cc:42:17: error: return-statement with no value, in function returning 'int' [-fpermissive] 42 | return; | ^~~~~~
s642683213
p03699
C++
#include<bits/stdc++.h> #include<atcoder/all> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using namespace atcoder; using ll = long long; using p = pair<int,int>; const long long INF = 1ll << 60; int main() { int N; cin >> N; int haiten[N]; rep(i,N){ cin >> haiten[i]; } ll ...
a.cc:2:9: fatal error: atcoder/all: No such file or directory 2 | #include<atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.
s061705966
p03699
C++
#include <iostream> #include <vector> #incldue <algorithm> using namespace std; int main(void){ int n; cin>>n; vector<int>data(n); for(int i=0;i<n;i++){ cin>>data.at(i); } sort(data.begin(),data.end()); int ans=0; for(int i=0;i<n;i++){ ans+=data.at(i); } if(ans%10==0){ fo...
a.cc:3:2: error: invalid preprocessing directive #incldue; did you mean #include? 3 | #incldue <algorithm> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(data.begin(),data.end()); | ^~~~ | ...
s335954613
p03699
C++
#include<bits/stdc++.h> #define int long long /* #define double long double */ #define rep(i, n) for(int i = 0; i < (int)n; i++) #define repa(i, s, n) for(int i = s; i < (int)n; i++) #define MOD 1000000007 using namespace std; using ll = long long; typedef vector<int> vi; typedef pair<int, int> P; #define rrep(i,a,b) f...
a.cc: In function 'int main()': a.cc:32:16: error: no matching function for call to 'max(long long int&, int)' 32 | cout << max(ans, 0) << endl; | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s544624409
p03699
C
//main関数は一番下にあります #include "bits/stdc++.h" #define rep(i, j) for (int i = 0; i < j; i++) #define srep(i, j, k) for (int i = j; i < k; i++) using namespace std; using ll = long long; using vll = vector<ll>; using vi = vector<int>; using vi2 = vector<vi>; using vl2 = vector<vll>; using vb = vector<bool>; using S = strin...
main.c:3:10: fatal error: bits/stdc++.h: No such file or directory 3 | #include "bits/stdc++.h" | ^~~~~~~~~~~~~~~ compilation terminated.
s856289985
p03699
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (int)(n); ++i) using namespace std; using ll = long long; using P = pair<int,int>; int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int n; cin >> n; vector<int> s(n); vector<int> not_ten int sum = 0; rep(i,n...
a.cc: In function 'int main()': a.cc:16:5: error: expected initializer before 'int' 16 | int sum = 0; | ^~~ a.cc:19:28: error: 'not_ten' was not declared in this scope 19 | if(s[i] % 10 != 0) not_ten.emplace_back(s[i]); | ^~~~~~~ a.cc:20:9: error: 'sum' was n...
s125109055
p03699
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for (int i = (a); i < (int)(b); ++i) #define endl "\n" typedef long long ll; typedef string str; const double pi=3.14159265358979323846; const long long inf = 1LL << 60; int ctoi(const char c) { if ('0' <= c && c <= '9') return (c - '0'); return ...
a.cc: In function 'int main()': a.cc:263:10: error: request for member 'begin' in 's', which is of non-class type 'int [111]' 263 | sort(s.begin(),s.end()); | ^~~~~ a.cc:263:20: error: request for member 'end' in 's', which is of non-class type 'int [111]' 263 | sort(s.begin(),s.end()); | ...
s189695276
p03699
C++
#include <bits/stdc++.h> #define local #ifdef local #include "dbg-macro/dbg.h" #endif #define ll long long #define pi (acos(-1)) #define rep(i, n) for (unsigned long long i = 0; i < (unsigned long long)(n); ++i) using namespace std; std::vector<unsigned ll> genprimevec(const unsigned ll N); int main() { int n; ...
a.cc:4:10: fatal error: dbg-macro/dbg.h: No such file or directory 4 | #include "dbg-macro/dbg.h" | ^~~~~~~~~~~~~~~~~ compilation terminated.
s543094259
p03699
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, c) for (int i = 0; i < (int)c; i++) int main() { int n; scanf("%d", &n); vector<int> s(n); int sum = 0; rep(i, n) { scanf("%d", &s[i]); sum += s[i]; } if(ans % 10 == 0) { sort(s.begin(), s.end()); rep(i, n) { if (s[i] % 10) { //s[i]が10の倍数でなけ...
a.cc: In function 'int main()': a.cc:14:12: error: 'ans' was not declared in this scope; did you mean 'abs'? 14 | if(ans % 10 == 0) { | ^~~ | abs
s315731682
p03699
C++
#include <bits/stdc++.h> #define F first #define S second using namespace std; using ll = long long; typedef pair<int, int> P; ll Mod = 1000000007; int main() { int N; cin >> N; int s[N]; int sum = 0; for (int i = 0; i < N; i++) { cin >> s[i]; sum += s[i]; } sort(s,s+N); if (sum % 10 != 0) { ...
a.cc: In function 'int main()': a.cc:22:26: error: expected ';' before 'i' 22 | for (int i = 0; i < N i++) { | ^~ | ;
s891005630
p03699
C++
#include <ext/pb_ds/assoc_container.hpp> #define ll long long #define bp __builtin_popcount #define pb push_back #define loop(i,n) for(int i = 0;i < int(n);i++) #define sz(s) (int)(s.size()) #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define setdp memset(dp,-1,sizeof(dp)) #define fr first #...
a.cc: In function 'int main()': a.cc:35:34: error: 'cin' was not declared in this scope 35 | ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0); | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' ...
s807017950
p03699
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; bool F=false; long long M=0; long long L=100; cin>>N; vector<int>vec(N); for(int X=0;X<N;X++){ cin>>vec.at(X); M+=vec.at(X); if(vec.at(X)%10!=0 && L>vec.at(X){ L=vec.at(X); bool F=true; } } if(M%10!=0){ ...
a.cc: In function 'int main()': a.cc:14:38: error: expected ')' before '{' token 14 | if(vec.at(X)%10!=0 && L>vec.at(X){ | ~ ^ | ) a.cc:18:3: error: expected primary-expression before '}' token 18 | } | ^
s825594609
p03699
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int N; cin >> N; vector<int> s(N); vector<vector<int>> dig1s(10, vector<int>(0)); int sum = 0; for(int i = 0; i < N; i++){ cin >> s[i]; sum += s[i]; dig1s[s[i]%10].push_back(s[i]); } bool isSumZero ...
a.cc: In function 'int main()': a.cc:23:29: error: call of overloaded 'abs(std::vector<int>::size_type)' is ambiguous 23 | diff = (int) abs(dig1s[i].size() - dig1s[10-i].size()); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/cstdlib:7...
s025981159
p03699
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int N; cin >> N; vector<int> s(N); vector<vector<int>> dig1s(10, vector<int>(0)); int sum = 0; for(int i = 0; i < N; i++){ cin >> s[i]; sum += s[i]; dig1s[s[i]%10].push_back(s[i]); } bool isSumZero ...
a.cc: In function 'int main()': a.cc:23:23: error: call of overloaded 'abs(std::vector<int>::size_type)' is ambiguous 23 | diff = abs(dig1s[i].size() - dig1s[10-i].size()); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/cstdlib:79, ...
s030203526
p03699
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> s(n); int ans=0; for(int i=0;i<n;i++){ cin >> s.at(i); ans+=s.at(i); } sort(s.begin(),s.end()); for(int i=0;i<n;i++){ if(ans%10!=0){ cout <...
a.cc:26:7: error: expected unqualified-id before 'if' 26 | if(ans%10==0){ | ^~ a.cc:30:7: error: expected unqualified-id before 'return' 30 | return 0; | ^~~~~~ a.cc:31:2: error: expected declaration before '}' token 31 | } | ^
s528098974
p03699
C
#include <iostream> #include <string> #include <queue> #include <vector> #include <algorithm> #include <math.h> #include <map> #include <iomanip> #include <queue> #include <numeric> using namespace std; int main() { int N, sum = 0; cin >> N; vector<int> s(N); for (int i = 0; i < N; i++) { cin >> s[i]; sum ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s965241812
p03699
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef vector<int> vint; #define rep(i,n) for (int i = 0; i < (ll)(n); ++i) ll INF = 1LL << 60; ll mod = 1e9 + 7; int main() { int n; cin >> n; vint s(n); int mi = 1000; int ans=0; rep(i,n) { cin >> s[i]; ans+=s[i]; mi = ...
a.cc: In function 'int main()': a.cc:20:13: error: no match for 'operator%' (operand types are 'vint' {aka 'std::vector<int>'} and 'int') 20 | if(s%10==0) { | ~^~~ | | | | | int | vint {aka std::vector<int>} In file included from /usr/includ...
s566909003
p03699
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int k=0; int s=100000; for(int i=0;i<n;i++){ int x; cin >> x; k+=x; if(x%10!=0) s=smin(s,x); } if(k%10!=0) cout << k << endl; else cout << k-s << endl; }
a.cc: In function 'int main()': a.cc:13:19: error: 'smin' was not declared in this scope; did you mean 'sin'? 13 | if(x%10!=0) s=smin(s,x); | ^~~~ | sin
s424840677
p03699
C++
#include <iostream> #include <vector> #include <bitset> #include <algorithm> int main(){ int N; std::cin >> N; std::vector<int> s(N); for (int i=0; i<N; ++i){ std::cin >> s.at(i); } int max = 0; for (int i=0; i<(1<<N)-1); i++){ std::bitset<100> b(i); //std::cerr << b << std::endl...
a.cc: In function 'int main()': a.cc:14:28: error: expected ';' before ')' token 14 | for (int i=0; i<(1<<N)-1); i++){ | ^ | ; a.cc:14:31: error: 'i' was not declared in this scope 14 | for (int i=0; i<(1<<N)-1); i++){ | ...
s036730273
p03699
C++
#pragma region template #include <bits/stdc++.h> #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() #define sz(a) (int)(a).size() #define last(a) (a).at((int)(a).size()-1) #define rep(i,n) for(int i=0,i##_len=(n);i<i##_len;i++) #define brep(i,a,b) for(int i=(a),i##_len=(b);i<=i##_len;i++) #def...
a.cc: In function 'void solve(ll, std::vector<int>)': a.cc:114:7: error: no matching function for call to 'sort(std::vector<int>&)' 114 | sort(s); | ~~~~^~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, f...
s328610026
p03699
Java
public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int sum = 0; List<Integer> point = new ArrayList<>(); for (int i = 0; i < N; i++) { int p = sc.nextInt(); sum += p; if (p%10 != 0) { point.add(p); } } if (point.size()...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol ...
s975233677
p03699
C++
#include<algorithm>//sort(all(変数),greater<型名>())で降順に、*max_element(all(変数))で最大値を獲得 #include<bits/stdc++.h> #include<cmath>//切り上げceil(値) #include<deque> #include<iomanip>//setprecision(数字) #include<iostream> #include<list> #include<map> #include<numeric> // xとyのgcdは__gcd(x,y),xとyのlcmは(x*y)/__gcd、accumulate(all(変数),0)で要素の...
a.cc: In function 'int main()': a.cc:33:36: error: invalid types 'int[int]' for array subscript 33 | if((sum-s[i])%10!=0) sum -= sum[i]; | ^
s877820959
p03699
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <set> using namespace std; typedef long long ll; #define rep(i,n) for (int i=0;i < (int)(n);i++) bool dp[2][10001]; int main(){ int n; cin >> n; dp[0][0] = true; dp[1][0] = true; int one = 0; int two...
a.cc: In function 'int main()': a.cc:38:2: error: expected '}' at end of input 38 | } | ^ a.cc:13:11: note: to match this '{' 13 | int main(){ | ^
s678225337
p03699
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ int n; cin >> n; vector<int> s(n); for(int i =0;i < n;i++){ cin >> s[i]; } sort(s.begin(),s.end()); int ans = 0; for(int i =0;i < n;i++){ ans += s[i]; } int count =0; while(ans%10...
a.cc:23:15: error: extended character   is not valid in an identifier 23 |  break; | ^ a.cc: In function 'int main()': a.cc:23:15: error: '\U00003000break' was not declared in this scope 23 |  break; | ^~~~~~~
s219595967
p03699
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n=sc.nextInt(),max=0,sum=0; int[] s=new int[n]; for(int i=0;i<n;i++){ s[i]=sc.nextInt(); } for(double i=0;i<(1<<(double)n);i++){ for(int j=0;j<n;j++){ i...
Main.java:12: error: bad operand types for binary operator '<<' for(double i=0;i<(1<<(double)n);i++){ ^ first type: int second type: double Main.java:14: error: bad operand types for binary operator '>>' if((1&i>>j)==1){ ^ first type: double second type: int 2...
s868538682
p03699
C
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> s(n); for(int i=0; i<n; ++i)cin>>s[i]; sort(s.begin(),s.end()); int sum = accumulate(s.begin(),s.end(),0); if(sum%10) { cout << sum << endl; return 0; } for (int i=0; i<n; ++i) { ...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s298468000
p03699
C
#include <stdio.h> #define max(a, b) ((a)<(b) ? (b) : (a)) #define swap(type, x, y) do{ type t = x; x = y; y = t; }while(0) int ans = 0; void quick(int array[], int left, int right){ int pl = left, pr = right, x = array[(left + right) / 2]; do{ while(array[pl] < x) pl++; while(array[pr] > x) pr--; if...
main.c: In function 'main': main.c:21:27: error: 'h' undeclared (first use in this function) 21 | int n; scanf("%d", &n);h | ^ main.c:21:27: note: each undeclared identifier is reported only once for each function it appears in main.c:21:28: error: expected ';' before 'int' 21 |...
s481679907
p03699
C
#include <stdio.h> #define max(a, b) ((a)<(b) ? (b) : (a)) #define swap(type, x, y) do{ type t = x; x = y; y = t; }while(0) int ans = 0; void quick(int array, int left, int right){ int pl = left, pr = right, x = array[(left + right) / 2]; do{ while(array[pl] < x) pl++; while(array[pr] > x) pr--; if(p...
main.c: In function 'quick': main.c:7:39: error: subscripted value is neither array nor pointer nor vector 7 | int pl = left, pr = right, x = array[(left + right) / 2]; | ^ main.c:9:16: error: subscripted value is neither array nor pointer nor vector 9 | while(a...
s448646130
p03699
C
#include <stdio.h> #define max(a, b) ((a)<(b) ? (b) : (a)) int ans = 0; void quick(int array, int left, int right){ int pl = left, pr = right, x = array[(left + right) / 2]; do{ while(array[pl] < x) pl++; while(array[pr] > x) pr--; if(pl <= pr){ swap(int, array[pl], array[pr]); pl++, pr-...
main.c: In function 'quick': main.c:7:39: error: subscripted value is neither array nor pointer nor vector 7 | int pl = left, pr = right, x = array[(left + right) / 2]; | ^ main.c:9:16: error: subscripted value is neither array nor pointer nor vector 9 | while(a...
s795704566
p03699
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (int)(n); i++) #define REP(i,n) for (int i = 1; i < (int)(n); i++) #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define vout(x) rep(i,x.size()) cout << x[i] << " " template<class T> bool chmin(T &a, T b) {if(a>b) {a=b;return 1;}return...
a.cc: In function 'int main()': a.cc:42:6: error: expected '}' at end of input 42 | } | ^ a.cc:21:12: note: to match this '{' 21 | int main() { | ^
s687391012
p03699
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin>>N; int ans=0; vector<int> s(N,0); int mini=100; for (int i=0;i<N;i++){ cin>>s[i]; ans+=s[i]; if (s[i]%10!=0){ mini=min(mini,s[i]); } } if (ans%10==0){ ans-=mini; ...
a.cc: In function 'int main()': a.cc:21:16: error: expected ';' before 'endl' 21 | cout << ans endl; | ^~~~~ | ;
s121921910
p03699
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> a(n); for (int i=0;i<n;++i) cin >> a[i]; sort(a.begin(),a.end()); int ans=0; for (int i=0;i<n;++i){ ans+=a[i]; } if (ans%10!=0) cout << ans << endl; else { if (a[i]!=0){ ans-=a[0]; } cout ...
a.cc: In function 'int main()': a.cc:18:11: error: 'i' was not declared in this scope 18 | if (a[i]!=0){ | ^
s243041990
p03699
C++
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int sum=0; int ara[n+5]; for(int i=0;i<n;i++)cin>>ara[i],sum+=ara[i]; if(sum%10==0) { sort(ara,ara+n); bool f=true; for(int i=0;i<n;i++) { if((sum-ara[i])%10) { sum-=ara[i]; cout<<sum<<endl...
a.cc: In function 'int main()': a.cc:21:14: error: expected ';' before '}' token 21 | break | ^ | ; 22 | } | ~
s267407250
p03699
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; vector<pair<int,int>S(N); int sum=0; for(int i=0;i<N;i++){ cin>>S.at(i).first; if(S.at(i).first%10==0){ S.at(i).second=1; } else{ S.at(i).second=0; } sum=sum+S.at(i).first; } if(sum%10!=0){ cout...
a.cc: In function 'int main()': a.cc:6:26: error: template argument 1 is invalid 6 | vector<pair<int,int>S(N); | ^ a.cc:6:26: error: template argument 2 is invalid a.cc:9:10: error: 'S' was not declared in this scope 9 | cin>>S.at(i).first; | ^ a.cc:24:10: err...
s333718061
p03699
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> scores(n); int sum = 0; rep(i, n) { cin >> scores[i]; sum += scores[i]; } sort(scores.begin(), scores.end()); if (sum % 10 == 0) { for (auto it = scores.begin(); it != scores.end(); it++) { if (*it...
a.cc: In function 'int main()': a.cc:9:7: error: 'i' was not declared in this scope 9 | rep(i, n) { | ^ a.cc:9:3: error: 'rep' was not declared in this scope 9 | rep(i, n) { | ^~~
s155432693
p03699
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; const ll MOD=1000000007; int main() { int n,sum=0; cin >> n; vector<int> s(n); for(int i=0;i<n;i++){ cin >> s[i]; } sort(s.begin(),s.end()); for(int i=0;i<n;i++){ sum +=s[i]; } if(sum%10==0){ for(int i=0;i<n;i++){ su...
a.cc: In function 'int main()': a.cc:26:8: error: 'i' was not declared in this scope 26 | if(i==n-1) | ^
s404415702
p03699
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; const ll MOD=1000000007; int main() { int n,sum=0; cin >> n; vector<int> s(n); for(int i=0;i<n;++){ cin >> s[i]; } sort(s.begin(),s.end()); for(int i=0;i<s;i++){ sum +=s[i]; } if(sum%10==0){ for(int i=0;i<n;i++){ sum...
a.cc: In function 'int main()': a.cc:11:21: error: expected primary-expression before ')' token 11 | for(int i=0;i<n;++){ | ^ a.cc:15:16: error: no match for 'operator<' (operand types are 'int' and 'std::vector<int>') 15 | for(int i=0;i<s;i++){ | ~^~ | ...
s644574570
p03699
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; int an[n]; rep(i,n)cin>>an[i]; int s=0;rep(i,n) s+= an[i]; sort(an, an+n); rep(i,n) { if (s%10!=0) break; if (an[i]%10!=0) { s-=an[i]; break } } cout << s;...
a.cc: In function 'int main()': a.cc:14:12: error: expected ';' before '}' token 14 | break | ^ | ; 15 | } | ~
s834246156
p03699
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main(){ int n; cin>>n; queue<int> s,f,t; rep(i,n){ int tmp; cin>>tmp; if(tmp%10==0)t.push(tmp); else if(tmp%5==0)f.push(tmp); else s.push(tmp); } cout<<s.size()<...
a.cc: In function 'int main()': a.cc:20:10: error: 'class std::queue<int>' has no member named 'begin' 20 | sort(s.begin(),s.end()); | ^~~~~ a.cc:20:20: error: 'class std::queue<int>' has no member named 'end' 20 | sort(s.begin(),s.end()); | ^~~ a.cc:21:10: error: 'clas...
s169790671
p03699
C++
#include<iostream> #include<string> using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) int main(){ int n; cin >> n; int s[n]; rep(i, n) cin >> s[i]; sort(s, s + n); int ans = 0; rep(i, n) ans += s[i]; if(ans % 10 != 0){ cout << ans << endl; return 0; ...
a.cc: In function 'int main()': a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(s, s + n); | ^~~~ | short
s180922121
p03699
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,MAX=100,S=0;cin>>N;int s[N]; for(int i=0;i<N;i++){ cin>>s[i];S+=s[i]; if(s[i]%10!=0)MAX=min(MAX,s[i]); } if(S%10!=0)cout<<S<<endl; else if(MAX!=100)cout<<S-MAX<<end; else cout<<"0"<<endl; }
a.cc: In function 'int main()': a.cc:10:31: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 10 | else if(MAX!=100)cout<<S-MAX<<end; | ~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, ...
s309604139
p03699
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); Integer n = scan.nextInt(); int[] a = new int[n]; for(int i = 0 ; i < n ; i++){ a[i] = sc.nextInt(); } int sum = 0; for(int i = 0 ; i < n ; i++){ sum += a[i]; } ...
Main.java:9: error: cannot find symbol a[i] = sc.nextInt(); ^ symbol: variable sc location: class Main 1 error
s298592645
p03699
Java
import kotlin.collections.unsigned.UArraysKt; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Scanner; import java.util.stream.Collectors; import java.util.stream.IntStream; public class Main { public static void main(final String[] args) { final Scanner s...
Main.java:2: error: package kotlin.collections.unsigned does not exist import kotlin.collections.unsigned.UArraysKt; ^ 1 error
s572571099
p03699
C++
#include<iostream> #include<stdio.h> #include<vector> #include<algorithm> #include<set> #include<string> #include<map> #include<string.h> #include<complex> #include<math.h> #include<queue> #include <functional> #include<time.h> #include <stack> using namespace std; #define rep(i,a,n) for(int i=(a);i<(n);i++) #define ll...
a.cc:130:9: error: 'cout' does not name a type 130 | cout << sum << endl; | ^~~~ a.cc:134:9: error: expected unqualified-id before 'return' 134 | return 0; | ^~~~~~ a.cc:135:1: error: expected declaration before '}' token 135 | } | ^
s888956835
p03699
C++
#include<bits/stdc++.h> using namespace std; typedef long long int ll; int main() { int n; cin>>n; int s[n]; ll sum = 0; for(int i = 0; i < n; i++) { cin>>s[i]; sum += s[i]; } if(sum % 10 == 0) { bool all = true; for(int i = 0; i < n; i++) { if(s[...
a.cc: In function 'int main()': a.cc:37:26: error: no matching function for call to 'max(int&, ll&)' 37 | res = max(t, res); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s571106359
p03699
C++
#include <iostream> using namespace std; int main() { int n; cin >> n; int res[10] = {}; for (int i = 0; i < n; ++i) { int nr[10] = {}; int t; cin >> t; nr[t % 10] = res[0] + t; for (int j = 0; j < 10; ++j) { if (j == 0 || res[j]) { nr[(t + j) % 10] = res[j] + t; } } ...
a.cc: In function 'int main()': a.cc:17:9: error: invalid array assignment 17 | res = nr; | ~~~~^~~~
s429273842
p03699
C++
#include <iostream> using namespace std; int main(){ int n, su=0, i; cin >> n; int s[n]; for(i=0; i<n; i++){ cin >> s[i]; su+=s[i]; } sort(s, s+n); if(su%10!=0){ cout << su << endl; return 0; } for(i=0; i<n; i++) if(s[i]%10!=0){ cout << su-s[i] << endl; return 0; } ...
a.cc: In function 'int main()': a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(s, s+n); | ^~~~ | short
s255493224
p03699
C++
#include <iostream> using namespace std; int main(){ int n, su=0; cin >> n; int s[n]; for(i=0; i<n; i++){ cin >> s[i]; su+=s[i]; } sort(s, s+n); if(su%10!=0){ cout << su << endl; return 0; } for(i=0; i<n; i++) if(s[i]%10!=0){ cout << su-s[i] << endl; return 0; } c...
a.cc: In function 'int main()': a.cc:7:7: error: 'i' was not declared in this scope 7 | for(i=0; i<n; i++){ | ^ a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(s, s+n); | ^~~~ | short a.cc:16:7: error: 'i' was not declared in this scope ...
s717729769
p03699
C++
#include <iostream> using namespace std; int main() { int N; cin >> N; int s[110]; bool flag = true; int ans = 0; int minus; for (int i = 0; i < N; i++) { cin >> s[i]; if (s[i] % 10 != 0) flag = false; ans += s[i]; } if (flag) { cout << 0 << endl; return 0; } sort(s, s + N);...
a.cc: In function 'int main()': a.cc:22:3: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(s, s + N); | ^~~~ | short
s155916097
p03699
C++
n = int(input()) score = [] for _ in range(n): score.append(int(input())) score.sort() total = sum(score) counter = 0 while total%10 == 0 and counter < len(score): total -= score[counter] counter += 1; print(total)
a.cc:1:1: error: 'n' does not name a type 1 | n = int(input()) | ^ a.cc:14:6: error: expected constructor, destructor, or type conversion before '(' token 14 | print(total) | ^
s818836500
p03699
C
#include <stdio.h> int main() { int sum = 0; int N; scanf("%d", &N); int h[N]; for (int i = 0; i < N; i++) { scanf("%d", &S[i]); } for (int i = 0; i < N; i++) { sum += S[i]; } while (sum % 10 == 0 && sum != 0) { int sub = 0; for (int i = 0; i < N;...
main.c: In function 'main': main.c:11:22: error: 'S' undeclared (first use in this function) 11 | scanf("%d", &S[i]); | ^ main.c:11:22: note: each undeclared identifier is reported only once for each function it appears in
s019000010
p03699
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,sum=0; cin>>N; vector<int> S(N); for(int i=0;i<N;i++){ cin>>S.at(i); sum+=S.at(i); } if(sum%10!=0) cout<<sum<<endl,; else{ bool flag=true; sort(S.begin(),S.end()); for(int i=0;i<N;i++){ sum-=S.at(i); if(su...
a.cc: In function 'int main()': a.cc:12:21: error: expected primary-expression before ';' token 12 | cout<<sum<<endl,; | ^
s641659888
p03699
C++
#include<bits/stdc++.h> using namespace std; using ll=long long; int main(){ int i,j,cnt; int n; cin>>n; int s[n]; for(i=0;i<n;i++)cin>>s[i]; sum=0; for(i=0;i<n;i++)sum+=s[i]; if(sum%10!=0){ cout<<sum; return 0; } int mi=INT_MAX; for(i=0;i<n;i++){ if(s[i]%10!=0){ mi=min(mi,s[i])...
a.cc: In function 'int main()': a.cc:11:3: error: 'sum' was not declared in this scope 11 | sum=0; | ^~~
s334385930
p03699
C++
#include <bits/stdc++.h> #include <iostream> #include <algorithm> #define rep(i,n) for (int i = 0;i < (n);++i) #define all(x) (x).begin(),(x).end() using namespace std; typedef long long ll; int main() { int N; cin >> N; vector<int> s(N); rep(i,N) cin>>s[i]; int ans = 0; rep(i,N) ans += s[i]; sor...
a.cc: In function 'int main()': a.cc:5:16: error: no matching function for call to 'sort(std::vector<int>&)' 5 | #define all(x) (x).begin(),(x).end() | ^ a.cc:17:9: note: in expansion of macro 'all' 17 | sort all(s); | ^~~ In file included from /usr/include/c++/14/algorithm:...
s366566555
p03699
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0;i < (n);++i) #define all(x) (x).begin(),(x).end() using namespace std; typedef long long ll; int main() { int N; cin >> N; vector<int> s(N); rep(i,N) cin>>s[i]; int ans = 0; rep(i,N) ans += s[i]; sort all(s); reverse all(s); int j = 0...
a.cc: In function 'int main()': a.cc:3:16: error: no matching function for call to 'sort(std::vector<int>&)' 3 | #define all(x) (x).begin(),(x).end() | ^ a.cc:15:9: note: in expansion of macro 'all' 15 | sort all(s); | ^~~ In file included from /usr/include/c++/14/algorithm:...
s831514917
p03699
C++
#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0), cout.tie(0) #define ll long long int #define ld long double #define fr first #define se second #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() #define sz(v) (int)v.size() #define sunq(v) so...
a.cc: In function 'int main()': a.cc:51:6: error: 'x' was not declared in this scope 51 | if(x%10 == 0)cout << 0 << endl; | ^
s569385364
p03699
C
#include<stdio.h> void sort(int n, int S[n]) { int i, j; int tmp; for(i = 0; i < n - 1; i ++){ for(j = n - 1; j > i; j--){ if(S[j - 1] > S[j]){ tmp = S[j - 1]; S[j - 1] = S[j]; S[j] = tmp; } } } } int main() { ...
main.c: In function 'main': main.c:46:20: error: expected expression before ')' token 46 | printf("%d\n", ); | ^
s952588384
p03699
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n,s,sm=0,mn=100; cin>>n; for (int i=0;i<n;i++) { cin>>s; sm+=s; if (m%10) mn=min(mn,s); } if (sm%10) cout<<sm<<endl; else if (mn!=100) cout<<sm-mn<<endl; ...
a.cc: In function 'int main()': a.cc:11:13: error: 'm' was not declared in this scope 11 | if (m%10) | ^
s188716931
p03699
C++
#include<cstdio> #include<algorithm> using namespace std; int dp[101][10001]; int main(void){ int n; int box[100]; int sum; int i,j; int MAX; scanf("%d",&n); sum=0; for(i=0;i<n;i++){ scanf("%d",&box[i]); sum+=box[i]; for(i=0;i<=n;i++){ for(j=0;j<=sum;j++){ dp[i][j]=0; } } for(i=0;i<n;i++){ for(j...
a.cc: In function 'int main()': a.cc:31:2: error: expected '}' at end of input 31 | } | ^ a.cc:5:15: note: to match this '{' 5 | int main(void){ | ^
s155188210
p03699
C++
hoge
a.cc:1:1: error: 'hoge' does not name a type 1 | hoge | ^~~~
s176307084
p03699
C++
=#include<iostream> #include<string> #include<cstdio> #include<cstring> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> #i...
a.cc:1:2: error: stray '#' in program 1 | =#include<iostream> | ^ a.cc:1:1: error: expected unqualified-id before '=' token 1 | =#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:...
s353342023
p03699
C++
#include<iostream> #include<string> #include<cstdio> #include<cstring> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> #in...
a.cc: In function 'void solve()': a.cc:65:29: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int') 65 | cout << sum - se[0] << endl; | ^
s496945653
p03699
C++
#include <vector> #include <algorithm> using namespace std; vector<int> v; int N; int main(){ int sum = 0; cin >> N; v.resize(N); for(int i=0;i<N;i++){ cin >> v[i]; sum += v[i]; } if(sum % 10 != 0){ cout << sum << endl; return sum; } sort(v.begin(),v.en...
a.cc: In function 'int main()': a.cc:11:5: error: 'cin' was not declared in this scope 11 | cin >> N; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <algorithm> +++ |+#include <iostream> 3 | a.cc:18:9:...
s185506504
p03699
C++
// Created by liszt on 2019/07/28. #include<bits/stdc++.h> using namespace std; int main(){ int n,sum=0,i; cin>>n; vector<int> s(n),maxim(n); for(i=0;i<n;i++){ cin>>s[i]; sum+=s[i]; } if(sum%10!=0){ cout<<sum<<endl; return 0; } for(i=0;i<...
a.cc: In function 'int main()': a.cc:21:29: error: 'a' was not declared in this scope 21 | maxim.push_back(sum-a[i]); | ^
s322418834
p03699
C++
import sys n = int(input()) s = [int(input()) for i in range(n)] s.sort() ans = sum(s) for i in s: if(ans%10==0): ans -= i else: print(ans) sys.exit() print(ans)
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s278296886
p03699
C
// うそ #include<stdio.h> #include<stdlib.h> int compare(const void* a, const void*b){ return *(int*)a - *(int*)b; } int main(void){ int n; scanf("%d", &n); int s[n]; int sum = 0; for(int i=0; i<n; i++){ scanf("%d", &s[i]); sum += s[i]; } qsort(score, n, sizeof(int), com...
main.c: In function 'main': main.c:19:11: error: 'score' undeclared (first use in this function) 19 | qsort(score, n, sizeof(int), compare); | ^~~~~ main.c:19:11: note: each undeclared identifier is reported only once for each function it appears in
s928928440
p03699
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int>sum(n); int sum1=0; for(int i=0; i<n; ++i){ int a=0; cin >> a; sum1 += a; sum.push_back(sum1); } for(int i=n-1; i>=0; i--){ if(sum[i]%10==0){ continue;} else if(sum[i]%10!==0) {cout << ...
a.cc: In function 'int main()': a.cc:18:24: error: expected primary-expression before '=' token 18 | else if(sum[i]%10!==0) | ^
s547881461
p03699
C++
#include <bits/stdc++.h> #define rep(i, N) for (int i = 0; i < N; i++) using namespace std; int main() { int N; cin >> N; vector<int> s(N); int sum = 0; rep(i, N) { cin >> s[i]; sum += s[i]; } if (sum % 10 != 0) { cout << sum << endl; return 0; } ...
a.cc: In function 'int main()': a.cc:22:5: error: 'else' without a previous 'if' 22 | else | ^~~~
s295233195
p03699
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,s[n],sum=0; cin>>n; for(int i=0;i<n;i++) cin>>s[i]; sum+=s[i]; if(sum%10==0){ int t=INT_MAX; for(int i=0;i<n;i++){ if(a[i]%10!=0)t=min(t,a[i]); } sum-=t; } cout<<max(0,sum)<<endl; }
a.cc: In function 'int main()': a.cc:6:42: error: 'i' was not declared in this scope 6 | for(int i=0;i<n;i++) cin>>s[i]; sum+=s[i]; | ^ a.cc:10:10: error: 'a' was not declared in this scope 10 | if(a[i]%10!=0)t=min(t,a[i]); | ^
s044144533
p03699
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int x = 0; vector<int> a(n); for(int i=0;i<n;i++){ cin >> a.at(i); x += a.at(i); } sort(a.begin(), a.end()); if(x%10 != 0){ cout << x << endl; } else { int j=0; while(a.at(j)%10 == 0 && i<n){ ...
a.cc: In function 'int main()': a.cc:21:30: error: 'i' was not declared in this scope 21 | while(a.at(j)%10 == 0 && i<n){ | ^
s160712751
p03699
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define print(s) cout << s << endl #define acc(v) accumulate(v.begin(), v.end(), 0) #define cinv(n,v) rep(i,n) cin >> v[i] using namespace std; const int INF = 1e9; typedef long l...
a.cc: In function 'int main()': a.cc:52:22: error: expected unqualified-id before 'int' 52 | int ans = 0, int m = MOD; | ^~~ a.cc:55:17: error: 's' was not declared in this scope 55 | s += a; | ^ a.cc:57:25: error: 'm' was not declared in th...
s137717120
p03699
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(void){ int N; cin >> N; vector<int>num(N,0); for(int i=0;i<N;i++){ cin >> num[i]; } sort(num.begun(),num.end()); int sum = 0; for(int i=0;i<N;i++){ sum += num[i]; } if(sum % 10 != 0) cout...
a.cc: In function 'int main()': a.cc:14:12: error: 'class std::vector<int>' has no member named 'begun'; did you mean 'begin'? 14 | sort(num.begun(),num.end()); | ^~~~~ | begin
s800771387
p03699
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long N,u,c,ans; cin>>N; ans=100000000000; c=0; vector<long long>s(N); for(int i=0;i<N;i++){ cin>>s[i]; c+=s[i]; } if(c%10!=0){ cout<<c<<endl; return 0; } else{ for(int i=0;i<N-1;i++){ if(s[i]%10==0){ c...
a.cc: In function 'int main()': a.cc:24:21: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<' 24 | cout<c-s[i]<<endl; | ~~~~~~^~~~~~
s092412824
p03699
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<iomanip> #include<math.h> #include<complex> #include<queue> #include<deque> #include<stack> #include<map> #include<set> #include<bitset> #include <string.h> using namespace std; #define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i ) #d...
a.cc:31:5: error: redefinition of 'int ans' 31 | int ans; | ^~~ a.cc:26:5: note: 'int ans' previously declared here 26 | int ans; | ^~~