submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s674892065 | p01314 | Java | import java.util.Scanner;
public class Main2 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int count = 0;
int ans = 0;
while (true) {
int num = s.nextInt();
num = num * 2;
for (int a = 1; a < num; a++) {
for (int i = 2; i + a < num; i++) {
ans = (i + a) * (... | Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s223300739 | p01314 | C | #include <iostream>
using namespace std;
const int N = 1000;
int sum[N];
int main(){
int n, c;
for(int i = 0;i < N;++i){
if (i) sum[i] = sum[i - 1] + (i + 1);
else sum[i] = i + 1;
}
while(cin >> n, n) {
c = 0;
for(int i = 2;i < N;++i){
for(int j = 0;j < i - 1;++j){
c += (sum[i] - sum[j] == n);
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s640689796 | p01314 | C | #include <stdio.h>
int main() {
int n,i,sum,k;
int j;
while(1) {
sum = 0;
k = 0;
scanf("%d",&n);
if(n == 0) break;
for(j=1;j<=n;j++) {
sum = 0;
for(i=j;i<=n;i++) {
sum += i;
if(sum == n && i != n) k++;
else if(sum > n) i = n+1;
}
}
printf("%d\n",... | main.c: In function 'main':
main.c:28:3: error: expected declaration or statement at end of input
28 | }
| ^
|
s686534488 | p01314 | C | #include<stdio.h>
int gcd(int a, int b)
{
int c;
if (a < b) {
a+=b; b=a-b; a-=b;
}
while (b != 0) {
c = a % b;
a = b;
b = c;
}
return a;
}
int main(void)
{
int sum,i,j,count,N;
while(scanf("%d",&N)&&N!=0){
count=0;
sum=0;
for(i=1;i<=N;i++){
sum+=i;
if(sum>=N... | main.c: In function 'main':
main.c:35:1: error: 'jj' undeclared (first use in this function); did you mean 'j'?
35 | jj=j;
| ^~
| j
main.c:35:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:36:1: error: 'nn' undeclared (first use in this function)
36 | ... |
s905147572 | p01314 | C | #include<stdio.h>
int gcd(int a, int b)
{
int c;
if (a < b) {
a+=b; b=a-b; a-=b;
}
while (b != 0) {
c = a % b;
a = b;
b = c;
}
return a;
}
int main(void)
{
int sum,i,j,count,N;
while(scanf("%d",&N)&&N!=0){
count=0;
sum=0;
for(i=1;i<=N;i++){
sum+=i;
if(sum>=N... | main.c: In function 'main':
main.c:35:1: error: 'jj' undeclared (first use in this function); did you mean 'j'?
35 | jj=j;
| ^~
| j
main.c:35:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:36:1: error: 'nn' undeclared (first use in this function)
36 | ... |
s521390301 | p01314 | C | #include<stdio.h>
int sum(int m,int n)
{
int a;
a = (m+n-1) * (m+n) / 2 - (m-1) * m / 2 ;
return a ;
}
int main(void)
{
int i,j,a;
int n[1001]={0};
for(i=2;i<45;i++){
for(j=1;;j++){
n[sum(j,i)]++;
if(sum(j,i)>1001){
break;
}
}
}
while(1){
scanf("%d",&a);
... | main.c: In function 'main':
main.c:32:1: error: expected declaration or statement at end of input
32 | }
| ^
|
s477805807 | p01314 | C | include<stdio.h>
int main(void) {
int N, i, j, sum, count;
while(scanf("%d",&N),N) {
count = 0;
for(i = 1; i <= N/2; i++ ) {
sum = 0;
for(j = i; sum < N; j++) {
sum += j;
}
if(sum == N) count++;
}
printf("%d\n",count);
}
return(0);
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s896836357 | p01314 | C | #include <stdio.h>
int main(){
long long n;
for(;~scanf("%lld",&n)&&n;){
long long r=0;
int i=2;
for(;;i++){
long long x=n-(long long)i*(i-1)/2;
if(x<i)break;
if(x%i==0)r++i;
}
printf("%lld\n",r);
}
return 0;
} | main.c: In function 'main':
main.c:10:38: error: expected ';' before 'i'
10 | if(x%i==0)r++i;
| ^
| ;
|
s349580815 | p01314 | C | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(void){
while(true){
int n;
int sum;
int count = 0;
cin >> n;
if(n == 0)break;
int a[n + 1];
for(int i = 1; i <= n; i ++){
a[i] = i;
}
for(int i = 1; i < n; i++){
for(int j = 0; j < n-i; j++){
sum = 0;
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s159296967 | p01314 | C | Sum of Consecutive Integers (AOJ 2197) by danny7z
Contest: 387 RunID: 353485 Status: Wrong Answer Date: Mon Mar 05 21:39:41 JST 2012
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdio.h>
int main() {
int sep, n, i, j, count;
while(1) ... | main.c:1:1: error: unknown type name 'Sum'
1 | Sum of Consecutive Integers (AOJ 2197) by danny7z
| ^~~
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Consecutive'
1 | Sum of Consecutive Integers (AOJ 2197) by danny7z
| ^~~~~~~~~~~
main.c:1:8: error: unknown type n... |
s932462796 | p01314 | C | #include <iostream>
using namespace std;
int main(){
int n;
while(cin >> n && n){
int ret=0;
for(int i=2;i<=n;i++){
if(i%2==0){
if(n%i != 0 && n*2%i ==0 && (double)n/i-i/2>0) ret++;
}else{
if(n%i == 0 && n/i - i/2 > 0) ret++;
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s242169623 | p01314 | C++ | results = []
while True:
N = int(input())
if N == 0:
break
tmp = [0 for _ in range(N+1)]
res = 0
for i in range(1, N+1):
tmp[i] = tmp[i-1] + i
for i in range(1, N):
for j in range(i+2, N+1):
if tmp[j] - tmp[i] == N:
res +... | a.cc:1:1: error: 'results' does not name a type
1 | results = []
| ^~~~~~~
|
s114064597 | p01314 | C++ | #include<stdio.h>
int main(){
int n;
while(1){
scanf("%d",&n);if(n==0)break;
int c=0;
for(int i=0;i<(n/2+1);i++)
{int s=0;
for(int j=i;j<(n/2+1);j++)
s+=j;if(s==n){c++;break}
}
printf("%d\n",c);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before '}' token
12 | s+=j;if(s==n){c++;break}
| ^
| ;
|
s811359334 | p01314 | C++ | #include <iostream>
using namespace std;
int main (){
int N;
while (cin >> N && N > 0){
int sum = 0;
for (int i=1; i < N; i++){ //?¶?????§?????????°????¢???????
int s = i;
for (int j=s+1; s<N; j++) { //N??\?????????????????§??????????¶?????????????
s += j;
}
if (s == N)???//??´??£??... | a.cc:12:19: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
12 | if (s == N)???//??´??£??????N????????£??????????????????
a.cc: In function 'int main()':
a.cc:12:18: error: expected primary-expression before '?' token
12 | if (s == N)???//??´??£??????N????????£??????????????????
... |
s172632534 | p01314 | C++ | #include <bits/stdc++.h>
using namespace std;
int solve(int N) {
int ans = 0;
for (int i = 2; i <= N; ++i) {
for (int j = 1; j <= N; ++j) {
// j???????§??????£???i?????£?¶?????????´??°?????? == N -> ++ans
// j + (j+1) + ... + (j+i-1) == N -> ++ans
int sum = 0;
... | a.cc: In function 'int main()':
a.cc:30:24: error: expected ';' before '}' token
30 | }javascript:void(0)
| ^
| ;
31 | }
| ~
|
s439618417 | p01314 | C++ |
#include<iostream>
using namespace std;
int main()
{
while(1){
int N,m,ans;
cin>>N;
if(N==0)
break;
for(m=0;m<N;m++){
int t=m;
for(int j=0;;j++){
t+=(i+j);
if(t>=n){
if(t==n)ans++;
... | a.cc: In function 'int main()':
a.cc:15:21: error: 'i' was not declared in this scope
15 | t+=(i+j);
| ^
a.cc:16:23: error: 'n' was not declared in this scope
16 | if(t>=n){
| ^
|
s276332343 | p01314 | C++ |
#include<iostream>
using namespace std;
int main()
{
while(1){
int N,m,ans;
cin>>N;
if(N==0)
break;
for(m=0;m<N;m++){
int t=m;
for(int j=0;;j++){
t+=(i+j);
if(t>=n){
if(t==n)ans++;
... | a.cc: In function 'int main()':
a.cc:15:21: error: 'i' was not declared in this scope
15 | t+=(i+j);
| ^
a.cc:16:23: error: 'n' was not declared in this scope
16 | if(t>=n){
| ^
|
s314118973 | p01314 | C++ | error | a.cc:1:1: error: 'error' does not name a type
1 | error
| ^~~~~
|
s137551134 | p01314 | C++ |
#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
#define ll long long
#define ull unsigned ll
typedef long double ld;
#define SQR(X) ( (X)*(X) )
#define CUBE(X) ( (X)*(X)*(X) )
#define ALL(a) (a).begin(),(a).end()
#define ifnot(a) if(not a)
#define dump(x) cerr << #x << " ... | a.cc: In function 'int main()':
a.cc:61:9: error: 'c' was not declared in this scope
61 | c
| ^
a.cc:61:10: error: expected '}' at end of input
61 | c
| ^
a.cc:49:12: note: to match this '{'
49 | while(1) {
| ^
a.cc:61:10: error: expected '}' at e... |
s852585611 | p01314 | C++ |
#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
#define ll long long
#define ull unsigned ll
typedef long double ld;
#define SQR(X) ( (X)*(X) )
#define CUBE(X) ( (X)*(X)*(X) )
#define ALL(a) (a).begin(),(a).end()
#define ifnot(a) if(not a)
#define dump(x) cerr << #x << " ... | a.cc: In function 'int main()':
a.cc:61:9: error: 'c' was not declared in this scope
61 | c
| ^
a.cc:61:10: error: expected '}' at end of input
61 | c
| ^
a.cc:49:12: note: to match this '{'
49 | while(1) {
| ^
a.cc:61:10: error: expected '}' at e... |
s918996088 | p01314 | C++ | include <bits/stdc++.h>
using namespace std;
int x, temp, ct;
void sum(int n) {
if(n > x) return;
for(int i = n + 1; i < x; ++i) {
temp += i;
if(temp == x) {
++ct;
break;
} else if(temp > x) break;;
}
temp = 0;
sum( n + 1 );
}
int main() {
for(;;){
scanf("%d", &x);
if(x == ... | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:20:5: error: 'scanf' was not declared in this scope
20 | scanf("%d", &x);
| ^~~~~
a.cc:25:5: error: 'printf' was not declared in this scope
25 | printf("%d\n", ct)... |
s220875045 | p01314 | C++ | thisis72 | a.cc:1:1: error: 'thisis72' does not name a type
1 | thisis72
| ^~~~~~~~
|
s962593544 | p01314 | C++ |
#include <bits/stdc++.h>
using namespace std;
signed main() {
int n;
while (true) {
cin >> n;
if (n == 0) return 0;
auto sum = 0;
for (int i = 2;; i++) {
auto base = i * (i + 1) / 2;
if (base > n) break;
if ((base - n) % i == 0) sum++;
}
cout << sum << "
";
}
} | a.cc:16:20: warning: missing terminating " character
16 | cout << sum << "
| ^
a.cc:16:20: error: missing terminating " character
a.cc:17:1: warning: missing terminating " character
17 | ";
| ^
a.cc:17:1: error: missing terminating " character
17 | ";
| ^~
a.cc: In func... |
s855273112 | p01314 | C++ | import java.util.*;
public class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String[] args) throws Exception {
while (sc.hasNext()) {
solve();
}
}
private static void solve() {
int n = sc.nextInt();
if (n == 0) retu... | 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:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s335758703 | p01314 | C++ | ??????????????????//#define _GRIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
// ?????¬???????????¬??????
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#defin... | a.cc:1:17: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
1 | ??????????????????//#define _GRIBCXX_DEBUG
a.cc:1:1: error: expected unqualified-id before '?' token
1 | ??????????????????//#define _GRIBCXX_DEBUG
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
... |
s909611351 | p01314 | C++ | ????????????//#define _GRIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
// ?????¬???????????¬??????
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#define repi... | a.cc:1:11: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
1 | ????????????//#define _GRIBCXX_DEBUG
a.cc:1:1: error: expected unqualified-id before '?' token
1 | ????????????//#define _GRIBCXX_DEBUG
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
... |
s788756466 | p01314 | C++ | int main(void){
int n;
while(cin >> n){
if(n == 0) break;
int sum=0, dp[1001]={0};
for(int i=1; i<=n; i++){
sum = i;
for(int j=1; sum<n; j++){
sum += (i+j);
dp[sum]+=1;
}
}
cout << dp[n] <<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:3:11: error: 'cin' was not declared in this scope
3 | while(cin >> n){
| ^~~
a.cc:13:9: error: 'cout' was not declared in this scope
13 | cout << dp[n] <<endl;
| ^~~~
a.cc:13:25: error: 'endl' was not declared in this scope
13 | ... |
s121390687 | p01314 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s122815208 | p01314 | C++ | #include<string>
#include <iostream>
using namespace std;
//int w,h;
//int s_x,s_y,e_x,e_y;
//int pos[100][100]={0};
int n;
int main(){
while(true){
cin >>n;
if(n==0){
break;
}
int num=0;
for(int k=1;2*n-k*(k+1)>0;k++){
if((2*n-k*(k+1))%(2*(k+1))==0){
num++;
}
}
cout << num <<endl;
}... | a.cc:27:2: error: stray '#' in program
27 | }#include<string>
| ^
a.cc:27:3: error: 'include' does not name a type
27 | }#include<string>
| ^~~~~~~
a.cc:34:5: error: redefinition of 'int n'
34 | int n;
| ^
a.cc:8:5: note: 'int n' previously declared here
8 | int n;
| ^
a.... |
s971347811 | p01314 | C++ | る | a.cc:1:1: error: '\U0000308b' does not name a type
1 | る
| ^~
|
s768238706 | p01314 | C++ |
import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
public class Main {
int INF = 1 << 28;
//long INF = 1L << 62;
double EPS = 1e-10;
void run() {
Scanner sc = new Scanner(System.in);
int[] ans = new int[250000];
fo... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: ... |
s874916793 | p01315 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:43: error: not a statement
info[6]*info[7]*info[8]-info[0];
^
Main.java:47: error: not a statement
info[1]+info[2]+info[3]+(info[4]+info[5])*info[8];
^
2 errors
|
s309277553 | p01315 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:20: error: cannot find symbol
Crop[] cs=new Crops[n];
^
symbol: class Crops
location: class Main
1 error
|
s720233639 | p01315 | Java | import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
static class State implements Comparable<State>{
String name;
int cost;
State(String name, int cost){
this.name=name;
this.cost=cost;
}
public int compareTo(State s) {
... | Main.java:15: error: illegal character: '\u3000'
?return this.name.compareTo(s.name);
^
1 error
|
s452500319 | p01315 | Java | import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
static class State implements Comparable<State>{
String name;
int cost;
State(String name, int cost){
this.name=name;
this.cost=cost;
}
public int compareTo(State s) {
... | Main.java:15: error: illegal character: '\u3000'
?return this.name.compareTo(s.name);
^
1 error
|
s594304948 | p01315 | Java | import java.util.ArrayList;
import java.util.Scanner;
public class main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
doIt();
}
public static void doIt(){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n != 0){
ArrayList<Double> per = ne... | Main.java:4: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s727655951 | p01315 | C | #include<stdio.h>
#include<stdlib.h>
struct DAta{
char s[21];
double a;
}d[50];
int cmp(const void *a,const void *b){
struct DAta f,e;
f=*(struct DAta *)a;
e=*(struct DAta *)b;
if(f.a==e.a)return strcmp(f.s,e.s);
return f.a=e.a;
}
int main(void){
int n,i,j;
int p,s,m,a,b,c,d,e,f;
while(scanf... | main.c: In function 'cmp':
main.c:12:22: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
12 | if(f.a==e.a)return strcmp(f.s,e.s);
| ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcmp'
2 | #include<stdlib.h>
+++ |+#in... |
s722276540 | p01315 | C | #include<stdio.h>
#include<stdlib.h>
struct DAta{
char s[21];
double a;
}d[50];
int cmp(const void *a,const void *b){
struct DAta f,e;
f=*(struct DAta *)a;
e=*(struct DAta *)b;
if(f.a==e.a)return strcmp(f.s,e.s);
return f.a=e.a;
}
int main(void){
int n,i,j;
int p,s,m,a,b,c,d,e,f;
while(scanf... | main.c: In function 'cmp':
main.c:12:22: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
12 | if(f.a==e.a)return strcmp(f.s,e.s);
| ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcmp'
2 | #include<stdlib.h>
+++ |+#in... |
s545101578 | p01315 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct DAta{
char s[21];
double a;
}d[50];
int cmp(const void *a,const void *b){
struct DAta f,e;
f=*(struct DAta *)a;
e=*(struct DAta *)b;
if(f.a==e.a)return strcmp(f.s,e.s);
return f.a=e.a;
}
int main(void){
int n,i,j;
int p,s,m,a,b,c,d,e,... | main.c: In function 'main':
main.c:24:35: error: subscripted value is neither array nor pointer nor vector
24 | scanf("%s%d%d%d%d%d%d%d%d%d",d[i].s,&p,&a,&b,&c,&d,&e,&f,&s,&m);
| ^
main.c:25:6: error: subscripted value is neither array nor pointer nor vector
25 | d[... |
s252189587 | p01315 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct DAta{
char s[21];
double a;
}d[50];
int cmp(const void *a,const void *b){
struct DAta f,e;
f=*(struct DAta *)a;
e=*(struct DAta *)b;
if(f.a==e.a)return strcmp(f.s,e.s);
return f.a-e.a;
}
int main(void){
int n,i,j;
int p,s,m,a,b,c,d,e,... | main.c: In function 'main':
main.c:24:35: error: subscripted value is neither array nor pointer nor vector
24 | scanf("%s%d%d%d%d%d%d%d%d%d",d[i].s,&p,&a,&b,&c,&d,&e,&f,&s,&m);
| ^
main.c:25:6: error: subscripted value is neither array nor pointer nor vector
25 | d[... |
s368587159 | p01315 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct DAta{
char s[21];
double a;
}d[50];
int cmp(const void *a,const void *b){
struct DAta f,e;
f=*(struct DAta *)a;
e=*(struct DAta *)b;
if(f.a==e.a)return strcmp(f.s,e.s);
return f.a-e.a;
}
int main(void){
int n,i,j;
int p,s,m,a,b,c,d,e,... | main.c: In function 'main':
main.c:24:35: error: subscripted value is neither array nor pointer nor vector
24 | scanf("%s%d%d%d%d%d%d%d%d%d",d[i].s,&p,&a,&b,&c,&d,&e,&f,&s,&m);
| ^
main.c:25:6: error: subscripted value is neither array nor pointer nor vector
25 | d[... |
s469220517 | p01315 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct DAta{
char s[21];
double a;
}d[50];
int cmp(const void *a,const void *b){
struct DAta f,e;
f=*(struct DAta *)a;
e=*(struct DAta *)b;
if(f.a==e.a)return strcmp(f.s,e.s);
return f.a-e.a;
}
int main(void){
int n,i,j;
int p,s,m,a,b,c,d,e,... | main.c: In function 'main':
main.c:24:36: error: subscripted value is neither array nor pointer nor vector
24 | scanf("%s %d%d%d%d%d%d%d%d%d",d[i].s,&p,&a,&b,&c,&d,&e,&f,&s,&m);
| ^
main.c:25:6: error: subscripted value is neither array nor pointer nor vector
25 | ... |
s775328231 | p01315 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct DAta{
char s[21];
double a;
}d[50];
int cmp(const void *a,const void *b){
struct DAta f,e;
f=*(struct DAta *)a;
e=*(struct DAta *)b;
if(f.a==e.a)return strcmp(f.s,e.s);
return f.a-e.a;
}
int main(void){
int n,i,j;
int p,s,m,a,b,c,d,e,... | main.c: In function 'main':
main.c:24:26: error: subscripted value is neither array nor pointer nor vector
24 | scanf("%s %d%d%d%d",d[i].s,&p,&a,&b,&c);
| ^
main.c:26:6: error: subscripted value is neither array nor pointer nor vector
26 | d[i].a=((double)f*m*s-p)/(a+b+c+d+e... |
s165412767 | p01315 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct DAta{
char s[21];
double a;
}d[50];
int cmp(const void *a,const void *b){
struct DAta f,e;
f=*(struct DAta *)a;
e=*(struct DAta *)b;
if(f.a==e.a)return strcmp(f.s,e.s);
return f.a-e.a;
}
int main(void){
int n,i,j;
int p,s,m,a,b,c,d,e,... | main.c: In function 'main':
main.c:24:13: error: subscripted value is neither array nor pointer nor vector
24 | scanf("%s",d[i].s);
| ^
main.c:27:6: error: subscripted value is neither array nor pointer nor vector
27 | d[i].a=((double)f*m*s-p)/(a+b+c+d+e);
| ^
main.c:29:9: error: ... |
s354709410 | p01315 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
class crop{
public:
string name;
int price,seeding,youngL,L,flower,
fruit,numFruit,fruitPrice,times;
int StoL,sum,LtoFruit,totaltime;
crop();
crop(string name,int price,int seeding,int youngL,
int L,int flower,int fruit,
... | a.cc: In function 'int main()':
a.cc:73:5: error: 'sort' was not declared in this scope; did you mean 'short'?
73 | sort(C.begin(), C.end());
| ^~~~
| short
|
s580207027 | p01315 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
class crop{
public:
string name;
int price,seeding,youngL,L,flower,
fruit,numFruit,fruitPrice,times;
int StoL,sum,LtoFruit,totaltime;
crop();
crop(string name,int price,int seeding,int youngL,
int L,int flower,int fruit,
... | a.cc: In function 'int main()':
a.cc:49:5: error: 'sort' was not declared in this scope; did you mean 'short'?
49 | sort(C.begin(), C.end());
| ^~~~
| short
|
s122328394 | p01315 | C++ | #include "bits/stdc++.h"
#pragma warning(disable:4996)
using namespace std;
int main() {
while(1) {
int N; cin >> N;
vector<pair<string, long double>>pls;
for (int i = 0; i < N; ++i) {
string st;
int p, a, b, c, d, e, f, s, m; cin >> st>>p >> a >> b >> c >> d >> e >> f >> s >> m;
int initime = a + b ... | a.cc: In function 'int main()':
a.cc:17:43: error: expected primary-expression before 'long'
17 | long double eff = long double(money) / long double(initime + rooptime*(m - 1));
| ^~~~
|
s450454943 | p01315 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int INF = 1000000000;
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
#define rep(i,n) REP(i, 0, n)
typedef pair<double, string> P;
const double EPS = 1.0e9;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N;
wh... | a.cc: In function 'int main()':
a.cc:34:6: error: expected '}' at end of input
34 | }
| ^
a.cc:9:11: note: to match this '{'
9 | int main(){
| ^
|
s920247571 | p01315 | C++ | #include <bits/stdc++.h>
#define r(i,a,n) for(int i=a;i<n;++i)
using namespace std;
struct P{double x;string y;};
int main(){
int n;
while(cin>>n,n){
priority_queue<P>pp;
while(n--){double a,b,c,e,d,f,s,m,p;string st;P t;
cin>>st>>p>>a>>b>>c>>d>>e>>f>>s>>m;
double dd=(f*m*s-p)/(a+b+c+d+e)+(e)*(m-... | a.cc: In function 'int main()':
a.cc:12:31: error: expected ';' before 'pp'
12 | t.x=dd;t.y=st;pp.push(t)pp.push(t);
| ^~
| ;
In file included from /usr/include/c++/14/string:49,
from /usr/include/c++/14/bitset:52,
... |
s426552855 | p01315 | C++ | #include <bits/stdc++.h>
#define r(i,a,n) for(int i=a;i<n;++i)
using namespace std;
struct P{double x;string y;};
int main(){
int n;
while(cin>>n,n){
priority_queue<P>pp;
while(n--){double a,b,c,e,d,f,s,m,p;string st;P t;
cin>>st>>p>>a>>b>>c>>d>>e>>f>>s>>m;
double dd=(f*m*s-p)/(a+b+c+d+e)+(e)*(m-... | In file included from /usr/include/c++/14/string:49,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/stl_function.h: In instantiation of 'constexpr bool std::less<_Tp>::operator()(con... |
s995760236 | p01315 | C++ | #include <bits/stdc++.h>
#define r(i,a,n) for(int i=a;i<n;++i)
using namespace std;
struct P{double x;string y;};
int main(){
int n;
while(cin>>n,n){
priority_queue<P>pp;
while(n--){double a,b,c,e,d,f,s,m,p;string st;P t;
cin>>st>>p>>a>>b>>c>>d>>e>>f>>s>>m;
double dd=(f*m*s-p)/(a+b+c+d+e)+(e)*(m-... | In file included from /usr/include/c++/14/string:49,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/stl_function.h: In instantiation of 'constexpr bool std::less<_Tp>::operator()(con... |
s757271078 | p01315 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
while(cin>>n,n){
string st;
vector<pair<double,string> >v;
while(n--){
int p,a,b,c,d,e,f,s,m;
cin>>str>>p>>a>>b>>c>>d>>e>>f>>s>>m;
v.push_back(make_pair(-(double)(s*f*m-p)/(a+b+c+(d+e)*m),str));
}sort(v.begin(),v.end());
for(int i... | a.cc: In function 'int main()':
a.cc:10:10: error: 'str' was not declared in this scope; did you mean 'st'?
10 | cin>>str>>p>>a>>b>>c>>d>>e>>f>>s>>m;
| ^~~
| st
|
s237763179 | p01315 | C++ | #include <iostream>
#include <utility>
#include <string>
#include <vector>
using namespace std;
int main(){
int N, p, a, b, c, d, e, f, s, m;
string l;
double t;
while (cin >> N, N){
vector< pair<double, string> > V;
for (int i = 0; i < N; ++i){
cin >> l >> p >> a >> b >> c >> d >> e >> f >> s >> ... | a.cc: In function 'int main()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(V.begin(),V.end());
| ^~~~
| short
|
s758299981 | p01315 | C++ | #include <iostream>
#include <vector>
#include <utility>
#include <string>
using namespace std;
int main(){
while(true){
int n;
cin >> n;
if(n == 0)
break;
vector< pair<double, string> > v(n);
for(int i=0; i<n; i++){
string l;
int... | a.cc: In function 'int main()':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(v.begin(), v.end());
| ^~~~
| short
|
s419761124 | p01315 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
#define REP(i, n) for(int i=0; i<n; i++)
string L[100];
double P[100];
int A[100];
int B[100];
int C[100];
int D[100];
int E[100];
int F[100];
double S[100];
int M[100];
int t[100];
double profit[100];
double eff[100];
int main(){
while(... | a.cc: In function 'int main()':
a.cc:46:9: error: 'sort' was not declared in this scope; did you mean 'short'?
46 | sort(output.begin(), output.end());
| ^~~~
| short
|
s838074774 | p01315 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <string>
using namespace std;
int main() {
int n;
while(cin >> n, n) {
vector< pair< int, string > > ans;
for(int i = 0; i < n; i++) {
string str;
int p, a, b, c, d, e, f, s, m;
cin >> str >> p >... | a.cc: In function 'int main()':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(ans.begin(), ans.end());
| ^~~~
| short
|
s513661482 | p01315 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, string> P;
vector<pair<int, string> > v;
bool comp(P lhs, P rhs){
if(lhs.first != rhs.first) return lhs.first > rhs.first;
return lhs.second < rhs.second;
}
int main(){
while(1){ strt
int n;
cin >> n;
if(n == 0) break;
for(int i = 0; i < n; i++){
... | a.cc: In function 'int main()':
a.cc:13:17: error: 'strt' was not declared in this scope; did you mean 'sqrt'?
13 | while(1){ strt
| ^~~~
| sqrt
a.cc:15:16: error: 'n' was not declared in this scope; did you mean 'yn'?
15 | cin >> n;
| ... |
s586220443 | p01315 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
bool cmp(pair<double,string> a, pair<double,string> b){
if( a.first > b.first ) return true;
else if( a.first < b.first ) return false;
return a.second < b.second;
}
int main(){
int n,A,B,C,D,E,F,S,M,P;
string name;
while(cin>>n,n){
... | a.cc: In function 'int main()':
a.cc:21:17: error: 'sort' was not declared in this scope; did you mean 'short'?
21 | sort(vp.begin(),vp.end(),cmp);
| ^~~~
| short
|
s977159649 | p01315 | C++ | #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int N;
double p,a,b,c,d,e,f,s,m,ef;
string l;
int main(){
while... | a.cc:49:5: error: redefinition of 'int N'
49 | int N;
| ^
a.cc:16:5: note: 'int N' previously declared here
16 | int N;
| ^
a.cc:50:8: error: redefinition of 'double p'
50 | double p,a,b,c,d,e,f,s,m,ef;
| ^
a.cc:17:8: note: 'double p' previously declared here
17 | double p,a... |
s240718144 | p01315 | C++ | #include<iostream>
#include<functional>
#include<string>
#include<vector>
#include<map>
using namespace std;
typedef pair<double,string> P;
struct edge{
double cost;
string st;
};
int cmp(const edge &a,const edge &b){
if(a.cost!=b.cost)
return a.cost>b.cost;
else return a.st<b.st;
}
int main(){
string str;
int n... | a.cc: In function 'int main()':
a.cc:31:17: error: 'sort' was not declared in this scope; did you mean 'short'?
31 | sort(mp.begin(),mp.end(),cmp);
| ^~~~
| short
|
s778494129 | p01315 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
using namespace std;
#define EPS 1e-9
typedef pair<string, double> PD;
bool compare(PD a, PD b){
double c = a.second - b.second;
if(abs(c) < EPS){
if(a.first < b.first) return true;
else return false;
}
if(c <... | a.cc: In function 'int main()':
a.cc:37:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
37 | sort(fruits.begin(), fruits.end(), compare);
| ^~~~
| sqrt
|
s227876527 | p01315 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <map>
#include <string>
using namespace std;
typedef pair<double, string> crop;
class lesser {
public:
bool operator()(const crop r, const crop l) {
if (r.first > l.first)
return true;
else if (r.first < l.first)
... | a.cc: In function 'int main()':
a.cc:41:9: error: 'sort' was not declared in this scope; did you mean 'short'?
41 | sort(l.begin(), l.end(), lesser());
| ^~~~
| short
|
s408109203 | p01316 | C | include<stdio.h>
#define INF 1000000000
typedef struct{
int val;
int sum;
} data;
data dp[16][20000];
int main(void){
int n,m,i,j,k,c[16],x[20000],min;
data tmp;
while(scanf("%d %d",&n,&m)!=0 && n!=0 && m!=0){
for(i=0;i<m;i++){
scanf("%d",&c[i]);
}
for(i=0;i<n;i++){
scanf("%d",&x[i]);
}
for(i=0... | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
main.c:8:3: warning: data definition has no type or storage class
8 | } data;
| ^~~~
main.c:8:3: error: type defaults to 'int' in declaration of 'data' [-Wimplicit-int]
main.c:10:1:... |
s279548482 | p01316 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
inline int adj(int x) {
return min(max(x, 0), 255);
}
#define SQ(x) ((x)*(x))
int main() {
int N, M, INF=1<<28;
while(cin >> N >> M && (N|M)) {
int C[M];
for(int i=0; i<M; i++) cin >> C[i];
int dp[2][256]; fill(dp[0], dp[0]+512, INF);
... | a.cc: In function 'int main()':
a.cc:16:13: error: incompatible types in assignment of 'int' to 'int [256]'
16 | dp[128] = 0;
| ~~~~~~~~^~~
a.cc:21:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
21 | if(dp[i]>=INF) continue;
| ~~~~~^~~~~
|
s242612816 | p01316 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
inline int adj(int x) {
return min(max(x, 0), 255);
}
#define SQ(x) ((x)*(x))
int main() {
int N, M, INF=1<<28;
while(cin >> N >> M && (N|M)) {
int C[M];
for(int i=0; i<M; i++) cin >> C[i];
int dp[2][256]; fill(dp[0], dp[0]+512, INF);
... | a.cc: In function 'int main()':
a.cc:21:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
21 | if(dp[i]>=INF) continue;
| ~~~~~^~~~~
|
s499356074 | p01316 | C++ | 2 7
4
2
1
0
-1
-2
-4
131
137
2 7
4
2
1
0
-1
-2
-4
131
123
10 7
-4
-2
-1
0
1
2
4
132
134
135
134
132
128
124
122
121
122
5 1
255
0
0
0
0
0
4 1
0
255
0
255
0
0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 2 7
| ^
|
s297451041 | p01316 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int c[30],x[30000];
int dp[300000][256];
int sq(int x) {
return x*x;
}
int add(int x, int y) {
return max(0, min(255, x+y));
}
int main(void) {
while(1) {
int n,m;
scanf("%d%d",&n,&m);
if(!n) break;
... | a.cc:50:5: error: redefinition of 'int c [30]'
50 | int c[30],x[30000];
| ^
a.cc:6:5: note: 'int c [30]' previously declared here
6 | int c[30],x[30000];
| ^
a.cc:50:11: error: redefinition of 'int x [30000]'
50 | int c[30],x[30000];
| ^
a.cc:6:11: note: 'int x [30000]' pre... |
s236069174 | p01316 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int c[30],x[30000];
int dp[300000][256];
int sq(int x) {
return x*x;
}
int add(int x, int y) {
return max(0, min(255, x+y));
}
int main(void) {
while(1) {
int n,m;
scanf("%d%d",&n,&m);
if(!n) break;
... | a.cc:50:5: error: redefinition of 'int c [30]'
50 | int c[30],x[30000];
| ^
a.cc:6:5: note: 'int c [30]' previously declared here
6 | int c[30],x[30000];
| ^
a.cc:50:11: error: redefinition of 'int x [30000]'
50 | int c[30],x[30000];
| ^
a.cc:6:11: note: 'int x [30000]' pre... |
s095163486 | p01316 | C++ | #include <iostream>
#include <vector>
#include <cmath>
#define INF INT32_MAX
using namespace std;
int main(void) {
cout << INF << endl;
int N,M;
while (cin >> N >> M, N) {
vector<int> C(M);
for (int i = 0; i < M; ++i) {
cin >> C[i];
}
vector<int> x(N);
for (int i = 0; i < N; ++i) {
cin >> x[i];
}... | a.cc: In function 'int main()':
a.cc:4:13: error: 'INT32_MAX' was not declared in this scope
4 | #define INF INT32_MAX
| ^~~~~~~~~
a.cc:9:17: note: in expansion of macro 'INF'
9 | cout << INF << endl;
| ^~~
a.cc:4:1: note: 'INT32_MAX' is defined in header '<cstdin... |
s665332624 | p01316 | C++ | #include <iostream>
#include <algorithm>
#include <climits>
int c[16];
int x[20001];
int dp[256][20001];
int main() {
int n, m;
while (std::cin >> n >> m && (n || m)) {
std::memset(dp, 0xff, sizeof(dp));
for (int i = 0; i < m; i++) std::cin >> c[i];
for (int i = 0; i < n; i++) std::cin >> x[i + 1];
dp[128]... | a.cc: In function 'int main()':
a.cc:12:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
12 | std::memset(dp, 0xff, sizeof(dp));
| ^~~~~~
| wmemset
|
s178379914 | p01316 | C++ | #include<cstdlib>
#include<algorithm>
using namespace std;
const long long inf=1LL<<60;
long long memo[20000][256];
int main()
{
for(int n,m;scanf("%d%d",&n,&m),n;){
int c[16];
static int x[20001];
for(int i=0;i<m;i++) scanf("%d",c+i);
for(int i=0;i<n;i++) scanf("%d",x+i);
for(int i=0;i<=n;i++)for(int j=... | a.cc: In function 'int main()':
a.cc:11:21: error: 'scanf' was not declared in this scope
11 | for(int n,m;scanf("%d%d",&n,&m),n;){
| ^~~~~
a.cc:33:17: error: 'printf' was not declared in this scope
33 | printf("%lld\n",emin);
| ^~~~~~
a.cc:3... |
s907008208 | p01316 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
unsigned int errorSum[2][256];
bool concerning[2][256];
short samples[20001];
int codeBook[16];
int main() {
int n, m;
while(true) {
cin >> n >> m;
if (n == 0 && m == 0) {
break;
}
for (int i = 0; i < m; i++) {
cin >> code... | a.cc: In function 'int main()':
a.cc:30:59: error: 'INT32_MAX' was not declared in this scope
30 | errorSum[0][i] = errorSum[1][i] = INT32_MAX;
| ^~~~~~~~~
a.cc:4:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is pro... |
s085722922 | p01316 | C++ | #include<iostream>
#include<algorithm>
#define INF 100000000
using namespace std;
int main(){
int n,m,dp[20][260],cb[20],input[20001];//now,now
int temp;
while(cin>>n>>m,n||m){
memset(dp,-1,sizeof(dp));
for(int i=0;i<m;i++)
cin>>cb[i];
for(int i=0;i<n;i++){
cin>>input[i];
}
for(int i=0;i<=n;i++)
f... | a.cc: In function 'int main()':
a.cc:9:17: error: 'memset' was not declared in this scope
9 | memset(dp,-1,sizeof(dp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
+++ ... |
s796295290 | p01316 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
#define FOR(i,a,n) for(int i=a;i<n;i++)
#define REP(i,n) FOR(i,0,n)
typedef vector<int> vi;
typedef vector<vi> vii;
int main(){
int n,m;
while(cin>>n>>m,n&&m){
vi c(m),x(n);
REP(i,m){
cin>>c[i];
}
REP(i,n){
ci... | a.cc: In function 'int main()':
a.cc:22:35: error: 'INT_MAX' was not declared in this scope
22 | vii dp(n+1,vi(256,INT_MAX));
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #... |
s846621139 | p01316 | C++ | #include<string>
#include <vector>
#include <stack>
#include <map>
#include<iostream>
#include <algorithm>
#include <functional>
using namespace std;
int n;
int m;
int price;
int a;
int b;
struct G{
string name;
double value;
};
bool operator>(const G& left, const G& right)
{
if(left.value>right.value){
return t... | a.cc: In function 'int main()':
a.cc:86:24: error: 'INT_MAX' was not declared in this scope
86 | int mi=INT_MAX;
| ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
7 | #include <functional>
+... |
s990289177 | p01316 | C++ | #include <iostream>
#include <string.h>
#include <algorithm>
#define N 50000
#define M 20
#define lengthof(x) (sizeof(x)/sizeof(*(x)))
int c[M];
int sum[256];
int bsum[256];
using namespace std;
int main(void)
{
int n,m;
int x;
int i1,i2,i3;
int minn;
int temp;
while(1){
cin>>n>>m;
if(n+m==0) break;
m... | a.cc: In function 'int main()':
a.cc:36:66: error: 'INT_MAX' was not declared in this scope
36 | fill((int*)sum,(int*)(sum+lengthof(sum)),INT_MAX);
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this... |
s076625017 | p01316 | C++ | #include <iostream>
using namespace std;
int main() {
int n,m;
while(cin >> n >> m, n) {
vector<int> code(m), value(n);
for (int i = 0; i < m; i++)
cin >> code[i];
for (int i = 0; i < n; i++)
cin >> value[i];
vector<vector<int> > dp(256, vector<int>(n + 1, 1000000000));
dp[0][128] = 0;
for (int i ... | a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
8 | vector<int> code(m), value(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>
... |
s519147251 | p01316 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n,m;
while(cin >> n >> m, n) {
vector<int> code(m), value(n);
for (int i = 0; i < m; i++)
cin >> code[i];
for (int i = 0; i < n; i++)
cin >> value[i];
vector<vector<int> > dp(256, vector<int>(n + 1, 1000000000));
dp[0][128... | a.cc: In function 'int main()':
a.cc:26:25: error: 'val' was not declared in this scope; did you mean 'value'?
26 | ans = min(ans, dp[n][val]);
| ^~~
| value
|
s810503908 | p01316 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n,m;
while(cin >> n >> m, n) {
vector<int> code(m), value(n);
for (int i = 0; i < m; i++)
cin >> code[i];
for (int i = 0; i < n; i++)
cin >> value[i];
vector<vector<int> > dp(256, vector<int>(n + 1, 1000... | a.cc: In function 'int main()':
a.cc:27:25: error: 'val' was not declared in this scope; did you mean 'value'?
27 | ans = min(ans, dp[n][val]);
| ^~~
| value
|
s880344236 | p01316 | C++ | #include <iostream>
#include <vector>
#include <numeric>
using namespace std;
const int INF = 1<<29;
int main(){
int n, m;
while(cin >> n >> m && (n|m)){
vector<int> C(m);
for(int i=0; i<m; i++) cin >> C[i];
vector<int> dp(256, INF);
dp[128] = 0;
while(n--) {
vector<int> next(256, ... | a.cc: In function 'int main()':
a.cc:34:14: error: 'min_element' was not declared in this scope
34 | cout << *min_element(dp.begin(), dp.end()) << endl;
| ^~~~~~~~~~~
|
s634390813 | p01316 | C++ | #include <iostream>
#include <vector>
#include <functional>
using namespace std;
const int INF = 1<<29;
int main(){
int n, m;
while(cin >> n >> m && (n|m)){
vector<int> C(m);
for(int i=0; i<m; i++) cin >> C[i];
vector<int> dp(256, INF);
dp[128] = 0;
while(n--) {
vector<int> next(25... | a.cc: In function 'int main()':
a.cc:34:14: error: 'min_element' was not declared in this scope
34 | cout << *min_element(dp.begin(), dp.end()) << endl;
| ^~~~~~~~~~~
|
s382060172 | p01317 | C | /*
* hujx.cpp
*
* Created on: 2015年5月21日
* Author: dell
*/
#include<stdio.h>
#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<iomanip>
#include<vector>
#include<time.h>
#include<queue>
#include<stack>
#include<iterator>
#include<math.h>
#include<stdlib.h>
#include<limits.h>... | main.c:8:9: fatal error: iostream: No such file or directory
8 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s498709925 | p01317 | C++ | #include<cstdio>
#include<utility>
#include<vector>
#include<queue>
#define MAX_N 200
using namespace std;
typedef pair<int,int>p;
typedef struct node
{
int p,n,b,c;
bool operator <(const node &a)const{ return c>a.c;};
}node;
vector<p> Sea[MAX_N],Land[MAX_N];
int N,M,R,des[1000];
int d[1005][205][205];
priority_queue... | a.cc: In function 'int dij()':
a.cc:37:9: error: 'memset' was not declared in this scope
37 | memset(d,0x77,sizeof(d));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<queue>
+++ |+#include <cstring>
... |
s615706407 | p01317 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int const MAX_N = 210;
int const MAX_R = 1010;
int const INF = 1<<29;
ll dpl[MAX_N][MAX_N];
ll dps[MAX_N][MAX_N];
ll dpall[MAX_R][MAX_N];
ll N, M;
int z[MAX_R];
int main() {
while(cin >> N >> M && (N|M)) {
for(int i=0; i<N; i++) {
dp... | a.cc: In function 'int main()':
a.cc:52:10: error: 'dp' was not declared in this scope; did you mean 'dup'?
52 | fill(dp[0], dp[0]+MAX_R*MAX_N, 0);
| ^~
| dup
a.cc:53:20: error: 'R' was not declared in this scope
53 | for(int i=1; i<R; i++) {
| ^
a.cc... |
s391921145 | p01317 | C++ | #include <bits/stdc++.h>
using namespace std;
int const MAX_N = 210;
int const INF = 1<<29;
int dl[MAX_N][MAX_N];
int ds[MAX_N][MAX_N];
int dp[MAX_R][MAX_N];
int z[MAX_R];
int N, M, R;
int main() {
while(cin >> N >> M && (N|M)) {
for(int i=0; i<N; i++) {
for(int j=i+1; j<N; j++) {
dl[x][y] = ... | a.cc:10:8: error: 'MAX_R' was not declared in this scope; did you mean 'MAX_N'?
10 | int dp[MAX_R][MAX_N];
| ^~~~~
| MAX_N
a.cc:11:7: error: 'MAX_R' was not declared in this scope; did you mean 'MAX_N'?
11 | int z[MAX_R];
| ^~~~~
| MAX_N
a.cc: In function 'int mai... |
s662944975 | p01317 | C++ | #include <bits/stdc++.h>
using namespace std;
int const MAX_R = 1010;
int const MAX_N = 210;
int const INF = 1<<29;
int dl[MAX_N][MAX_N];
int ds[MAX_N][MAX_N];
int dp[MAX_R][MAX_N];
int z[MAX_R];
int N, M, R;
int main() {
while(cin >> N >> M && (N|M)) {
for(int i=0; i<N; i++) {
for(int j=i+1; j<N; j+... | a.cc: In function 'int main()':
a.cc:20:12: error: 'x' was not declared in this scope
20 | dl[x][y] = dl[y][x] = INF;
| ^
a.cc:20:15: error: 'y' was not declared in this scope
20 | dl[x][y] = dl[y][x] = INF;
| ^
a.cc:23:10: error: 'x' was not declared in this s... |
s671198375 | p01317 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <map>
#include <algorithm>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
typedef int Weight;
struct Edge{
int src, dest; Weight weight;
//bool operator < (const Edge &rhs) const {return weight > rhs.weight;}
};
//(Edge){src, des... | a.cc: In function 'void dijkstra(Graph&, Array&, int)':
a.cc:26:28: error: 'INF' was not declared in this scope
26 | fill(d.begin(), d.end(), INF);
| ^~~
a.cc:29:3: error: 'priority_queue' was not declared in this scope
29 | priority_queue<P, vector<P>, greater<P> > que;
... |
s708955300 | p01317 | C++ | // AOJ 2200 (http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2200)
#include<cstdio>
#include<queue>
#include<vector>
#include<limits>
#define rep(i,a) for(int i=0;i<(a);++i)
const int MAX_N = 200, MAX_R = 1000, INF = std::numeric_limits<int>::max()>>4;
int N, M, R;
int land[MAX_N][MAX_N], sea[MAX_N][MAX_N];
... | a.cc: In function 'int main()':
a.cc:56:39: error: 'min_element' is not a member of 'std'; did you mean 'tuple_element'?
56 | printf( "%d\n", *std::min_element( dp[R-1], dp[R-1]+N ) );
| ^~~~~~~~~~~
| tuple_elemen... |
s945824598 | p01317 | C++ | //
// AOJ 2200 Mr. Rito Post Office
//
// Created by TaoSama on 2015-03-20
// Copyright (c) 2015 TaoSama. All rights reserved.
//
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#inc... | a.cc:70:20: error: unterminated comment
70 | /*//莉司-1髟?ュ仙屓蛻ー闊ケ蝨ィ逧? 蠑?飴蛻ーk髟?ュ占飴荳「蝨ィ驍」驥? 髯?キッ莉嗣蛻ーi髟?ュ? //荳我クェINF 蜿ッ閭ス蜉??縲ゅ?縲ゅ?縲?/
| ^
a.cc: In function 'int main()':
a.cc:69:44: error: expected statement at end of input
69 | for(int k =... |
s817225705 | p01317 | C++ | //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <... | a.cc:75:11: warning: trigraph ??- ignored, use -trigraphs to enable [-Wtrigraphs]
75 | ????????????--x, --y;
a.cc:91:11: warning: trigraph ??- ignored, use -trigraphs to enable [-Wtrigraphs]
91 | ????????????--RS[i];
a.cc:94:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
94 | ????????... |
s362979248 | p01317 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<bool> VB;
typedef vector<VB> VVB;
#define fst first;
#define snd second;
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(x) (x)... | a.cc: In function 'int solve()':
a.cc:49:18: error: 'V' was not declared in this scope; did you mean 'VI'?
49 | VVI dp(R, VI(V));
| ^
| VI
a.cc:50:12: error: invalid types 'int[int]' for array subscript
50 | dp[0][R[0]] = 0;
| ^
a.cc:56:22: er... |
s952591655 | p01317 | C++ | #include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <b... | a.cc: In function 'void mainmain()':
a.cc:96:24: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, int&)'
96 | #define mins(x,y) x=min(x,y)
| ~~~^~~~~
a.cc:111:47: note: in expansion of macro 'mins'
111 | ... |
s159367190 | p01317 | C++ | #include<iostream>
#include<vector>
#include<tuple>
#include<queue>
#include<functional>
#include<algorithm>
#include<string>
using namespace std;
#define WHITE 0
#define GRAY 1
#define BLACK 2
#define MAX_N 220
#define MAX_R 1020
#define INF 131211109876543210LL
priority_queue<tuple<long long, long long, long long>,... | a.cc: In function 'void _memset()':
a.cc:15:13: warning: overflow in conversion from 'long long int' to 'int' changes value from '131211109876543210' to '717663978' [-Woverflow]
15 | #define INF 131211109876543210LL
| ^~~~~~~~~~~~~~~~~~~~
a.cc:86:49: note: in expansion of macro 'INF'
86 | ... |
s519924506 | p01317 | C++ | #include <iostream>
#include <stdio.h>
#include <vector>
#include <queue>
#define min(a, b) ((a) < (b) ? (a) : (b))
#define inf 1e8
using namespace std;
int n, m, s[202][202], h[202][202], dp[202][202], l[202];
int main()
{
int i, j, k, x, y, z;
char c[2];
while (scanf("%d%d", &n, &m) && (n || m))
{
for (i = 1... | a.cc: In function 'int main()':
a.cc:64:33: error: 'min_element' was not declared in this scope
64 | printf("%d\n", *min_element(dp[m-1] + 1, dp[m-1] + n + 1));
| ^~~~~~~~~~~
|
s861412954 | p01317 | C++ | import java.util.Arrays;
import java.util.Scanner;
public class Main{
public static void main(String[] args)throws Exception{
new Main().solve();
}
void solve(){
Scanner sc=new Scanner(System.in);
while(true){
int n=sc.nextInt();//the number of cities
int m=sc.nextInt();//the number of paths
if(n==0&&... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Arrays;
| ^~~~~~
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.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-t... |
s091390746 | p01317 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long ll;
const ll inf=0x1f1f1f1f1f1f1f1f;.
const ll maxn=205;
ll land[maxn][maxn],sea[maxn][maxn],num[maxn*5],cost[maxn*5][maxn];
void init(int n)
{
memset(land,inf,sizeof(land));
m... | a.cc:7:33: error: expected unqualified-id before '.' token
7 | const ll inf=0x1f1f1f1f1f1f1f1f;.
| ^
a.cc:9:9: error: 'maxn' was not declared in this scope
9 | ll land[maxn][maxn],sea[maxn][maxn],num[maxn*5],cost[maxn*5][maxn];
| ^~~~
a.cc:9:15: error: 'maxn' ... |
s793971593 | p01317 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb push_back
#define all(x) (x).be... | a.cc: In function 'int main()':
a.cc:40:7: error: 'dist' was not declared in this scope
40 | dist[i][j]=INF;
| ^~~~
|
s980805821 | p01317 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb push_back
#define all(x) (x).be... | a.cc: In function 'int main()':
a.cc:40:7: error: 'dist' was not declared in this scope
40 | dist[i][j]=INF;
| ^~~~
|
s214440837 | p01317 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb push_back
#define all(x) (x).be... | a.cc: In function 'int main()':
a.cc:40:7: error: 'dist' was not declared in this scope
40 | dist[i][j]=INF;
| ^~~~
|
s971397462 | p01317 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
const int MAX_N=205;
const int MAX_M=10000;
const int MAX_R=1005;
const int INF=0x3f3f3f3f;
int land[MAX_N][MAX_N];
int water[MAX_N][MAX_N];
int N, M, R;
int dp[MAX_R][MAX_N];
int dest[MAX_R];
int main(){
#ifndef O... | a.cc: In function 'int main()':
a.cc:53:29: error: redeclaration of 'int t'
53 | int pre=dest[0], z, t;
| ^
a.cc:26:19: note: 'int t' previously declared here
26 | int x, y, t; char sl;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.