submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s017531235 | p03806 | C | #include <stdio.h>
#define inf 4001
int main(void)
{
int N;
int Ma, Mb;
int a[41], b[41], c[41];
static int dp[41][401][401];
int i, ca, cb;
int amax = 0;
int bmax = 0;
int ans;
int tmp1;
int tmp2;
scanf("%d %d %d", &N, &Ma, &Mb);
for(i = 0; i < N; i++) {
scanf("%d %d %d", &a[i], &b[i], &c... | main.c: In function 'main':
main.c:67:20: error: 'and' undeclared (first use in this function); did you mean 'ans'?
67 | printf("%d\n", and);
| ^~~
| ans
main.c:67:20: note: each undeclared identifier is reported only once for each function it appears in
|
s579359839 | p03806 | C++ | #include <iostream>
2.using namespace std;
3.const int INF = 10000 ;
4.int main(void){
5. int N , Ma , Mb ;
6. int a[45] , b[45] , c[45] ;
7. cin >> N >> Ma >> Mb ;
8. for(int i=1;i<=N;i++){
9. cin >> a[i] >> b[i] >> c[i] ;
10. }
11.
12. int dp[N+1][500][500] ;
13. for(int i=1;... | a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 2.using namespace std;
| ^~~~~~~
a.cc:3:1: error: expected unqualified-id before numeric constant
3 | 3.const int INF = 10000 ;
| ^~~~~~~
a.cc:4:1: error: expected unqualified-id before numeric constant
4 | 4.int main(void){
... |
s077912440 | p03806 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define INF 1e9;
int N,a,b,c,Ma,Mb;
int dp[2][401][401];
int main(){
cin >> N >> Ma >> Mb;
for(int k=0;k<2;++k)
for(int i=0;i<=400;++i){
for(int j=0;j<=400;++j){
dp[k][i][j] = INF;
}
}
dp[0][0][0] = dp[1][0][0] = 0;
int cur = 1;
while(N--){
... | a.cc: In function 'int main()':
a.cc:36:22: error: expected primary-expression before ')' token
36 | if(res == INF) cout << -1 << endl;
| ^
|
s435210359 | p03806 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pp;
void read(int& x){ scanf("%d",&x); }
template<typename T,typename... Args>
void read(T& a,Args&... b){ read(a); read(b...); }
#define all(x) (x).begin(),(x).end()
#define pb push_back
const ll inf = (1ll<<60);
int n, Ma, Mb;
... | a.cc: In function 'void dfs0(int, int, int, int)':
a.cc:35:32: error: no matching function for call to 'min(ll&, int&)'
35 | ans=min(ans, sc);
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-lin... |
s364507578 | p03806 | C++ | <?php
class main {
function run () {
fscanf(STDIN, "%d %d %d", $n, $ma, $mb);
$drug = array();
for ($i = 0; $i < $n; $i++) {
fscanf(STDIN, "%d %d %d", $a, $b, $c);
$drug[$i]["a"] = $a;
$drug[$i]["b"] = $b;
$drug[$i]["c"] = $c;
}
... | a.cc:1:1: error: expected unqualified-id before '<' token
1 | <?php
| ^
a.cc:53:1: error: '$object' does not name a type
53 | $object = new main();
| ^~~~~~~
a.cc:54:1: error: '$object' does not name a type
54 | $object->run();
| ^~~~~~~
|
s268193632 | p03806 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
struct node{
int a, b, c;
}a[1000100];
int n, ma, mb;
ll dp[60][500][500];
bool check(int cura, int curb){
if(cura == 0 && cura == curb){
return false;
}
return ma*curb == mb*cura;
}
ll cool(){
for(int i = 0;i<60;i+=1){
for(int j=0... | a.cc: In function 'int main()':
a.cc:67:16: error: 'm' was not declared in this scope; did you mean 'tm'?
67 | memset(m, -1, sizeof(m));
| ^
| tm
|
s786763299 | p03806 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
struct node{
int a, b, c;
}a[1000100];
int n, ma, mb;
int m[60][510][510];
ll dp[60][500][500];
bool check(int cura, int curb){
if(cura == 0 && cura == curb){
return false;
}
return ma*curb == mb*cura;
}
ll cool(){
for(int i = 0;i<60... | a.cc: In function 'll cool()':
a.cc:70:34: error: a function-definition is not allowed here before '{' token
70 | ll memo(int curr, int wa, int wb){
| ^
a.cc:88:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
88 | int main(){
... |
s687919261 | p03806 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
struct node{
int a, b, c;
}a[1000100];
int n, ma, mb;
int m[60][510][510];
ll dp[60][500][500];
bool check(int cura, int curb){
if(cura == 0 && cura == curb){
return false;
}
return ma*curb == mb*cura;
}
ll cool(){
for(int i = 0;i<60... | a.cc: In function 'll cool()':
a.cc:43:24: error: 'k' was not declared in this scope
43 | if(j + a[i].a < 499 && k + a[i].b < 499){
| ^
|
s626979775 | p03806 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
struct node{
int a, b, c;
}a[1000100];
int n, ma, mb;
int m[60][510][510];
ll dp[60][500][500];
bool check(int cura, int curb){
if(cura == 0 && cura == curb){
return false;
}
return ma*curb == mb*cura;
}
ll cool(){
for(int i = 0;i<60... | a.cc: In function 'll cool()':
a.cc:27:50: error: expected ')' before '{' token
27 | for(int k=0 ; i<500 ; k++{
| ~ ^
| )
a.cc:43:24: error: 'k' was not declared in this scope
43 | i... |
s476648143 | p03806 | C++ | #include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define int long long
#define F first
#define S second
const ll INF = 1LL * 1000 * 1000 * 1000 * 1000 * 1000 * 1000;
const int inf = 1000 * 1000 * 1000;
// Bedone harf !
const int N = 40,
M = 10;
int a[N], b[N], c[N];
int n, ... | a.cc: In function 'int32_t main()':
a.cc:52:2: error: expected '}' at end of input
52 | }
| ^
a.cc:20:15: note: to match this '{'
20 | int32_t main(){
| ^
|
s663995318 | p03806 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int ratioA = sc.nextInt();
int ratioB = sc.nextInt();
int[] a = new int[N];
int[] b = new int[N];
int[] c = new int[N];
int sumA = 0;
int sum... | Main.java:58: error: no suitable method found for min(int,int[])
cost = Math.min(cost, dp[ratioA * i][ratioB * i]);
^
method Math.min(int,int) is not applicable
(argument mismatch; int[] cannot be converted to int)
method Math.min(long,long) is not applicable
(argument mis... |
s984698323 | p03806 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int ratioA = sc.nextInt();
int ratioB = sc.nextInt();
int[] a = new int[N];
int[] b = new int[N];
int[] c = new int[N];
int sumA = 0;
int sum... | Main.java:38: error: bad operand types for binary operator '!='
if(dp[j - a[i]][k - b[i]] != -1) m = c[i] + dp[j - a[i]][k - b[i]];
^
first type: int[]
second type: int
Main.java:38: error: bad operand types for binary operator '+'
if(dp[j - a[i]]... |
s560782044 | p03806 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int ratioA = sc.nextInt();
int ratioB = sc.nextInt();
int[] a = new int[N];
int[] b = new int[N];
int[] c = new int[N];
int sumA = 0;
int sum... | Main.java:34: error: variable a is already defined in method main(String[])
int a = Integer.MAX_VALUE;
^
Main.java:35: error: array required, but int found
if(a[i] == j && b[i] == k) {
^
Main.java:38: error: array required, but int found
if(dp[j - a[... |
s772205336 | p03806 | C++ | #include <iostream>
using namespace std;
int n, a, b, ans = 1e9;
int A[100], B[100], C[100];
int dp[555][555];
int main()
{
cin >> n >> a >> b;
double d = a/b;
for(int i=1; i <= n; i++)
cin >> A[i] >> B[i] >> C[i];
for(int i=0; i <= 400; i++)
for(int h=0; h <= 400; h++)
dp[i][h] = 1e9;
dp[0][0] = 0;
... | a.cc: In function 'int main()':
a.cc:33:21: error: 'x' was not declared in this scope
33 | if (x*i <= 400 && y*i <= 400)
| ^
a.cc:33:35: error: 'y' was not declared in this scope
33 | if (x*i <= 400 && y*i <= 400)
| ... |
s880875574 | p03806 | C++ | #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>
using namespace std;
#define ll long long
#define ld long dou... | a.cc: In function 'int main()':
a.cc:55:12: error: no matching function for call to 'min(int&, long long int&)'
55 | ans=min(ans,dp[n%2][i*ma][i*mb]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:... |
s284777780 | p03806 | C++ | #include<iostream>
using namespace std;
int N, A, B;
int a[50], b[50], c[50];
const int inf=1001001;
int memo[41][401][401];
int rec(int i, int _a, int _b){
if(memo[i][_a][_b]!=inf) return memo[i][_a][_b];
if(_a==0&&_b==0) return 0;
if(i==N) return inf;
int ret=inf;
ret=min(ret, rec(i+1, _a, _b));
... | a.cc: In function 'int main()':
a.cc:39:18: error: invalid operands of types 'int [50]' and 'int' to binary 'operator*'
39 | if(k*A>x||b*A>y) continue;
| ~^~
| | |
| | int
| int [50]
|
s488323809 | p03806 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,ma,mb;
int a[40],b[40],c[40];
map<pair<int,int>,int> min_cost;
void res(int cur,pair<int,int> m,int used[]){
//for(int i=0; i<n; i++)cout<<used[i]<<' ';cout<<endl;
if(min_cost[make_pair(m.first,m.second)]==0){
min_cost[make_pair(m.first,m.second)]=cur... | a.cc: In function 'int main()':
a.cc:49:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
49 | return;
| ^~~~~~
|
s215517179 | p03806 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
#define FOR(k,m,n) for(int (k)=(m);(k)<(n);(k)++)
#define rep(i,n) FOR((i),0,(n))
typedef long long ll;
const int INF=1e9+7;
const int MAX_N=43;
int a[MAX_N],b[MAX_N],c[MAX_N];
int dp[450][450][43];
int main(){
rep(i,450)rep(j,450)rep(k,43)dp... | a.cc: In function 'int main()':
a.cc:22:53: error: expected ')' before ';' token
22 | rep(i,400)rep(j,400){dp[i][j][l+1]=min(dp[i][j][l+1];dp[i][j][l]),dp[i+a[l]][j+b[l]][l+1]=min(dp[i+a[l]][j+b[l]][l],dp[i][j][l]+c[l])}}
| ~ ^
| ... |
s823582356 | p03806 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
#define FOR(k,m,n) for(int (k)=(m);(k)<(n);(k)++)
#define rep(i,n) FOR((i),0,(n))
typedef long long ll;
const int INF=1e9+7;
const int MAX_N=43;
int a[MAX_N],b[MAX_N],c[MAX_N];
int dp[450][450][43];
int main(){
rep(i,450)rep(j,450)rep(k,43)dp... | a.cc: In function 'int main()':
a.cc:22:151: error: expected ';' before '}' token
22 | rep(i,400){rep(j,400){dp[i][j][l+1]=min(dp[i][j][l+1],dp[i][j][l]),dp[i+a[l]][j+b[l]][l+1]=min(dp[i+a[l]][j+b[l]][l],dp[i][j][l]+c[l])}};
| ... |
s338296782 | p03806 | C++ | #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#include <bitset>
#include <map>
#include <cstring>
#include <cstdlib>
#define INF_LL 9000000000000000000
#define INF 2000000000
#define REP(i, n) for(int i = 0;i < (n);... | a.cc: In function 'int main()':
a.cc:106:47: error: expected ')' before 'dp'
106 | if(dp[N][i][j] != INF dp[N][i][j] != 0 && i*Mb - j*Ma == 0){
| ~ ^~
|
s588786102 | p03806 | Java | import java.util.*;
import java.io.*;
public class Coin {
static int n;
static int m1,m2;
static final long INF=1000000000000000000L;
static long min=INF;
static int[] a;
static int[] b;
static int[] c;
static long[][][] dp=new long[41][401][401];
public static void main(S... | Main.java:4: error: class Coin is public, should be declared in a file named Coin.java
public class Coin {
^
1 error
|
s822605146 | p03806 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
int n, ma, mb;
cin >> n >> ma >> mb;
int a[n], b[n], c[n];
for(int i = 0; i < n; i++){
cin >> a[i] >> b[i] >> c[i];
}
int is_ok = false;
int min = 5000;
for (int i = 0; i < n; i++) {
... | a.cc: In function 'int main()':
a.cc:42:14: error: expected '}' at end of input
42 | return 0;
| ^
a.cc:7:12: note: to match this '{'
7 | int main() {
| ^
|
s728833515 | p03806 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <array>
#include <vector>
#include <functional>
using namespace std;
int main(void) {
double N, Ma, Mb, i, j, count = 0;
vector<double> a(N);
vector<double> b(N);
vector<int> c(N);
cin >> N >> Ma >> Mb;
for (i = 0; i < N; i++) {... | a.cc: In function 'int main()':
a.cc:23:44: error: no matching function for call to 'max(double&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
23 | count = max(count, c[i] + c[j]);
| ~~~^~~~~~~~~~~~~~~~~~~~
In file inc... |
s879442091 | p03806 | C++ | //
// Created by tattsun on 2017/02/11.
//
#include <iostream>
#include <vector>
#include <algorithm>
#define DRUGS_NUM_MAX 40
#define TOTAL_COST_MAX DRUGS_NUM_MAX * 1000
using namespace std;
struct Drug {
int a;
int b;
int cost;
};
int n;
int ma;
int mb;
Drug drugs[DRUGS_NUM_MAX];
int min(int a, int ... | a.cc: In function 'int _solve(int, std::vector<bool>&)':
a.cc:94:17: error: no matching function for call to 'std::vector<std::vector<bool> >::push_back(std::vector<int>&)'
94 | dp.push_back(cost);
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/vector:66,
from a.cc:6:
/... |
s786836506 | p03806 | 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:60:49: error: 'j2' was not declared in this scope; did you mean 'j'?
60 | dp[i+1][j2][k2]=dp[i][j][k];
| ^~
| j
a.cc:60:53: error: '... |
s962405008 | p03806 | C++ | #include <iostream>
using namespace std;
int main(){
int n, ma, mb;
cin >> n >> ma >> mb;
int a[n], b[n], c[n];
for(int i = 0; i < n; i++) cin >> a[i] >> b[i] >> c[i];
int minic = 1e9;
for(int i = 1; i < (1 << n); i++){
int suma = 0, sumb = 0, sumc = 0, ii = i, count = 0;
while(ii){
if(ii & 1){
suma ... | a.cc: In function 'int main()':
a.cc:21:59: error: invalid operands of types 'int' and 'int [n]' to binary 'operator*'
21 | if(suma % ma == 0 && sumb % mb == 0 && ma * b == mb * a){
| ~~ ^ ~
| ... |
s434415909 | p03806 | Java |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long N = Integer.parseInt(sc.next());
int Ma = Integer.parseInt(sc.next());
int Mb = Integer.parseInt(sc.next());
int[][] abc = new int[N][2];
int a;
int b;
int c;
int an... | Main.java:11: error: incompatible types: possible lossy conversion from long to int
int[][] abc = new int[N][2];
^
1 error
|
s364655194 | p03806 | Java |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long N = Integer.parseInt(sc.next());
int Ma = Integer.parseInt(sc.next());
int Mb = Integer.parseInt(sc.next());
int[][] abc;
int a;
int b;
int c;
int answer=-1;
for(... | Main.java:17: error: variable abc might not have been initialized
abc[i][0]=Integer.parseInt(sc.next());
^
Main.java:25: error: variable abc might not have been initialized
a=a+abc[j][0];
^
2 errors
|
s353118678 | p03806 | C++ | #include <iostream>
using namespace std;
int n,ma,mb;
int m;
int flag;
int a[40];
int b[40];
int c[40];
void saiki(int k,int A,int B,int C)
{
int w=0;
A += a[k];
B += b[k];
C += c[k];
//cerr << C << endl;
if(A%ma==0&&(w=A/ma))
{
if(B==mb*w)
{
if(min>C)
{
flag=1;
min = C;
}
}
}
for... | a.cc: In function 'void saiki(int, int, int, int)':
a.cc:23:31: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
23 | if(min>C)
| ~~~^~
a.cc:26:39: error: overloaded function with no contextual type infor... |
s487865505 | p03806 | Java |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long N = Integer.parseInt(sc.next());
int Ma = Integer.parseInt(sc.next());
int Mb = Integer.parseInt(sc.next());
int[][] abc;
int a;
int b;
int c;
int answer=-1;
for(... | Main.java:25: error: incompatible types: possible lossy conversion from long to int
a=a+abc[i][0];
^
Main.java:26: error: incompatible types: possible lossy conversion from long to int
b=b+abc[i][1];
^
Main.java:27: error: incompatible types: possible lossy conversion from long t... |
s166748112 | p03806 | C++ | #include <iostream>
using namespace std;
int n,ma,mb;
int min;
int flag;
int a[40];
int b[40];
int c[40];
void saiki(int k,int A,int B,int C)
{
int w=0;
A += a[k];
B += b[k];
C += c[k];
//cerr << C << endl;
if(A%ma==0&&(w=A/ma))
{
if(B==mb*w)
{
if(min>C)
{
flag=1;
min = C;
}
}
}
f... | a.cc: In function 'void saiki(int, int, int, int)':
a.cc:23:28: error: reference to 'min' is ambiguous
23 | if(min>C)
| ^~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s190291739 | p03806 | C++ | #include <bits/stdc++.h>
using namespace std;
const int dx[]={1,0,-1,0,1,-1,-1,1};
const int dy[]={0,1,0,-1,1,1,-1,-1};
const int INF = 1e9;
const long long LINF = 1e18;
const double EPS = 1e-8;
#define pb push_back
#define mk make_pair
#define fr first
#define sc second
#define ll long long
#define reps(i,j,... | a.cc: In function 'int main()':
a.cc:76:9: error: 'p' was not declared in this scope
76 | p = tar[mk(sum2[i].fr.fr,sum2[i].fr.sc)];
| ^
|
s570712772 | p03806 | C++ | #include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <utility>
#include <stack>
#include <queue>
#include <sstream>
#include <fstream>
#include <cmath>
#include <cstring>
using namespace std;
#define int long long
const... | a.cc: In function 'int main()':
a.cc:45:83: error: 'DBL_EPSILON' was not declared in this scope
45 | if (fabs(double(i/j) - (double)(Ma/Mb)) < DBL_EPSILON) {
| ^~~~~~~~~~~
|
s520922971 | p03806 | C++ | #include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <uno... | a.cc: In function 'int main()':
a.cc:75:23: warning: overflow in conversion from 'LL' {aka 'long long int'} to 'int' changes value from '1000000000000000000' to '-1486618624' [-Woverflow]
75 | dp[i][j][k] = LLINF;
| ^~~~~
a.cc:89:14: error: no matching function for call to 'chmin(... |
s934014675 | p03806 | C++ | #include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <utility>
#include <stack>
#include <queue>
#include <sstream>
#include <fstream>
#include <cmath>
#include <cstring>
using namespace std;
#define int long long
const... | a.cc:32:64: error: stray '\' in program
32 | if (dp[i][j][k] != 0&&l\k!=1) {
| ^
a.cc: In function 'int main()':
a.cc:32:63: error: 'l' was not declared in this scope
32 | ... |
s541080719 | p03806 | C++ | #include <stdio.h>
/*
i-1番目まで調べて、物質aがAグラム、bがBグラムのときの最低価格をp[i][A][B]と置く。
A,Bは0から400まで、iは0から41まで
p[i][A][B] = 5000と置いておけば十分。
漸化式は、
p[i][A][B] = min(p[i-1][A-a[i-1]][B-b[i-1]] + c[i-1] , p[i-1][A][B])
p[0][0][0] = 0, 残りはp[0][A][B] = 5000。
*/
int a[40]; b[40]; c[40];
int p[41][401][401];
int memo[41][401][401];
int... | a.cc:16:12: error: 'b' does not name a type
16 | int a[40]; b[40]; c[40];
| ^
a.cc:16:19: error: 'c' does not name a type
16 | int a[40]; b[40]; c[40];
| ^
a.cc: In function 'int dp(int, int, int)':
a.cc:33:36: error: 'b' was not declared in this scope
33 | PP =... |
s791808675 | p03806 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cassert>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define rep(i,n) FOR(i,0,n)
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define vint vector<int>
#define vdouble vector<double>
#define vs... | a.cc: In function 'int main()':
a.cc:56:13: error: 'ret' was not declared in this scope; did you mean 'rep'?
56 | if (ret == 999999) ret = -1;
| ^~~
| rep
a.cc:57:17: error: 'ret' was not declared in this scope; did you mean 'rep'?
57 | cout << ret << endl;
... |
s700233630 | p03806 | Java | import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.*;
/**
* Created by rakshit on 10/2/17.
* Java is Love , 4 Forces.. :)
*/
public class omp {
static class Reader
{
final private int ... | Main.java:12: error: class omp is public, should be declared in a file named omp.java
public class omp {
^
1 error
|
s793824161 | p03806 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <climits>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N, Ma, Mb;
cin >> N >> Ma >> Mb;
vector<int> a(N), b(N), c(N);
for(... | a.cc: In function 'int main()':
a.cc:53:51: error: no matching function for call to 'std::pair<int, int>::pair(__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type&, int)'
53 | pair<int, int> p = pair<int, int>(G1[i], 0);
| ... |
s954196494 | p03806 | C++ | #include <stdio.h>
#include <algorithm>
#include <vector>
struct PatternA {
int a, b, c;
PatternA(int a0, int b0, int c0) : a(a0), b(b0), c(c0) {}
PatternA() : a(0), b(0), c(0) {}
bool operator<(const PatternA& o) const {
if (a * o.b == o.a * b) {
return c < o.c;
}
else {
return a*o.b < o.a*b;
}
}
}... | a.cc: In function 'int main()':
a.cc:70:19: error: 'INT_MAX' was not declared in this scope
70 | int ret = INT_MAX;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include <vector>
+++ |+#include ... |
s205725268 | p03806 | C++ | #include <bits/stdc++.h>
using namespace std;
long long dp[1001][1001];
int main(void){
int N,Ma,Mb;
cin >> N >> Ma >> Mb;
vector<int> a(N),b(N),c(N);
for(int i=0;i<N;i++){
cin >> a[i] >> b[i] >> c[i];
}
for(int i=0;i<=1000;i++)for(int j=0;j<=1000;j++)
dp[i][j] = 1e18;
dp[0][0] = 0;
for(int i=0;i<=1000;... | a.cc: In function 'int main()':
a.cc:27:19: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
27 | int ret = 1e18;
| ^~~~
a.cc:29:26: error: no matching function for call to 'min(int&, long long int&)'
29 | ... |
s958783203 | p03807 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,odd=0,even=0;
cin >> n;
int a[n];
for(int i=0;i<n;i++){
cin >> a[i];
if(a[i]%2==0)even++;
else odd++;
}
if(odd%2==1)cout << "NO" << endl;
else cout << "YES" << endl;
sort(a,a+n); | a.cc: In function 'int main()':
a.cc:14:15: error: expected '}' at end of input
14 | sort(a,a+n);
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s931030596 | p03807 | C++ | #pragma GCC optimize("O3")
#pragma GCC target("avx")
#include < bits / stdc++.h >
#define int long long
#define ll long long
using ull = unsigned long long;
using namespace std;
#define dump(x) \
if (dbg) { \
cerr << #x << " = " << (x) << endl; \
... | a.cc:3:10: fatal error: bits / stdc++.h : No such file or directory
3 | #include < bits / stdc++.h >
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s207941574 | p03807 | C++ | #include<bits/stdc++.h>
#define FRU freopen("out.txt","w",stdout)
#define FRO freopen("in.txt","r",stdin)
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define mem(ara,n) memset(ara,n,sizeof ara)
#define loop(i,j,n) for(i=j;i<n;i++)
#define rloop(i,j,n) for(i=n;i>=j;i--)
#define INF 21474... | a.cc: In function 'int main()':
a.cc:24:11: error: expected ';' before 'int'
24 | cin>>n
| ^
| ;
25 | int ara[100005];
| ~~~
a.cc:28:14: error: 'ara' was not declared in this scope
28 | cin>>ara[i];
| ^~~
|
s800619146 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
for(int i = 1;i<=N;i++){
int A;
cin>>A;
ans += A;
}
if((ans)%2==0){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:9:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
9 | ans += A;
| ^~~
| abs
a.cc:11:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
11 | if((ans)%2==0){
| ^~~
| abs
a.cc:16:1... |
s526312936 | p03807 | C++ | #include<iostream>
using namespace std;
int main() {
int N, a[100000];
cin >> N;
REP(i, N) cin >> a[i];
int oddNum = 0;
REP(i, N) {
if(a[i]%2 == 1) oddNum++;
}
cout << (oddNum % 2 == 0? "Yes": "No") << endl;
} | a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
8 | REP(i, N) cin >> a[i];
| ^
a.cc:8:5: error: 'REP' was not declared in this scope
8 | REP(i, N) cin >> a[i];
| ^~~
|
s573786931 | p03807 | C++ |
int main() {
int N, a[100000];
cin >> N;
REP(i, N) cin >> a[i];
int oddNum = 0;
REP(i, N) {
if(a[i]%2 == 1) oddNum++;
}
cout << (oddNum % 2 == 0? "Yes": "No") << endl;
} | a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
4 | cin >> N;
| ^~~
a.cc:5:9: error: 'i' was not declared in this scope
5 | REP(i, N) cin >> a[i];
| ^
a.cc:5:5: error: 'REP' was not declared in this scope
5 | REP(i, N) cin >> a[i];
... |
s340748870 | p03807 | C++ |
int main() {
int N, a[100000];
cin >> N;
REP(i, N) cin >> a[i];
int oddNum = 0;
REP(i, N) {
if(a[i]%2 == 1) oddNum++;
}
cout >> (oddNum%2 == 0? "Yes": "No") >> endl;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin >> N;
| ^~~
a.cc:6:9: error: 'i' was not declared in this scope
6 | REP(i, N) cin >> a[i];
| ^
a.cc:6:5: error: 'REP' was not declared in this scope
6 | REP(i, N) cin >> a[i];
... |
s042078910 | p03807 | C++ | #include<iostream>
using namespace std;
int main() {
int N, a[100000];
cin >> N;
REP(i, N) cin >> a[i];
int oddNum = 0;
REP(i, N) {
if(a[i]%2 == 1) oddNum++;
}
cout >> (oddNum%2 == 0? "Yes": "No") >> endl;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'i' was not declared in this scope
7 | REP(i, N) cin >> a[i];
| ^
a.cc:7:5: error: 'REP' was not declared in this scope
7 | REP(i, N) cin >> a[i];
| ^~~
a.cc:13:10: error: no match for 'operator>>' (operand types are 'std::ostream'... |
s972367601 | p03807 | C++ | int main() {
int N, a[100000];
cin >> N;
REP(i, N) cin >> a[i];
int oddNum = 0;
REP(i, N) {
if(a[i]%2 == 1) oddNum++;
}
cout >> (oddNum%2 == 0? "Yes": "No") >> endl;
} | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin >> N;
| ^~~
a.cc:4:9: error: 'i' was not declared in this scope
4 | REP(i, N) cin >> a[i];
| ^
a.cc:4:5: error: 'REP' was not declared in this scope
4 | REP(i, N) cin >> a[i];
... |
s785413949 | p03807 | C++ | int main(){
int n;
cin >> n;
int a[n];
int odd = 0,even = 0;
for(int i = 0; i < n; i++){
cin >> a[i];
if(a[i] % 2 == 0) even++;
else if (a[i] % 2 == 1) odd++;
}
if(odd % 2 == 0){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
... | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin >> n;
| ^~~
a.cc:12:9: error: 'cout' was not declared in this scope
12 | cout << "YES" << endl;
| ^~~~
a.cc:12:26: error: 'endl' was not declared in this scope
12 | cout <<... |
s177969395 | p03807 | C++ | int main(){
int n;
cin >> n;
int a[n];
int odd = 0,even = 0;
for(int i = 0; i < n; i++){
cin >> a[i];
if(a[i] % 2 == 0) even++;
else if (a[i] % 2 == 1) odd++;
}
if(odd % 2 == 0){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
... | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin >> n;
| ^~~
a.cc:12:9: error: 'cout' was not declared in this scope
12 | cout << "YES" << endl;
| ^~~~
a.cc:12:26: error: 'endl' was not declared in this scope
12 | cout <<... |
s949335246 | p03807 | C++ | #include<iostream>
using namespace std;
int arr[2];
int main(){
int >> N;
cin >> N;
for(int i=1 ; i<=N; i++){
int num ;
cin >> num;
arr[num%2]++;
}
if(arr[1] % 2 == 1){
cout << "No" << endl;
} else{
cout << "Yes" << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:9: error: expected unqualified-id before '>>' token
8 | int >> N;
| ^~
a.cc:9:12: error: 'N' was not declared in this scope
9 | cin >> N;
| ^
|
s214985396 | p03807 | 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.at(i);
int A = 0; //偶数
int B = 0; //奇数
for (int i = 0; i < n; i++)
if(a.at(i)%2==0)A++;
else B++;
}
if(A%2==0||(A==1&&B==0))cout << "Yes" <<endl;
... | a.cc:15:5: error: expected unqualified-id before 'if'
15 | if(A%2==0||(A==1&&B==0))cout << "Yes" <<endl;
| ^~
a.cc:16:5: error: expected unqualified-id before 'else'
16 | else cout << "No" <<endl;
| ^~~~
a.cc:17:1: error: expected declaration before '}' token
17 | }
| ^
|
s812662245 | p03807 | 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.at(i);
int a = 0; //偶数
int b = 0; //奇数
for (int i = 0; i < n; i++)
if(a.at(i)%2==0)a++;
else b++;
}
if(a%2==0||(a==1&&b==0))cout << "Yes" <<endl;
... | a.cc: In function 'int main()':
a.cc:9:9: error: conflicting declaration 'int a'
9 | int a = 0; //偶数
| ^
a.cc:6:16: note: previous declaration as 'std::vector<int> a'
6 | vector<int>a(n);
| ^
a.cc:12:22: error: no 'operator++(int)' declared for postfix '++' [-fpermissi... |
s771416629 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
int main(){
int N;
cin >> N;
vector<int> vec(N);
rep(i,n){
cin >> vec[i];
}
int count = 0;
rep(i,n){
if(vec[i]%2 == 1) count++;
}
if(count%2 == 0) cout << "YES" << endl;
else cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'n' was not declared in this scope
9 | rep(i,n){
| ^
a.cc:3:33: note: in definition of macro 'rep'
3 | #define rep(i,n) for(int i=0; i<n; i++)
| ^
a.cc:14:9: error: 'n' was not declared in this scope
14 | ... |
s111037600 | p03807 | C++ | #include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#define rep(i,n) for (long long i=0; i < (n); ++i)
#define rep2(i,n,m) for(long long i=n;i<=m;i++)
#define ALL(a) (a).begin(),(a).end()
using namespace std;
using ll = long long;
using P = pair<int,int>;
const ll INF=1e18 ;
inline void c... | a.cc:22:15: warning: missing terminating " character
22 | else cout <<"No<<endl ;
| ^
a.cc:22:15: error: missing terminating " character
22 | else cout <<"No<<endl ;
| ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:23:7: error: expected primary-expression before 'retu... |
s601452206 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N
cin >> N
int A;
int sum = 0;
for(int i = 0;i < N;i++){
int A[i]
sum += A[i];
}
if(sum % 2 == 0){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
6 | cin >> N
| ^~~
a.cc:10:21: error: 'N' was not declared in this scope
10 | for(int i = 0;i < N;i++){
| ^
a.cc:12:4: error: expected initializer before 'sum'
12 | sum += A[i];
... |
s126435181 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N
cin >> N
int A;
int sum == 0;
for(int i = 0;i < N;i++){
int A[i]
sum += A[i];
}
if(sum % 2 == 0){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
6 | cin >> N
| ^~~
a.cc:8:11: error: expected initializer before '==' token
8 | int sum == 0;
| ^~
a.cc:10:21: error: 'N' was not declared in this scope
10 | for(int i = 0;i < N;i++){
| ... |
s213945799 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N
cin >> N
int A;
int sum == 0;
for(int i = 0;i < N;i++){
sum += A[i];
}
if(sum % 2 == 0){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
6 | cin >> N
| ^~~
a.cc:8:11: error: expected initializer before '==' token
8 | int sum == 0;
| ^~
a.cc:10:21: error: 'N' was not declared in this scope
10 | for(int i = 0;i < N;i++){
| ... |
s269427678 | p03807 | C++ | //#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, ... | a.cc: In function 'int main()':
a.cc:51:16: error: 'a' was not declared in this scope
51 | cin.tie(0);a
| ^
|
s584989140 | p03807 | C++ | //#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, ... | a.cc: In function 'int main()':
a.cc:51:16: error: 'a' was not declared in this scope
51 | cin.tie(0);a
| ^
|
s104081722 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define intll int long long
const int INF = 1e9;
const int MOD = 1e9 + 7;
int main() {
int n ;
cin >> n ;
int odd = 0 ;
rep(i,n){
int c ;
cin >> c ;
if(c%2 == 1)... | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:10:12: note: to match this '{'
10 | int main() {
| ^
|
s168238127 | p03807 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,a[100001],ans=0;
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
ans+=a[i];
}
if(ans%2==0)cout<<"YES"<<endl;。
else cout<<"NO"<<endl;
return 0;
} | a.cc:10:35: error: extended character 。 is not valid in an identifier
10 | if(ans%2==0)cout<<"YES"<<endl;。
| ^
a.cc: In function 'int main()':
a.cc:10:35: error: '\U00003002' was not declared in this scope
10 | if(ans%2==0)cout<<"YES"<<endl;。
| ... |
s558442558 | p03807 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,a[100001],ans=0;
int main(){
cin>>n;//读入n
for(int i=1;i<=n;i++){
cin>>a[i];
ans+=a[i];
}
if(ans%2==0)cout<<"YES"<<endl;。
else cout<<"NO"<<endl;
return 0;
} | a.cc:10:35: error: extended character 。 is not valid in an identifier
10 | if(ans%2==0)cout<<"YES"<<endl;。
| ^
a.cc: In function 'int main()':
a.cc:10:35: error: '\U00003002' was not declared in this scope
10 | if(ans%2==0)cout<<"YES"<<endl;。
| ... |
s285171650 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
odd_count = 0;
int a;
for (int i = 0; i < N; i++) {
cin >> a;
if(a % 2) odd_count++;
}
if (odd_count % 2) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:3: error: 'odd_count' was not declared in this scope
8 | odd_count = 0;
| ^~~~~~~~~
|
s337117348 | p03807 | C++ | using namespace std;
int main(){
int n;
long long a[100005];
cin >> n;
long long ans=0;
for (int i=1;i<=n;i++){
cin >> a[i];
ans+=a[i];
}
if (ans%2==0) cout << "YES\n";
else cout << "NO\n";
} | a.cc: In function 'int main()':
a.cc:5:6: error: 'cin' was not declared in this scope
5 | cin >> n;
| ^~~
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:11:20: error:... |
s483075467 | p03807 | C++ | #include <iostream>
using namespace std;
int main()
{
long int n, a, sum = 0;
cin >> n;
for (int i = 1; i <= n; i++)
{
cin >> a;
if (a % 2 == 0)
{
sum++;
}
else
{
ans++;
}
}
if(ans % 2 == 1)
{
cout << "NO" << endl;
}
else
{
cout << "YES" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
16 | ans++;
| ^~~
| abs
a.cc:19:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
19 | if(ans ... |
s592821489 | p03807 | C++ | #include <iostream>
using namespace std;
int main()
{
long int n, a, sum = 0;
cin >> n;
for (int i = 1; i <= n; i++)
{
cin >> a;
if (a % 2 == 0)
{
sum++;
}
else
{
ans++;
}
}
if(ans % 2 == 1)
{
cout << "NO" << endl;
}
else
{
cout << "YES" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:16:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
16 | ans++;
| ^~~
| abs
a.cc:19:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
19 | if(ans ... |
s583003175 | p03807 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[1][100];
int mian()
{
int n;
cin>>n;
int jsq=0;
for(int i=0;i<n;i++)
{
cin>>a[1][i];
jsq=jsq+a[1][i];
}
if(jsq%2==1)
cout<<"NO";
else
cout<<"YES";
return 0;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s705758613 | p03807 | C++ | #include<iostream>
using namespace std;
int main()
{
int x,cnt=0;
cin>>x;//直接忽略第一个数
while(cin>>x)cnt+=x%2;
cout<<cnt%2?"NO":"YES"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:31: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout<<cnt%2?"NO":"YES"<<endl;
| ~~~~~^~~~~~
|
s703417013 | p03807 | C++ | #include<iostream>
using namespace std;
int main()
{
int x,cnt=0;
cin>>x;//直接忽略第一个数
while(cin>>x)cnt+=x%2;
cout<<cnt%2?"NO","YES"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:31: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout<<cnt%2?"NO","YES"<<endl;
| ~~~~~^~~~~~
a.cc:8:37: error: expected ':' before ';' token
8 | cout<... |
s084164623 | p03807 | C++ | #include<iostream>
int main()
{
int x,cnt=0;
std::cin>>x//直接忽略第一个数
while(std::cin>>x)cnt+=x%2;
std::cout<<(cnt%2?"NO","YES");
return 0;
} | a.cc: In function 'int main()':
a.cc:5:20: error: expected ';' before 'while'
5 | std::cin>>x//直接忽略第一个数
| ^
| ;
6 | while(std::cin>>x)cnt+=x%2;
| ~~~~~
a.cc:7:37: error: expected ':' before ')' token
7 | std::cout... |
s260964628 | p03807 | C++ | #include<cstdio>
int main()
{
int x,cnt=0;
scanf("%d",&x);//直接忽略第一个数
while(~scanf("%d",&x))cnt+=x%2;
printf("%s\n",(cnt%2?"NO","YES"));
return 0;
} | a.cc: In function 'int main()':
a.cc:7:40: error: expected ':' before ')' token
7 | printf("%s\n",(cnt%2?"NO","YES"));
| ^
| :
a.cc:7:40: error: expected primary-expression before ')' token
|
s778171250 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
vector<int> data(N);
for(int i = 0; i < N; i++){
cin >> data.at(i);
}
int sum = 0;
for(int i = 0; i < n; i++){
sum += data.at(i);
}
if(sum%2 == 0) cout << "YES" << endl;
else cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:12:22: error: 'n' was not declared in this scope
12 | for(int i = 0; i < n; i++){
| ^
|
s729025901 | p03807 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int n,a[100001],ans=0;。
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
ans+=a[i];
}
if(ans%2==0)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
} | a.cc:4:23: error: extended character 。 is not valid in an identifier
4 | int n,a[100001],ans=0;。
| ^
a.cc:4:23: error: '\U00003002' does not name a type
4 | int n,a[100001],ans=0;。
| ^~
|
s932178894 | p03807 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void){
int n,a[200000];
int even=0;
scanf("%d",&n);
for(count=1;count<=n;count++){
scanf("%d",&a[count]);
}
for(count=1;count<=n;count++){
if(a[count]%2==1){even++;}
}
if(even%2!=0){printf("NO");}
else{printf("YES");}
}
| main.c: In function 'main':
main.c:8:5: error: 'count' undeclared (first use in this function)
8 | for(count=1;count<=n;count++){
| ^~~~~
main.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
|
s236198392 | p03807 | C++ | import java.util.*;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;
public class Main {
public static void main(String[] args) {
int i,j;
Scanner sc = new Scanner(in);
int n = parseInt(sc.next());
int[] a = new int[n];
int ... | 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 static java.lang.Integer.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodul... |
s970151108 | p03807 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long
using namespace std;
int main(){
int n;cin>>n;
int ec=0;oc=0;
rep(i,n){
int t;cin>>t;
if(t%2==0)ec++;
else oc++;
}
if(oc%2 && ec>0) cout<<"NO"<<endl;
else cout<<"YES"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: 'oc' was not declared in this scope; did you mean 'ec'?
10 | int ec=0;oc=0;
| ^~
| ec
|
s949026820 | p03807 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int a,d=0;
cin>>a;
vector<int>s(a);
for(int i=0;i<a;i++){
cin>>s[i];
if(s[i]%2==1)d++;
}
if(b%2==0)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:15: error: 'i\U0000ff1ca' was not declared in this scope
8 | for(int i=0;i<a;i++){
| ^~~~
a.cc:12:7: error: 'b' was not declared in this scope
12 | if(b%2==0)cout<<"YES"<<endl;
| ^
|
s501571447 | p03807 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int a,d=0;
cin>>a;
vector<int>s(a);
for(int i=0;i<a;i++){
cin>>s[i];
if(s[i]%2==1)d++;
}
if(b%2==0)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:15: error: 'i\U0000ff1ca' was not declared in this scope
8 | for(int i=0;i<a;i++){
| ^~~~
a.cc:8:24: error: '\U0000ff5b' was not declared in this scope
8 | for(int i=0;i<a;i++){
| ^~
a.cc:10:10: error: 'i' was not declar... |
s234460138 | p03807 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int a,d=0;
vector<int>s(a);
for(int i=0;i<a;i++){
cin>>s[i];
if(s[i]%2==1)d++;
}
if(b%2==0)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: 'i\U0000ff1ca' was not declared in this scope
7 | for(int i=0;i<a;i++){
| ^~~~
a.cc:7:24: error: '\U0000ff5b' was not declared in this scope
7 | for(int i=0;i<a;i++){
| ^~
a.cc:9:10: error: 'i' was not declare... |
s316086613 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int count = 0;
for(int i = 0; i < n; i++){
cin >> a;
if(a % 2 == 1) count++;
}
if(count % 2 == 0){
cout << "YES";
}else{
cout << "NO";
}
} | a.cc: In function 'int main()':
a.cc:9:12: error: 'a' was not declared in this scope
9 | cin >> a;
| ^
|
s840139825 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int count = 0;
for(int i = 0; i < n; i++){
cin >> a;
(a % 2 == 1) count++;
}
if(count % 2 == 0){
cout << "YES";
}else{
cout << "NO";
}
} | a.cc: In function 'int main()':
a.cc:9:12: error: 'a' was not declared in this scope
9 | cin >> a;
| ^
|
s603969553 | p03807 | C++ | #include <bits/stdc++.h>
typedef long long ll;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, m, n) for(int i = m;i < n;i++)
using namespace std;
int gcd(int a, int b) {
if (b==0) return a;
else return gcd(b, a%b);
}
int lcm(int a, int b) {
return a * b / gcd(a, b);
}
int main(){
ll N;
... | a.cc: In function 'int main()':
a.cc:23:17: error: 'cint' was not declared in this scope; did you mean 'uint'?
23 | cint>>A[i];
| ^~~~
| uint
|
s682433484 | p03807 | C++ | #include"bits/stdc++.h"
#include"math.h"
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
int main(){
int n; cin >> n;
vector<int> a(n);
rep(i,n) cin >> a[i];
vector<int> b(n);
int c=0;
rep(i,n) b[i]=a[i]%2;c+=b[i];
if(c%2==0)cout << "YES" << endl;
else cout << "NO" << en... | a.cc: In function 'int main()':
a.cc:12:29: error: 'i' was not declared in this scope
12 | rep(i,n) b[i]=a[i]%2;c+=b[i];
| ^
|
s806244218 | p03807 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<cstdio>
#include<cmath>
#include<numeric>
#include<queue>
#include<stack>
#include<cstring>
#include<limits>
#include<functional>
#include<unordered_set>
#define rep(i,a) for(int i=(int)0;i<(int)a;++i)
#define ... | a.cc: In function 'void solve()':
a.cc:59:12: error: 'x' was not declared in this scope
59 | cin>>x;
| ^
|
s446340349 | p03807 | C++ | #include<bits/stdc++.h>
#definr rep(i,n) for(int i=0;i<(n);++i)
using namespace std;
int main(){
int n,odd = 0,even = 0;cin >> n;
rep(i,n){int a;cin >> a;if(a%2 == 0)even += 1;else odd += 1;}
if(even*2 == odd)cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
} | a.cc:2:2: error: invalid preprocessing directive #definr; did you mean #define?
2 | #definr rep(i,n) for(int i=0;i<(n);++i)
| ^~~~~~
| define
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
7 | rep(i,n){int a;cin >> a;if(a%2 == 0)even += 1;else odd += 1;}
... |
s069960175 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void){
int n,f;
cin >> n;
for(int i=0;i<n;i++){
cin >> f >> s;
if(f%2==1) count++;
}
if(count%2==1){
cout << "NO" << endl;
}
else{
cout << "YES" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:17: error: 's' was not declared in this scope
8 | cin >> f >> s;
| ^
a.cc:9:21: error: no post-increment operator for type
9 | if(f%2==1) count++;
| ^~
a.cc:11:11: error: invalid operands of types '<unresolved overloa... |
s233786104 | p03807 | C | #include<stdio.h>
int main(){
int odd=0,even=0,tmp,N;
scanf("%d",&N);
for(i=0;i<N;i++){
scanf("%d",&tmp);
if(tmp%2 == 0)
even++;
else
odd++;
}
if(odd%2==1){
puts("NO");
return 0;
}
even+=(odd/2);
if(even%2==0)
puts("YES");
else
puts("NO");
return 0;
}
| main.c: In function 'main':
main.c:6:7: error: 'i' undeclared (first use in this function)
6 | for(i=0;i<N;i++){
| ^
main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
|
s585691429 | p03807 | C++ |
#define INF LLONG_MAX
#define ll long long
#define ull unsigned long long
#define rep(i,n) for(int i=0; i<n; ++i)
#define MOD 1000000007
using namespace std;
#include<stdio.h>
template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) { i... | a.cc:11:13: error: variable or field 'cinV' declared void
11 | inline void cinV(string &a){char buf[100000000]; scanf("%s", buf); a = buf;}
| ^~~~
a.cc:11:18: error: 'string' was not declared in this scope
11 | inline void cinV(string &a){char buf[100000000]; scanf("%s", buf); a = buf;}
| ... |
s931737883 | p03807 | C++ |
#define INF LLONG_MAX
#define ll long long
#define ull unsigned long long
#define rep(i,n) for(int i=0; i<n; ++i)
#define MOD 1000000007
using namespace std;
template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) { if(a<b) {a=b; retur... | a.cc:10:13: error: variable or field 'cinV' declared void
10 | inline void cinV(string &a){char buf[100000000]; scanf("%s", buf); a = buf;}
| ^~~~
a.cc:10:18: error: 'string' was not declared in this scope
10 | inline void cinV(string &a){char buf[100000000]; scanf("%s", buf); a = buf;}
| ... |
s237922054 | p03807 | C++ | package main
import (
"bufio"
"fmt"
"io"
"math"
"os"
"strconv"
"strings"
)
func main() {
solve(os.Stdin, os.Stdout)
}
type ReaderEx struct {
baseScanner *bufio.Scanner
words []string
nextWordIdx func() int
initWordIdx func()
}
func NewScannerEx(stdin io.Reader) *ReaderEx {
var this ReaderEx
var... | a.cc:1:1: error: 'package' does not name a type
1 | package main
| ^~~~~~~
a.cc:18:1: error: 'type' does not name a type; did you mean 'typeof'?
18 | type ReaderEx struct {
| ^~~~
| typeof
a.cc:25:1: error: 'func' does not name a type
25 | func NewScannerEx(stdin io.Reader) *ReaderEx {
... |
s265042543 | p03807 | C++ | #include <bits/stdc++.h>
#define INF LLONG_MAX
#define ll long long
#define ull unsigned long long
#define rep(i,n) for(int i=0; i<n; ++i)
#define MOD 1000000007
using namespace std;
template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;}
template<class T> inline bool chmax(T& a, T ... | a.cc: In function 'void cinV(std::string&)':
a.cc:10:38: error: conversion from 'long double' to 'long unsigned int' in a converted constant expression
10 | inline void cinV(string &a){char buf[1E11L]; scanf("%s", buf); a = buf;}
| ^~~~~
a.cc:10:38: error: could not convert... |
s573375591 | p03807 | C++ | #include <bits/stdc++.h>
#define INF LLONG_MAX
#define ll long long
#define ull unsigned long long
#define rep(i,n) for(int i=0; i<n; ++i)
#define MOD 1000000007
using namespace std;
template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;}
template<class T> inline bool chmax(T& a, T ... | a.cc: In function 'void cinV(std::string&)':
a.cc:10:38: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
10 | inline void cinV(string &a){char buf[1E11]; scanf("%s", buf); a = buf;}
| ^~~~
a.cc:10:38: error: could not convert '1.0e+... |
s580824437 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i, n) for(int i=0; i<n; i++)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
c... | a.cc: In function 'int main()':
a.cc:13:5: error: 'itn' was not declared in this scope; did you mean 'int'?
13 | itn N;
| ^~~
| int
a.cc:14:12: error: 'N' was not declared in this scope
14 | cin >> N;
| ^
|
s476327755 | p03807 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vel;
typedef vector<int> vei;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> ve_vel;
typedef v... | a.cc: In function 'int main()':
a.cc:78:2: error: expected '}' at end of input
78 | }
| ^
a.cc:38:11: note: to match this '{'
38 | int main(){
| ^
|
s972398259 | p03807 | C++ | #include<iostream>//C++头文件
#include<algorithm>//标准头文件
#include<Hatsune_Miku>//AC头文件
using namespace std;
int n,a[100001],ans=0;//根据题意定义,都在int范围内,ans用来记录和。
int main(){
cin>>n;//读入n
for(int i=1;i<=n;i++){
cin>>a[i];
ans+=a[i];//记录总数值
}
if(ans%2==0)cout<<"YES"<<endl;//满足题意,输出YES换行。
els... | a.cc:3:9: fatal error: Hatsune_Miku: No such file or directory
3 | #include<Hatsune_Miku>//AC头文件
| ^~~~~~~~~~~~~~
compilation terminated.
|
s699125673 | p03807 | C++ | #include<iostream>
using namespace std;
iont n,cnt;
int main(){
ios::sync_with_stdio(0);
cin>>n;
for(int i=1;i<=n;i++){
int a;
cin>>a;
cnt += (a&1);
}
puts((cnt&1)?"NO":"YES");
return 0;
}
| a.cc:4:1: error: 'iont' does not name a type; did you mean 'int'?
4 | iont n,cnt;
| ^~~~
| int
a.cc: In function 'int main()':
a.cc:7:14: error: 'n' was not declared in this scope
7 | cin>>n;
| ^
a.cc:11:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
... |
s066599827 | p03807 | C++ | #include <bits/stdc++.h>
#define rep(i,a,b) for(ll i=ll(a);i<ll(b);i++)
#define irep(i,a,b) for(ll i=ll(a);i>=ll(b);i--)
using ll = long long;
using namespace std;
ll GCD(ll a, ll b) { return b ? GCD(b, a%b) : a; }
//sort(a, a + N, greater<ll>()) // descend
//sort(a, a+N) // ascend
/*
void comb... | a.cc: In function 'int main()':
a.cc:41:22: error: expected primary-expression before ')' token
41 | if(even%2==1))cout<<"NO";
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.