submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s481631928
p04012
C++
#include<iostream> #include<map> #include<string> using namespace std; int main(){ map<char,int> mp; string s; cin>>s; for(int i=0;i<s.size;i++){ mp[s.substr(i,1)]++; } int total=0; for(auto itr = mp.begin(); itr != mp.end(); ++itr) { total+=itr->second; } if(total%2==0)cout<<"Yes"<<endl; ...
a.cc: In function 'int main()': a.cc:9:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsign...
s845365506
p04012
C++
#inclue<bits/stdc++.h> using namespace std; int main() { string w; bool check; int cnt[26] = { }; cin >> w; for (auto x : w) { cnt[x % 26]++; } for (int i = 0; i < 26; i++) { if (cnt[i] % 2) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include? 1 | #inclue<bits/stdc++.h> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:5:9: error: 'string' was not declared in this scope 5 | string w; | ^~~~~~ a.cc:1:1: note: 'std::string' is defi...
s621158464
p04012
C++
<?php $input = file_get_contents('php://stdin'); $counts = count_chars($input, 1); echo count(array_unique($counts)) === 1 ? 'Yes' : 'No';
a.cc:3:28: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes 3 | $input = file_get_contents('php://stdin'); | ^~~~~~~~~~~~~ a.cc:5:43: warning: multi-character character constant [-Wmultichar] 5 | echo count(array_unique($counts)) === 1 ? 'Yes' : ...
s729760530
p04012
C++
#include <iostream> #include <string.h> int a[30]; string s; int main(){ cin >> s; for(int i=0;i<s.size();i++) a[s[i]-'a']++; for(int i=0;i<30;i++) if(a[i]%2){cout << "No" << endl; return 0;} cout << "Yes" << endl; return 0; }
a.cc:4:1: error: 'string' does not name a type; did you mean 'stdin'? 4 | string s; | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> s; | ^~~ | std::cin In file included fro...
s799287815
p04012
C++
#include <iostream> int a[30]; string s; int main(){ cin >> s; for(int i=0;i<s.size();i++) a[s[i]-'a']++; for(int i=0;i<30;i++) if(a[i]%2){cout << "No" << endl; return 0;} cout << "Yes" << endl; return 0; }
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'? 3 | string s; | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> s; | ^~~ | std::cin In file included fro...
s177616169
p04012
C++
#include <bits/stdc++.h> #include <algorithm> #include <stdio.h> #include <math.h> using namespace std; #define INF 1.1e9 #define LINF 1.1e18 #define FOR(i,a,b) for (int i = (a); i < (b); ++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(), (v).end() #define pb push_back #define pf push_front #define fi first ...
a.cc: In function 'int main()': a.cc:46:29: error: 's' was not declared in this scope 46 | REP(i,w.size()) cnt[s[i]-'a']++; | ^
s157863588
p04012
C++
#include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> P; int main(){ string s; cin >> s; int count[26]; fill(count,count+26,0); for(int i=0;i<s.length();i++) count[s[i]%26]++; for(int i=0;i<al.length();i++){ if(count[i]%2){ puts("No"); ...
a.cc: In function 'int main()': a.cc:12:19: error: 'al' was not declared in this scope 12 | for(int i=0;i<al.length();i++){ | ^~
s817306137
p04012
C++
#include<iostream> using namespace std; int main() { int n,m; double deg; cin >> n >> m; if(n>=12){ n-=12; } n*=360/12;//30 n+=m/30 m*=360/60;//6 deg=n-m; if(deg<0){ deg*=-1; } cout<<deg; return 0; }
a.cc: In function 'int main()': a.cc:14:12: error: expected ';' before 'm' 14 | n+=m/30 | ^ | ; 15 | m*=360/60;//6 | ~
s424773727
p04012
C++
#include<iostream> #include<algorithm> #include<cmath> #include<string> #include<array> #include<vector> #include<functional> #include<unordered_map> #include<map> #include<numeric> #include<limits> #include<utility> #include<queue> #include<random> #include<math.h> #include "Source.h" using namespace std; int main() ...
a.cc:16:10: fatal error: Source.h: No such file or directory 16 | #include "Source.h" | ^~~~~~~~~~ compilation terminated.
s557510573
p04012
C++
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<cmath> using namespace std; int main(){ string w; cin >> w; int len = w.length(); sort(w, w+len); for(int i = 0;i < len-1;i+=2){ if(w[i] != w[i+1]) { cout << "No" << endl; ...
a.cc: In function 'int main()': a.cc:14:14: error: no match for 'operator+' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 14 | sort(w, w+len); | ~^~~~ | | | | | int | std::string {aka std::__cxx11::basi...
s188679578
p04012
C++
#include<stdio.h> #include<string.h> int main() { char s[100]; int a; gets(s); a = strlen(s); if(a%2 == 0) printf("Yes"); else printf("No"); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets(s); | ^~~~ | getw
s500168420
p04012
C++
#include<stdio.h> int main() { char s[100]; int a; gets(s); a = strlen(s); if(a%2 == 0) printf("Yes"); else printf("No"); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 6 | gets(s); | ^~~~ | getw a.cc:7:9: error: 'strlen' was not declared in this scope 7 | a = strlen(s); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<c...
s061073449
p04012
C++
#include<bits/stdc++.h> using namespace std; int ara[100000]; char ara1[100000]; int main() { int i,j,k,a,b,h,ln,v=0; char ch; gets(ara1); ln=strlen(ara1); for(i=0;i<ln;i++) { for(ch='a',j=1;ch<='z';ch++,j++) { if(ara1[i]==ch) { ara[j]++; ...
a.cc: In function 'int main()': a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets(ara1); | ^~~~ | getw
s825187324
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = s.next(); char[] ar = a.toCharArray(); loop: for (int i = 0;i < ar.length;i++) { int y = 0; for (int m = 0;m < ar.length;m++) { if(ar[i] == ar[m]) { y += 1; } i...
Main.java:17: error: unreachable statement break loop; ^ 1 error
s823060730
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = s.nextLine(); char[] ar = a.toCharArray(); loop: for (int i = 0;i < ar.length;i++) { int y = 0; for (int m = 0;m < ar.length;m++) { if(ar[n] == ar[m]) { y += 1; } ...
Main.java:10: error: cannot find symbol if(ar[n] == ar[m]) { ^ symbol: variable n location: class Main 1 error
s466821665
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = s.nextLine(); char[] ar = a.toCharArray(); loop: for (int i = 0;i < ar.length;i++) { int y = 0; for (int m = 0;m < ar.length;m++) { if(ar[n].equals(ar[m])) { y += 1; ...
Main.java:10: error: cannot find symbol if(ar[n].equals(ar[m])) { ^ symbol: variable n location: class Main Main.java:10: error: char cannot be dereferenced if(ar[n].equals(ar[m])) { ^ Main.java:13: error: int cannot be dereferenced if(m.equals(ar[ar.length])) { ^ 3 error...
s616031965
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = s.nextLine(); char[] ar = a.toCharArray(); loop: for (int i = 0;i < ar.length();i++) { int y = 0; for (int m = 0;m < ar.length();m++) { if(ar[n].equals(ar[m])) { y += 1...
Main.java:7: error: cannot find symbol loop: for (int i = 0;i < ar.length();i++) { ^ symbol: method length() location: variable ar of type char[] Main.java:9: error: cannot find symbol for (int m = 0;m < ar.length();m++) { ^ symbol: method length() l...
s246897117
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = s.nextLine(); String[] ar = a.split(""); loop: for (int i = 0;i < ar.length();i++) { int y = 0; for (int m = 0;m < ar.length();m++) { if(ar[n].equals(ar[m])) { y += 1; ...
Main.java:7: error: cannot find symbol loop: for (int i = 0;i < ar.length();i++) { ^ symbol: method length() location: variable ar of type String[] Main.java:9: error: cannot find symbol for (int m = 0;m < ar.length();m++) { ^ symbol: method length() ...
s274588219
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = s.nextLine(); String[] ar = a.split(""); loop: for (int i = 0;i < ar.length();i++) { int y = 0; for (int m = 0;m < ar.length();m++) { if(ar[n].equals(ar[m])) { y += 1; ...
Main.java:7: error: cannot find symbol loop: for (int i = 0;i < ar.length();i++) { ^ symbol: method length() location: variable ar of type String[] Main.java:9: error: cannot find symbol for (int m = 0;m < ar.length();m++) { ^ symbol: method length() ...
s240882781
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = s.nextLine(); String[] ar = a.split(""); loop: for(int i = 0;i < ar.length();i++) { int y = 0; for(int m = 0;m < ar.length();m++) { if(ar[n].equals(ar[m])) { y += 1; ...
Main.java:7: error: cannot find symbol loop: for(int i = 0;i < ar.length();i++) { ^ symbol: method length() location: variable ar of type String[] Main.java:9: error: cannot find symbol for(int m = 0;m < ar.length();m++) { ^ symbol: method length() loc...
s172871108
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = s.nextLine(); String[] ar = str.split(""); loop: for(int i = 0;i < ar.length();i++) { int y = 0; for(int m = 0;m < ar.length();m++) { if(ar[n].equals(ar[m])) { y += 1; ...
Main.java:6: error: cannot find symbol String[] ar = str.split(""); ^ symbol: variable str location: class Main Main.java:7: error: cannot find symbol loop: for(int i = 0;i < ar.length();i++) { ^ symbol: method length() location: variable ar of type String[] M...
s299592894
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = Scanner.nextLine(); String[] ar = str.split(""); loop: for(int i = 0;i < ar.length();i++) { int y = 0; for(int m = 0;m < ar.length();m++) { if(ar[n].equals(ar[m])) { y ...
Main.java:5: error: non-static method nextLine() cannot be referenced from a static context String a = Scanner.nextLine(); ^ Main.java:6: error: cannot find symbol String[] ar = str.split(""); ^ symbol: variable str location: class Main Main.java:7: error: cannot find symbo...
s171776309
p04012
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String a = Scanner.nextLine(); String[] ar = str.split(""); loop for(int i = 0;i < ar.length();i++) { int y = 0; for(int m = 0;m < ar.length();m++) { if(ar[n].equals(ar[m])) { y +...
Main.java:7: error: not a statement loop for(int i = 0;i < ar.length();i++) { ^ Main.java:7: error: ';' expected loop for(int i = 0;i < ar.length();i++) { ^ 2 errors
s501584679
p04012
C++
string abc = "abcdefghijklmnopqrstuvwxyz"; vector<int> cc(abc.length(),0); string s; cin >> s; REP(i,s.length()){ REP(j,abc.length()){ if(s[i] == abc[j]){ cc[j]++; break; } } } bool clear = true; REP(i,abc.length()){ if(cc[i] % 2 != 0){ clear = false; break; } } if(clear = false) cout << "No" << endl; else c...
a.cc:2:1: error: 'string' does not name a type 2 | string abc = "abcdefghijklmnopqrstuvwxyz"; | ^~~~~~ a.cc:3:1: error: 'vector' does not name a type 3 | vector<int> cc(abc.length(),0); | ^~~~~~ a.cc:4:1: error: 'string' does not name a type 4 | string s; | ^~~~~~ a.cc:5:1: error: 'cin' do...
s868066900
p04012
Java
package atcoder; import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import java.io.Bu...
Main.java:16: error: class Main001 is public, should be declared in a file named Main001.java public class Main001 { ^ 1 error
s355244043
p04012
Java
package atcoder; import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import java.io.Bu...
Main.java:16: error: class Main001 is public, should be declared in a file named Main001.java public class Main001 { ^ 1 error
s171668958
p04012
C++
// clang-format off #include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (n); i++) using namespace std; // clang-format on int main() { int key; string s; cin >> s; int w = s.size(); sort(s, s + w); for (int i = 1; i < s.size(); i++) { key = 0; if (s[i] != s[i - 1]) { i...
a.cc: In function 'int main()': a.cc:12:13: error: no match for 'operator+' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 12 | sort(s, s + w); | ~ ^ ~ | | | | | int | std::string {aka std::__cxx11::basic_stri...
s972928567
p04012
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(0); string str; cin >> str; int arr[26]; memset(arr,0,sizeof(arr)); for(int i=0;i<str.length();i++) { arr[str[i]-97]++; } int p=0; for(int...
a.cc: In function 'int main()': a.cc:13:3: error: 'memset' was not declared in this scope 13 | memset(arr,0,sizeof(arr)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |+#include <cstring> 5...
s937962334
p04012
C++
#include <iostream> #include <math.h> #include <unordered_map> using std::cin; using std::cout; using std::endl; using std::string; using std::sort; int main() { string w; string ans = "Yes"; cin >> w; sort(w.begin(), w.end()); char prev = w[0]; for(int i = 1; i < w.length(); i++) { // odd if...
a.cc:9:12: error: 'sort' has not been declared in 'std' 9 | using std::sort; | ^~~~ a.cc: In function 'int main()': a.cc:17:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 17 | sort(w.begin(), w.end()); | ^~~~ | sqrt
s106254248
p04012
Java
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); String w = sc.next(); for (int i = 0 ; i < w.length() ; i++) { for (int j = 0 ; j < w.length() ; j++) { if (w.charAt(i) == w.charAt(j)) { count++; } } if (count % 2 ...
Main.java:10: error: cannot find symbol count++; ^ symbol: variable count location: class Main Main.java:13: error: cannot find symbol if (count % 2 != 0) { ^ symbol: variable count location: class Main 2 errors
s068084018
p04012
Java
import java.util.*; public class B_44{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String w = sc.next(); char c = w.charAt(0); int cc = 0; for(int i = 0 ; i < w.length() ; i++){ if(c == w.charAt(i)){ cc++; } String a = c + ""; if(i == w.length() - 1){ w =...
Main.java:3: error: class B_44 is public, should be declared in a file named B_44.java public class B_44{ ^ 1 error
s751833872
p04012
C++
#include <cstdio> #include <iostream> #include <cstdlib> #include <algorithm> #include <vector> #include <cstring> #include <queue> #include <stack> #include <functional> #include <set> #include <map> #include <deque> #define WMAX 10000 #define HMAX 10000 //コメントアウトするとdebug()を実行しない #define DEBUG using namespace std; t...
a.cc:32:1: error: 'vectore' does not name a type 32 | vectore<int > beau; | ^~~~~~~ a.cc: In function 'int main()': a.cc:50:25: error: 'beau' was not declared in this scope 50 | if(find(beau.begin(), beau.end(),S[i]) != beau.end()){ | ^~~~ a.cc:56:12: error: 'ba...
s189608024
p04012
C++
http://abc044.contest.atcoder.j#include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <functional> #include <utility> #include <tuple...
a.cc:1:1: error: 'http' does not name a type 1 | http://abc044.contest.atcoder.j#include <iostream> | ^~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/iomanip:41, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does...
s261613343
p04012
C++
#include <bits/stdc++.h> #include<iostream> #include<cstdio> #include<vector> #include<queue> #include<map> #include<cstring> #include<string> #include <math.h> #include<algorithm> // #incl...
a.cc: In function 'int main()': a.cc:13:28: error: 'long long' specified with 'bool' 13 | #define int long long | ^~~~ a.cc:88:9: note: in expansion of macro 'int' 88 | int bool b=true; | ^~~
s337834291
p04012
C++
#include<stdio.h> #include<iostream> using namespace std; int main() { int i = 0, t = 0, j = 0; char a[100], b[27] = { 0 }; scanf_s("%s", a,sizeof(a)/sizeof(a[0])); //cout << "h" << endl; for (j = 0; j < 26; j++) { for (i = 0; i < 100; i++) { //cout << i << " " << a[j] << endl; if (j == a[i] - 'a') b...
a.cc: In function 'int main()': a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 8 | scanf_s("%s", a,sizeof(a)/sizeof(a[0])); | ^~~~~~~ | scanf
s478612321
p04012
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; map<char, int> mp; for (char c : s) { mp[c]++; } cout << all_of(mp.begin(), mp.end(), [](pair<char, int> p){ return p.second % 2 == 0; }) ? "Yes" : "No" << endl; }
a.cc: In function 'int main()': a.cc:9:109: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 9 | cout << all_of(mp.begin(), mp.end(), [](pair<char, int> p){ return p.second % 2 == 0; }) ? "Yes" : "No" << endl; | ...
s509150352
p04012
C++
#include<bits/stdc++.h> using namespace std; int main(){ int c[26]={}; bool f=true; string w;cin>>w; int i; for(i=0;i<w.size();i++) c[s[i]-'a']++; for(i=0;i<26;i++) f&=(c[i]%2==0); cout << (f?"Yes":"No") << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:29: error: 's' was not declared in this scope 8 | for(i=0;i<w.size();i++) c[s[i]-'a']++; | ^
s462183739
p04012
C++
#include<bits/stdc++.h> using namespace std; int main(){ int c[26]={}; bool f=true; string w;cin>>w; int i; for(i=0;i<w.size();i++) c[s[i]-'a']++; for(i=0;i<26;i++) f&=(c[i]%2==0); cout << (f:"Yes":"No") << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:29: error: 's' was not declared in this scope 8 | for(i=0;i<w.size();i++) c[s[i]-'a']++; | ^ a.cc:10:13: error: expected ')' before ':' token 10 | cout << (f:"Yes":"No") << endl; | ~ ^ | )
s482582034
p04012
Java
import java.util.*; class Main{ public static void main(String[] args){ int[] alpha = int[26]; Scanner sc = new Scanner(System.in); String bun = sc.next(); char[] block = bun.toCharArray(); for(int i = 0;i<bun.length();i++){ alpha[(int)block[i]-61] +=1; } int even = 0; for(int i = 0;i<26;i++){...
Main.java:5: error: ']' expected int[] alpha = int[26]; ^ 1 error
s579745430
p04012
Java
import java.util.*; class Main{ public static void main(String[] args){ int alpha[] = int[26]; Scanner sc = new Scanner(System.in); String bun = sc.next(); char[] block = bun.toCharArray(); for(int i = 0;i<bun.length();i++){ alpha[(int)block[i]-61] +=1; } int even = 0; for(int i = 0;i<26;i++){...
Main.java:5: error: ']' expected int alpha[] = int[26]; ^ 1 error
s931564120
p04012
Java
import java.util.*; class Main{ public static void main(String[] args){ int alpha[] = int[26]; Scanner sc = new Scanner(System.in); String bun = sc.next(); char[] block = bun.toCharArray(); for(int i = 0;i<bun.length();i++){ alpha[(int)block[i]-61] +=1; } int even = 0; for(int i = 0;i<26;i++){...
Main.java:5: error: ']' expected int alpha[] = int[26]; ^ Main.java:21: error: ';' expected if(even == 0){System.out.println("Yes")}else{System.out.println("No")} ^ Main.java:21: error: ';' expected if(even == 0){System.out.println("Yes")}else{System.out.pri...
s030691632
p04012
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string w; w.reserve(100); cin >> w; sort(w.begin(), w.end()); char ch{w.at(0}; int32_t count{ 0 }; for (auto i{ 1 }; i < w.size(); ++i) { if (ch != w[i]) { if (count & 1 == 1) break; count = 0; ch =...
a.cc: In function 'int main()': a.cc:16:23: error: expected ')' before '}' token 16 | char ch{w.at(0}; | ~ ^ | )
s152880758
p04012
C
#include <stdio.h> int main(){ char s[100]; scanf("%s",s); int length; length=(int)strlen(s); int i,j; int count[length]=1; for(i=0;i<length;i++){ for(j=1;j<length;j++){ if(s[i]==s[j]) count[i]=count[i]+1; } } int g; int h=length; for(g=0;g<length;g++){ if(count[length]%2==0){ h++; if(h==length)printf("YES\n"); }...
main.c: In function 'main': main.c:7:13: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 7 | length=(int)strlen(s); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen' 1 | #include <stdio.h> +++ |+#include <string.h> 2 |...
s675702611
p04012
C
#include <stdio.h> int main(){ char s[100]; scanf("%s",s); int length; length=(int)strlen(s); int i,j; int count[length]=1; for(i=0;i<length;i++){ for(j=1;j<length;j++){ if(s[i]==s[j]) count[i]=count[i]+1; } } int g; if(for(g=0;g<length;g++){count[length]%2==0}){printf("YES\n");} else{printf("NO\n");} return 0; }
main.c: In function 'main': main.c:7:13: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 7 | length=(int)strlen(s); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen' 1 | #include <stdio.h> +++ |+#include <string.h> 2 |...
s979872415
p04012
C
#include <stdio.h> int main(){ char s[100]; scanf("%s",s); int length; length=(char)strlen(s); int i,j; int count[length]=1; for(i=0;i<length;i++){ for(j=1;j<length;j++){ if(s[i]==s[j]) count[i]=count[i]+1; } } int g; if(for(g=0;g<length;g++){count[length]%2==0}){printf("YES\n");} else{printf("NO\n");} return 0; ...
main.c: In function 'main': main.c:7:14: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 7 | length=(char)strlen(s); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen' 1 | #include <stdio.h> +++ |+#include <string.h> 2...
s634820532
p04012
C++
#include <stdio.h> #include <string.h> #include <algorithm> using namespace std; char t[110]; int end, cnt=1, flag=1; int main() { scanf("%s", t); end = strlen(t); sort(t, t+end); for(int i=end-1; i>=1; i--) { if(t[i]==t[i-1]) cnt++; else { if(cnt%2) break; cnt = 1; } } if(cnt%2) printf("No\...
a.cc: In function 'int main()': a.cc:13:9: error: reference to 'end' is ambiguous 13 | end = strlen(t); | ^~~ In file included from /usr/include/c++/14/bits/algorithmfwd.h:39, from /usr/include/c++/14/bits/stl_algo.h:59, from /usr/include/c++/14/algorithm:61, ...
s033813013
p04012
C++
#include<iostream> #include<cmath> #include<ctype.h> #include<vector> #include<cstdlib> #include<cstdlib> #include<string> #include<algorithm> #include<stack> #include<queue> #include<map> #include<set> #include<time.h> #define ll long long #define LL long long #define ULL unsigned long long #define ull unsigned long...
a.cc: In function 'int main()': a.cc:33:29: error: 'strlen' was not declared in this scope 33 | for (int i = 0; i < strlen(w); i++){ | ^~~~~~ a.cc:13:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<...
s861426182
p04012
C++
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.nextLine(); //System.out.println(s); char[] c_array = new char[256]; for (int i = 0;i < s.length();i++) { //System.out.println(s.charAt(i)); c_array[(in...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: ...
s740509468
p04012
C++
#include<stdio.h> #include<iostream> #include<fstream> #include<string.h> using namespace std; int solve(int l,char w[]){ if (l == 0)return 0; while (1){ int s=-1; for (int i = 0; i < l; i++){ if (w[i]>1){ char c = w[i]; int n = 0; for (int j = i; j < l; j++){ if (w[j] == c){ n++; ...
a.cc: In function 'int main()': a.cc:45:24: error: expected ';' before 'printf' 45 | else (res == 1)printf("No\n"); | ^~~~~~ | ;
s340110172
p04012
C++
#include <bits/stdc++.h> using namespace std; int main() { char s[101]; while(gets(s)) { int len = strlen(s); map<char, int> charMap; for(int i=0; i<len; i++) charMap[s[i]]++; bool beautiful = true; for(int i=97; i<=122; i++) { if(charMap[(ch...
a.cc: In function 'int main()': a.cc:8:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | while(gets(s)) | ^~~~ | getw
s855235134
p04012
C++
#include <iostream> #include <iomanip> #include <vector> #include <map> #include <set> #include <queue> #include <bitset> #include <stack> #include <utility> #include <numeric> #include <algorithm> #include <functional> #include <complex> #include <string> #include <sstream> #include <fstream> #include <cstdio> #inclu...
a.cc: In function 'int main()': a.cc:29:4: error: expected initializer before 'for' 29 | for(int i=0;i<26;i++){ | ^~~ a.cc:29:24: error: expected ';' before ')' token 29 | for(int i=0;i<26;i++){ | ^ | ; a.cc:38:4: error: 'c' was not declared...
s376843978
p04012
C
#include <stdio.h> int main(void) { char w[101],q['z'-'a']; scanf("%s",w); int i; for (i=0;w[i] != '\0';i++) { q[w[i]-'a']++; } for (i=0;i<('z'-'a');i++) { if (q[i]%2) { puts("No"); return 0; } } puts("Yes"); retun 0; }
main.c: In function 'main': main.c:17:17: error: 'retun' undeclared (first use in this function) 17 | retun 0; | ^~~~~ main.c:17:17: note: each undeclared identifier is reported only once for each function it appears in main.c:17:22: error: expected ';' before numeric constant ...
s552904151
p04012
Java
import java.util.Scanner; class Main { public static void main(String... args) { Scanner sc = new Scanner(System.in); String n = sc.next(); if(n.length() % 2 == 1){ System.out.println("no"); System.exit(0); }else{ boolean b = true; String s = "abcdefghijklmnopqrstuvwxyz"; ...
Main.java:16: error: variable s is already defined in method main(String...) String s = n.charAt(j); ^ Main.java:16: error: incompatible types: char cannot be converted to String String s = n.charAt(j); ^ 2 errors
s076960751
p04012
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string a; cin >> a; int b; b=a.size(); char w[b]; for(int q=0;q<b;q++){ w[q]=a[q]; } sort(w,w+b); int c,i; c=b/2; int OK; OK=0; for(i=0;i<b;i=i+2){ if(w[i]==w[i+1]) OK++; } if(OK==c) cout << "Yes" <...
a.cc: In function 'int main()': a.cc:28:40: error: expected '}' at end of input 28 | if(OK!=c) cout << "No" << endl; | ^ a.cc:6:12: note: to match this '{' 6 | int main() { | ^
s656898502
p04012
C++
#include<iostream> #include< using namespace std; int main(){ string s; cin>>s; int char[26]={0}; for(int i=0;s[i]!='/0';i++){ if(char[s[i]-97]==0) char[s[i]-97]=1; else char[s[i]-97]=0; } for(int i=0;i<n;i++){ if (char[i]=='1'){cout<<"No";return 0;} } cout<<"Yes"; }
a.cc:2:10: error: missing terminating > character 2 | #include< | ^ a.cc:2:9: error: empty filename in #include 2 | #include< | ^ a.cc:9:19: warning: multi-character character constant [-Wmultichar] 9 | for(int i=0;s[i]!='/0';i++){ | ^~~~ a.cc: In functio...
s740836510
p04012
C++
#include<iostream> #include< using namespace std; int main(){ string s; cin>>s; int char[26]={0}; for(int i=0;s[i]!='/0';i++){ if(char[s[i]-97]==0) char[s[i]-97]=1; else char[s[i]-97]=0; } for(int i=0;i<n;i++){ if (char[i]='1'){cout<<"No";return 0;} } cout<<"Yes"; }
a.cc:2:10: error: missing terminating > character 2 | #include< | ^ a.cc:2:9: error: empty filename in #include 2 | #include< | ^ a.cc:9:19: warning: multi-character character constant [-Wmultichar] 9 | for(int i=0;s[i]!='/0';i++){ | ^~~~ a.cc: In functio...
s551380554
p04012
C++
#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <cstdlib> #include <ctime> #include <cstdio> #include <functional> #include <set> #include <sstream> #include <cctype> #include <stack> #include <queue> #include <cstring> #include <map> #include <list> #in...
a.cc: In function 'int main()': a.cc:29:23: error: 'n' was not declared in this scope 29 | for(int i=0;i<n;i++){ | ^
s520217850
p04013
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int #define INF 1000000007 int main(){ ll n, A; cin >> n >> A; vector < ll > cards ( n + 1 ); for ( ll i = 1; i <= n; i++ ) cin >> cards[i]; int dp [ 50 ][ 2500 ]; dp [ 0 ][ 0 ...
a.cc: In function 'int main()': a.cc:21:29: error: expected primary-expression before '=' token 21 | for( int i = 1; i < =n; i++ ) | ^
s950742381
p04013
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int #define INF 1000000007 int main(){ ll n, A; cin >> n >> A; vector < ll > cards ( n + 1 ); for ( ll i = 1; i <= n; i++ ) cin >> cards[i]; int dp [ n + 1 ][ (n + 1) * A ]; dp...
a.cc: In function 'int main()': a.cc:21:29: error: expected primary-expression before '=' token 21 | for( int i = 1; i < =n; i++ ) | ^ a.cc: At global scope: a.cc:34:5: error: redefinition of 'int main()' 34 | int main(){ | ^~~~ a.cc:8:9: note: 'int main()' prev...
s523877823
p04013
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int #define INF 1000000007 int main(){ ll n, A; cin >> n >> A; vector < ll > cards ( n + 1 ); for ( ll i = 1; i <= n; i++ ) cin >> cards[i]; int dp [ n + 1 ][ (n + 1) * A ]; dp [ 0 ][ 0 ] = 0; for( int k = 1; k < n + 1; k++ ) for...
a.cc: In function 'int main()': a.cc:21:29: error: expected primary-expression before '=' token 21 | for( int i = 1; i < =n; i++ ) | ^
s086377364
p04013
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.Arrays; import java.util.StringTokenizer; public class Main { private static final FastIn in = new FastIn(); private static final PrintWriter out = new PrintWriter(System.out); ...
Main.java:20: error: 'var' is not allowed in a compound declaration var n = in.nextInt(), a = in.nextInt(); ^ 1 error
s085129243
p04013
C++
#include<bits/stdc++.h> using namespace std; const int nax = 55; int main() { using ll = long long; int n, a; cin >> n >> a; vector<int> x(n); for(int& i: x) cin >> i; vector<vector<ll>> dp(nax, vector<ll>(nax*nax)); dp[0][0] = 1; for(int i = 1; i <= n; i++) { for(int j = i; j >= 0; j--) { for(int k =...
a.cc: In function 'int main()': a.cc:29:17: error: 'deb' was not declared in this scope 29 | deb(i, a, i*a, dp[i][i*a]); | ^~~
s742762027
p04013
Java
//package cf; import java.awt.event.MouseAdapter; import java.io.*; import java.util.*; public class C_tak_card { static int p=1000000007; public static void main(String[] args) throws Exception{ BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor....
Main.java:6: error: class C_tak_card is public, should be declared in a file named C_tak_card.java public class C_tak_card { ^ 1 error
s589625988
p04013
C++
#include<bits/stdc++.h> #define ll long long using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n,a; cin>>n>>a; int b[n]; for(int i=0;i<n;i++) { cin>>a[i]; } int dp[5000][5000]={0}; dp[0][0]=1; for(int i=1;i<=n;i++) { for(int...
a.cc: In function 'int main()': a.cc:13:15: error: invalid types 'int[int]' for array subscript 13 | cin>>a[i]; | ^
s253435263
p04013
C++
d
a.cc:1:1: error: 'd' does not name a type 1 | d | ^
s848673283
p04013
C++
#include<iostream> using namespace std; long long dp[51][2560] = {0}; int main(){ int N, A; cin >> N >> A; dp[0][0] = 1 for (int i = 1; i <= N; i ++){ int x; cin >> x; for (int j = i - 1; j >= 0; j --){ for (int k = 0; k <= 2501; k ++){ dp[j + 1][k + x] += dp[j][k]; } }...
a.cc: In function 'int main()': a.cc:10:15: error: expected ';' before 'for' 10 | dp[0][0] = 1 | ^ | ; 11 | for (int i = 1; i <= N; i ++){ | ~~~ a.cc:11:19: error: 'i' was not declared in this scope 11 | for (int i = 1; i <= N; i ++){ | ...
s449079580
p04013
C++
#include<iostream> using namespace std; long long dp[51][2560] = {0} int main(){ int N, A; cin >> N >> A; dp[0][0] = 1 for (int i = 1; i <= N; i ++){ int x; cin >> x; for (int j = i - 1; j >= 0; j --){ for (int k = 0; k <= 2501; k ++){ dp[j + 1][k + x] += dp[j][k]; } } ...
a.cc:6:1: error: expected ',' or ';' before 'int' 6 | int main(){ | ^~~
s791207696
p04013
C++
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<map> using namespace std; typedef long long ll; typedef short int sh; const ll inf=0x3f3f3f3f; const int MAX=1<<6; const int mod=1e9+7; ll dp[MAX][MAX]; int num[MAX],n,a...
a.cc:66:10: error: redefinition of 'const ll inf' 66 | const ll inf=0x3f3f3f3f; | ^~~ a.cc:15:10: note: 'const ll inf' previously defined here 15 | const ll inf=0x3f3f3f3f; | ^~~ a.cc:67:11: error: redefinition of 'const int MAX' 67 | const int MAX=1<<6; | ^~~ a.cc...
s243900631
p04013
C
#include<iostream> using namespace std; void sort(int x[], int N){ for(int i=0; i<N-1; i++){ for(int j=i+1; j<N; j++){ if(x[j] < x[i]){ int temp = x[i]; x[i] = x[j]; x[j] = temp; } } } } long long ways[51][51][2501] = {0};...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s982410995
p04013
C++
using namespace std; using ll = long long; int N, A; int x[111]; ll dp[111][111][5555]; int main() { cin >> N >> A; for (int i = 0; i < N; i++) cin >> x[i]; dp[0][0][0] = 1; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { for (int k = 0; k <= 5000; k++) { // 選ばない ...
a.cc: In function 'int main()': a.cc:10:4: error: 'cin' was not declared in this scope 10 | cin >> N >> A; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:31:4: error...
s671736355
p04013
C++
using namespace std; using ll = long long; int N, A; int x[111]; ll dp[111][111][5555]; int main() { cin >> N >> A; for (int i = 0; i < N; i++) cin >> x[i]; dp[0][0][0] = 1; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { for (int k = 0; k <= 5000; k++) { // 選ばない ...
a.cc: In function 'int main()': a.cc:10:4: error: 'cin' was not declared in this scope 10 | cin >> N >> A; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:31:4: error...
s299271289
p04013
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; const long long INF=1e9+5; const string alp="abcdefghijklmnopqrstuvwxyg"; //26 const string ALP="ABCDEFGHIJKLMNOPQRSTUVWXYG"; typedef long long ll; int main() { ...
a.cc: In function 'int main()': a.cc:17:13: error: the value of 'N' is not usable in a constant expression 17 | bitset<N> s(tmp); | ^ a.cc:11:7: note: 'int N' is not const 11 | int N,A; | ^ a.cc:17:13: note: in template argument for type 'long unsigned int' 17 | bitset<N...
s435637441
p04013
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; const long long INF=1e9+5; const string alp="abcdefghijklmnopqrstuvwxyg"; //26 const string ALP="ABCDEFGHIJKLMNOPQRSTUVWXYG"; typedef long long ll; int main() { ...
a.cc: In function 'int main()': a.cc:17:13: error: the value of 'N' is not usable in a constant expression 17 | bitset<N> s(tmp); | ^ a.cc:11:6: note: 'll N' is not const 11 | ll N,A; | ^ a.cc:17:13: note: in template argument for type 'long unsigned int' 17 | bitset<N> s...
s455849542
p04013
C++
#include<iostream> #include<vector> using namespace std; int main(){ long long dp[55][3000][55]; int n,a; cin>>n>>a; vector<int> x(n); for(int i=0;i<n;i++) cin>>x[i]; memset(dp,0,sizeof(dp)); dp[0][0][0]=1; for(int i=0;i<n;i++){ for(int s=0;s<=n*a;s++){ for(int k=0;k<=n;k++){ if(d...
a.cc: In function 'int main()': a.cc:11:3: error: 'memset' was not declared in this scope 11 | memset(dp,0,sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<vector> +++ |+#include <cstring> 3 | usi...
s703362662
p04013
C++
#include<iostream> using namespace std; int main(){ long long dp[55][3000][55]; int n,a; cin>>n>>a; vector<int> x(n); for(int i=0;i<n;i++) cin>>x[i]; memset(dp,0,sizeof(dp)); dp[0][0][0]=1; for(int i=0;i<n;i++){ for(int s=0;s<=n*a;s++){ for(int k=0;k<=n;k++){ if(dp[i][s][k]==0) co...
a.cc: In function 'int main()': a.cc:7:3: error: 'vector' was not declared in this scope 7 | vector<int> x(n); | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include<iostream> +++ |+#include <vector> 2 | using n...
s021946329
p04013
C++
#include <iostream> #include <vector> #include <string> using namespace std; int counts = 0; int sum_l(vector<int> li, int size) { int sum = 0; for (int i = 0; i< size; i++) { sum +=li[i]; } return sum; } void agg(vector<int> car, int avg,int size ){ if(size>=2) { if ( sum(car...
a.cc: In function 'void agg(std::vector<int>, int, int)': a.cc:19:14: error: 'sum' was not declared in this scope 19 | if ( sum(car, size)/size== avg){ | ^~~
s545165569
p04013
C++
using namespace std; int counts = 0; int sum(vector<int> li, int size) { int sum = 0; for (int i = 0; i< size; i++) { sum +=li[i]; } return sum; } void agg(vector<int> car, int avg,int size ){ if(size>=2) { if ( sum(car, size)/size== avg){ counts+=1; } ...
a.cc:5:9: error: 'vector' was not declared in this scope 5 | int sum(vector<int> li, int size) { | ^~~~~~ a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' +++ |+#include <vector> 1 | using namespace std; a.cc:5:16: error: expec...
s252393553
p04013
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <functional> #include <bitset> #include <cmath> #include <stack> #include <iomanip> #include <map> #include <math.h> #include <list> #include <deque> using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a...
a.cc:17:1: error: 'll' does not name a type 17 | ll MOD = 1000000007; | ^~ a.cc:18:1: error: 'll' does not name a type 18 | ll INF = 1LL << 60; | ^~ a.cc: In function 'int main()': a.cc:55:3: error: 'memset' was not declared in this scope 55 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:13:...
s620359360
p04013
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; const long double PI = (acos(-1)); #define rep(i, x, n) for (int i = x; i < (int)(n); i++) #define sc(x) scanf("%d",&x) #define scll(x) scanf("%lld",&x) static const int MAX = 50*50; int main(){ int n, a, ans = 0,sum; sc(n)...
a.cc: In function 'int main()': a.cc:13:55: error: no matching function for call to 'std::vector<std::vector<long long int> >::vector(int, std::vector<int>)' 13 | vector<vector<ll> > dp(n+1, vector<int>(2*MAX+1,0)); | ^ In file included from /usr/includ...
s428928261
p04013
C++
#include<bits/stdc++.h> using namespace std; int main(){ int64_t N,A; cin>>N>>A; vector<int64_t>X(N); for(int64_t i=0;i<N;i++){ int64_t x; cin>>x; x-=A; X.at(i)=x; }vector<vector<int64_t>>dp(N+1,vector<int64_t>(5001,0)); dp[0][2500]=1; for(int64_t i=1;i<=N;i++){ for(int64_t j=2500-50*i; j<=250...
a.cc: In function 'int main()': a.cc:15:47: error: expected ';' before '}' token 15 | dp[i][j]=dp[i-1][j]+dp[i-1][j-X.at(i-1)] | ^ | ; 16 | }cout<<dp[N][2500]<<endl; | ~ ...
s858845245
p04013
C++
https://atcoder.jp/contests/abc044/score#include <iostream> #include <vector> #include <string> #include <unordered_map> #include <math.h> #include <algorithm> #include <deque> #include <climits> using namespace std; #define ll long long #define ve vector #define umap unordered_map int main() { int n, a; cin>...
a.cc:1:1: error: 'https' does not name a type 1 | https://atcoder.jp/contests/abc044/score#include <iostream> | ^~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:3...
s266718410
p04013
C++
#include <bits/stdc++.h> typedef long long ll; using namespace std; const int INF = 1e9; const int MOD = 1e9+7; const ll LINF = 1e18; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) for(int i=0;i<(n);++i) #define REPR(i,n) for(int i=n;i>=0;i--) #define ALL(v) (v.begin(),v.end()) #define COUT(x) cout<<(x)...
a.cc: In function 'int main()': a.cc:33:14: error: expected '}' at end of input 33 | return 0; | ^ a.cc:15:11: note: to match this '{' 15 | int main(){ | ^
s581845171
p04013
C++
n,a=map(int,input().split()) x=list(map(int,input().split())) xsum=max(max(x),a)*n dp=[[[0]*(xsum+1) for i in range(n+1)] for ii in range(n+1)] dp[0][0][0]=1 for j in range(1,n+1): for k in range(0,n+1): for s in range(0,xsum+1): if s<x[j-1] : dp[j][k][s]=dp[j-1][k][s]...
a.cc:1:1: error: 'n' does not name a type 1 | n,a=map(int,input().split()) | ^
s534352539
p04013
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> int64_t test(int N, int A, int X[]); int main(void) { char *p; char str[256]; int *X; int N,A; int i,cnt=0; p = fgets(str, 256, stdin); for(i=0;i<256;i++){ if(str[i] == ' ') { str[i] = '\0';...
a.cc: In function 'int main()': a.cc:25:15: error: invalid conversion from 'void*' to 'int*' [-fpermissive] 25 | X = malloc(sizeof(int) * N); | ~~~~~~^~~~~~~~~~~~~~~~~ | | | void* a.cc: In function 'int64_t test(int, int, int*)': a.cc:52:20: error: invalid co...
s343863548
p04013
C++
#include<bits/stdc++.h> #include<unordered_set> #include<unordered_map> #include <algorithm> #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);...
a.cc: In function 'int main()': a.cc:53:12: error: 'x' was not declared in this scope 53 | if(x[i]<=u) dp[i+1][j][u]+=dp[i][j-1][u-x[i]]; | ^
s755809510
p04013
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,S,A; long long int X=0; cin>>N>>A; vector<int>x(N); for(int i=0;i<N;i++)cin>>x.at(i); for(int i=0;true;i++){ bitset<50>s(i) if(s.test(N))break; S=0; for(int j=0;j<N;j++)if(s.test(j))S+=x.at(j); if(S==s.count()*A)X++; } c...
a.cc: In function 'int main()': a.cc:11:5: error: expected ',' or ';' before 'if' 11 | if(s.test(N))break; | ^~
s728382159
p04013
C++
#include<iostream> #include<cstring> #include<queue> #include<algorithm> #include<cstdio> using namespace std; int dp[60][60][51*51+5]; int main(){ memset(dp,0,sizeof dp); int n,a,arr[60]; cin>>n>>a; for(int i=0;i<n;i++){ scanf("%d",arr+i); dp[n][1][arr[i]]++; } for(int i=1;i<=n;i++){ for(int j=i;j>=0;j--){...
a.cc: In function 'int main()': a.cc:19:42: error: 'k' was not declared in this scope 19 | dp[i][j][k]+=dp[i-1][j][k]; | ^ a.cc:20:23: error: 'x' was not declared in this scope 20 | if(k>=x[i-1] && j>=1) dp[i][j][k]+=dp...
s145115071
p04013
C++
#include<iostream> #include<cstdio> using namespace std; long long N,A,x; long long dp[300][8000],ans; int main() { dp[0][0]=1; cin>>N>A; for(int i=1;i<=N;i++) { cin>>x; for(int j=i;j>0;j--) { for(int k=A*N;k>=x;k--) { dp[j][k]+=dp[j-1][k-x...
a.cc: In function 'int main()': a.cc:9:11: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'long long int') 9 | cin>>N>A; | ~~~~~~^~ | | | | | long long int | std::basic_istrea...
s773683527
p04013
C++
#include<bits/stdc++.h> using namespace std; long erase(long A,int n,int k){ return A%((long)pow(10,n-k); } int f(long A,int n){ int i,j,cnt,m=n; long sum=0; int a[n]; for(i=0;i<n;i++){ a[n-i-1]=(A/(int)pow(10,i))%10; } for(i=0;i<n;i++){ cnt=0; sum+=pow(10,n-i-1)*a[i]; for(j=1;j<=i-1;j++...
a.cc: In function 'long int erase(long int, int, int)': a.cc:5:30: error: expected ')' before ';' token 5 | return A%((long)pow(10,n-k); | ~ ^ | ) a.cc: In function 'int f(long int, int)': a.cc:24:17: error: too few arguments to function 'long in...
s927919044
p04013
Java
#include <bits/stdc++.h> using namespace std; #define ll long long #define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--) #define rrep(i,n) RREP(i,n-1,0) #define REPL(i,m,n) for(ll i=(ll)(m); i<(ll)(n); i++) #define repl(i,n) REPL(i,...
Main.java:1: error: illegal character: '#' #include <bits/stdc++.h> ^ Main.java:1: error: class, interface, enum, or record expected #include <bits/stdc++.h> ^ Main.java:3: error: illegal character: '#' #define ll long long ^ Main.java:3: error: class, interface, enum, or record expected #define ll long long ...
s316525055
p04013
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; using vl = vector<ll>; using vvl = vector<vl>; typedef ...
a.cc: In function 'int main()': a.cc:57:8: error: redeclaration of 'll ans' 57 | ll ans = 0; | ^~~ a.cc:46:8: note: 'll ans' previously declared here 46 | ll ans = 0LL; | ^~~ a.cc:59:31: error: expected ';' before '}' token 59 | ans += dp[N][i][i * A] | ...
s060152908
p04013
C++
#pragma GCC optimize("Ofast") #include<bits/stdc++.h> using namespace std; using ll=long long; using datas=pair<ll,ll>; using tdata=pair<ll,datas>; using vec=vector<ll>; using mat=vector<vec>; using pvec=vector<datas>; using pmat=vector<pvec>; #define For(i,a,b) for(i=a;i<b;i++) #define bFor(i,a,b) for(i=a;i>=b;i--) #d...
a.cc: In function 'int main()': a.cc:118:9: error: expected initializer before '<' token 118 | map mp<datas,ll>; | ^ a.cc:122:3: error: 'mp' was not declared in this scope 122 | mp[datas(-1,0)]=1; | ^~
s062415189
p04013
C++
#include <iostream> #include <vector> #include <limits.h> #include <algorithm> #include <string> #include <math.h> #include <limits.h> #include <queue> #include <map> #include <set> #include <iomanip> #include <bitset> #include <cassert> #include <random> #include <functional> #include <stack> using namespace std; te...
a.cc: In function 'int main()': a.cc:39:20: error: no matching function for call to 'std::vector<std::vector<long long int> >::resize(int, std::vector<int>)' 39 | suma.resize(26, vector<int>(25 * 50 + 1, 0)); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/...
s182441120
p04013
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N,A; cin>>N>>A; vector<int> x(N); rep(i,N) { cin>>x[i]; x[i] -= A; } vector<vector<uint64_t>> dp(N,vector<uint64_t>(100)); //dp[i][50-j]は、x[0]~x[i]からうまく選んで合計がj(-49~+49)になるようなパターンの合計...
a.cc: In function 'int main()': a.cc:19:26: error: expected ']' before ';' token 19 | cout<<dp[N-1][50]<<endl; | ^ | ] a.cc:18:12: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<long unsigned in...
s045956761
p04013
C++
#include <iostream> #include <vector> using namespace std; long long dp[N+1][N+1][N*A+1]; int main(){ long long N, A; cin >> N >> A; vector<long long> x(N+1); for(int i = 0; i < N; i++){ cin >> x[i+1]; } // dp[j][k][s] := (x_1 ... x_j から k 枚選んで合計 s にするような選び方の総数) dp[0][0...
a.cc:7:14: error: 'N' was not declared in this scope 7 | long long dp[N+1][N+1][N*A+1]; | ^ a.cc:7:19: error: 'N' was not declared in this scope 7 | long long dp[N+1][N+1][N*A+1]; | ^ a.cc:7:24: error: 'N' was not declared in this scope 7 | long long dp[N+1][N+1][N...
s101221396
p04013
C++
#include <bits/stdc++.h> using namespace std; long long ans = 0; int n, a; vector<int> arr; ll dp[51][2507][51]; int answer(int cnt, int curr, int total){ if(cnt == n){ if(total == 0) return 0; int k = curr / total; if(k * total == curr && k == a) return 1; return 0; } if(dp[...
a.cc:6:1: error: 'll' does not name a type 6 | ll dp[51][2507][51]; | ^~ a.cc: In function 'int answer(int, int, int)': a.cc:14:8: error: 'dp' was not declared in this scope; did you mean 'dup'? 14 | if(dp[cnt][curr][total] != 0) return dp[cnt][curr][total]; | ^~ | dup a.cc:20...
s435816498
p04013
C++
#include<iostream> using namespace std; typedef long long ll; const int N = 55; int n, A; int a[N]; ll mem[N][N][N * N]; ll dp(int i, int cnt, int sum) { if (i == n) { if (cnt == 0)return 0; if ((sum / cnt == A) && (sum % cnt == 0))return 1; return 0; } ll& ret = mem[i][cnt][sum]; if (ret != -1)return ...
a.cc: In function 'int main()': a.cc:32:9: error: 'memset' was not declared in this scope 32 | memset(mem, -1, sizeof mem); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cs...
s648275790
p04013
C++
#include<cstdio> using namespace std; typedef long long ll; const int N = 55; int n, A; int a[N]; ll mem[N][N][N * N]; ll dp(int i, int cnt, int sum) { if (i == n) { if (cnt == 0)return 0; if ((sum / cnt == A) && (sum % cnt == 0))return 1; return 0; } ll& ret = mem[i][cnt][sum]; if (ret != -1)return re...
a.cc: In function 'int main()': a.cc:35:9: error: 'memset' was not declared in this scope 35 | memset(mem, -1, sizeof mem); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<cstdio> +++ |+#include <cstr...
s815687220
p04013
C++
#include<cstdio> using namespace std; typedef long long ll; const int N = 55; int n, A; int a[N]; ll mem[N][N][N * N]; ll dp(int i, int cnt, int sum) { if (i == n) { if (cnt == 0)return 0; if ((sum / cnt == A) && (sum % cnt == 0))return 1; return 0; } ll& ret = mem[i][cnt][sum]; if (ret != -1)return re...
a.cc: In function 'int main()': a.cc:29:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 29 | scanf_s("%d %d", &n, &A); | ^~~~~~~ | scanf a.cc:35:9: error: 'memset' was not declared in this scope 35 | memset(mem, -1, sizeof mem); | ...
s717148576
p04013
C++
#include<cstdio> using namespace std; typedef long long ll; const int N = 55; int n, A; int a[N]; ll mem[N][N][N * N]; ll dp(int i, int cnt, int sum) { if (i == n) { if (cnt == 0)return 0; if ((sum / cnt == A) && (sum % cnt == 0))return 1; return 0; } ll& ret = mem[i][cnt][sum]; cout << mem[i][cnt][sum...
a.cc: In function 'll dp(int, int, int)': a.cc:22:9: error: 'cout' was not declared in this scope 22 | cout << mem[i][cnt][sum] << endl; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ ...