submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s247932051 | p00157 | C | #include<stdio.h>
int LIS(void);
int h[201], r[201], m, n;
int main(void)
{
int i, j, t;
while(1)
{
scanf("%d",&n);
if(n==0)break;
for(i=0;i<n;i++)
scanf("%d%d",&h[i] ,&r[i]);
scanf("%d",&m);
for(i=n;i<n+m;i++)
scanf("%d%d",&h[i],&r[i]);
for(i=0;i<n+m;i++)
{
for(j=0;j<n+m;j++)
{
if(h[i]... | main.c: In function 'LIS':
main.c:127:26: error: expected ')' before '\U000030c4'
127 | if(r[k]<r[i] && h[k]<h[i]ツ && L[k]>=L[i])L[i]=L[k]+1;
| ~ ^~
| )
main.c:127:28: error: stray '\343' in program
127 | if(r[k]<r[i] && h[k]<h[i]<U+30C4><U+3000>&& L[k]>=L... |
s927759224 | p00157 | C | #include<iostream>
#include<cstdio>
#define N 1000
using namespace std;
int h1[N],r1[N];
void sort(int,int);
int syori(int,int);
int main(){/*main*/
int i,n1,n2,j,res;
for(i=0;i<N;i++){
h1[i]=0;
r1[i]=0;
}
while(1){
cin >> n1; // êQÌ}g[VJÌ
if(n1 == 0)break;
for(i=0;i<n1;i++)... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s319724215 | p00157 | C | #include<iostream>
using namespace std;
int main(void){
int n,m,h[201],r[201];
while(cin >> n,n){
for(int i=0;i<n;i++)cin >> h[i] >> r[i];
cin >>m;
for(int i=n;i<n+m;i++)cin >> h[i] >> r[i];
for(int i=0;i<n+m;i++){
for(int j=i;j<n+m;j++){
if(h[i]>h[j]){
int t=h[i];
h[i]=h[j];
h[j... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s804897600 | p00157 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<utility>
#define rep(i,a) for( int i = 0; i != (a); ++i )
const int INF = 1 << 30;
typedef std::pair<int, int> P;
int n, m;
int dp[200];
int main()
{
while( scanf( "%d", &n ), n )
{
memset( dp, 0, sizeof( dp ) );
std::vector<P> ps;
rep( i, n )
... | a.cc: In function 'int main()':
a.cc:18:17: error: 'memset' was not declared in this scope
18 | memset( dp, 0, sizeof( dp ) );
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<utility>
... |
s451938515 | p00157 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> Doll;
vector<Doll> Dolls;
int dp[201];
void debug(){
for(int i = 0; i < Dolls.size(); i++){
cout << "(" << Dolls[i].first << ", " << Dolls[i].second << ")" << endl;
}
}
bool comp(const Doll& d1, const Doll& d2){
return ((d1.f... | a.cc: In function 'int main()':
a.cc:35:5: error: 'sort' was not declared in this scope; did you mean 'short'?
35 | sort(Dolls.begin(), Dolls.end(), comp);
| ^~~~
| short
|
s165070293 | p00157 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
#define MAX_NM 202
struct D{int r, h;};
bool compr(const D& d1, const D& d2){
return d1.r < d2.r;
}
bool comph(const D& d1, const D& d2){
return d1.h < d2.h;
}
int main(void){
int n, m, dp[MAX_NM];
D d[MAX_NM];
while(cin >> n, n){
for(i... | a.cc: In function 'int main()':
a.cc:22:39: error: 'a' was not declared in this scope
22 | for(int i = 0; i < m; i++) cin >> a[n+i].h >> a[n+i].r;
| ^
|
s043204181 | p00157 | C++ | #include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;
typedef pair<int, int> P;
const int INF = 1e+9;
int DP[1000];
int main() {
int n, m, h, r;
while(cin >> n && n){
memset(DP, 0, sizeof(DP));
vector<P> vec;
for(int i = 0; i < n; ++i){
cin >> h >> r;
vec.push_back(P(h, r));... | a.cc: In function 'int main()':
a.cc:15:17: error: 'vector' was not declared in this scope
15 | vector<P> vec;
| ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
3 | #include <algorithm>
+++ |+#inc... |
s995302928 | p00157 | C++ | // AOJ20150414.cpp : テ」ツつウテ」ツδウテ」ツつステ」ツδシテ」ツδォ テ」ツつ「テ」ツδ療」ツδェテ」ツつアテ」ツδシテ」ツつキテ」ツδァテ」ツδウテ」ツ?ョテ」ツつィテ」ツδウテ」ツδ暗」ツδェ テ」ツδ敕」ツつ、テ」ツδウテ」ツδ暗」ツつ津・ツョツ堙ァツセツゥテ」ツ?療」ツ?セテ」ツ?凖」ツ??
//
#include "stdafx.h"
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct DOLL{
int h;
int r;
};
int f(vector<DOLL>... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s991398499 | p00157 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <utility>
int N, M;
std::pair<int, int> Mat[201];
int dp[201];
int main(){
while(scanf("%d", &N), N){
memset(dp, -1, sizeof(dp));
for(int i = 0; i < N; ++i)
scanf("%d %d", &Mat[i].first, &Mat[i].second);
... | a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
12 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <utility>
+++ |+#include <cst... |
s288407247 | p00157 | C++ | # define _CRT_SECURE_NO_WARNINGS
# include <cstdio>
# include <algorithm>
#define MAX 100
struct doll{
int high, r;
doll() {}
doll(int H, int R) : high(H), r(R) {}
bool operator<(doll d){
return (high < d.high) ? true : (high == d.high) ? (r < d.r) ? true : false : false;
}
};
int n, m;
doll K[MAX * 2];
int ... | a.cc: In function 'int main()':
a.cc:38:17: error: 'memset' was not declared in this scope
38 | memset(dp, 0,n+m);
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | # include <algorithm>
+++ |+#i... |
s555686313 | p00157 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#define F first
#define S second
using namespace std;
typedef pair<int, int> P;
const int INF = 1 << 30;
int main(){
????int n, m;
????int dp[2000];
????P doll[2000];
????while(cin >> n && n){
????????fill(doll, doll+2000, P(0, 0));
????????fill(dp, dp + 2000, ... | a.cc: In function 'int main()':
a.cc:10:1: error: expected primary-expression before '?' token
10 | ????int n, m;
| ^
a.cc:10:2: error: expected primary-expression before '?' token
10 | ????int n, m;
| ^
a.cc:10:3: error: expected primary-expression before '?' token
10 | ????int n, m;
| ^
... |
s027135661 | p00157 | C++ | \#include <iostream>
#include <vector>
#include <algorithm>
#define F first
#define S second
using namespace std;
typedef pair<int, int> P;
const int INF = 1 << 30;
int main(){
int n, m;
int dp[2000];
P doll[2000];
while(cin >> n && n){
fill(doll, doll+2000, P(0, 0));
fill(dp, dp + 2000, INF);
for (... | a.cc:1:1: error: stray '\' in program
1 | \#include <iostream>
| ^
a.cc:1:2: error: stray '#' in program
1 | \#include <iostream>
| ^
a.cc:1:3: error: 'include' does not name a type
1 | \#include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
... |
s475767496 | p00157 | C++ | #include<bits/stdc++.h>
#define mk make_pair
#define f first
#define s second
using namespace std;
int n,m,p1,p2,dp[201][1001][1001];
unordered_map<pair<int,pair<int,int> >,int >m1;
vector<pair<int,int> >v;
int dfs(int d,int h,int w){
int res=0;
if(m1[mk(d,mk(h,w))])return m1[mk(d,mk(h,w))];
if(d==v.size()) ret... | a.cc:7:45: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, std::pair<int, int> >; _Tp = int; _Hash = std::hash<std::pair<int, std::pair<int, int> > >; _Pred = std::equal_to<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<st... |
s981502343 | p00157 | C++ | #include<bits/stdc++.h>
#define mk make_pair
#define f first
#define s second
using namespace std;
int n,m,p1,p2,dp[201][1001][1001];
unordered_map<pair<int,pair<int,int> >,int >m1;
vector<pair<int,int> >v;
int dfs(int d,int h,int w){
int res=0;
if(m1[mk(d,mk(h,w))])return m1[mk(d,mk(h,w))];
if(d==v.size()) ret... | a.cc:7:45: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, std::pair<int, int> >; _Tp = int; _Hash = std::hash<std::pair<int, std::pair<int, int> > >; _Pred = std::equal_to<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<st... |
s452138497 | p00157 | C++ | #include <iostream>
#include <queue>
using namespace std;
typedef struct DOLL
{
int h, r;
bool operator > (const DOLL& d) const
{
return (h > d.h && r > d.r);
}
bool operator < (const DOLL& d) const
{
return (h < d.h && r < d.r);
}
} D;
typedef struct Node
{
D d;
int num;
};
const int MAX = 100;
i... | a.cc:21:1: warning: 'typedef' was ignored in this declaration
21 | typedef struct Node
| ^~~~~~~
a.cc: In function 'void solve()':
a.cc:39:9: error: 'memset' was not declared in this scope
39 | memset(AN, 0, sizeof(int)*n);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstri... |
s930216227 | p00157 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int dp[200] = {0};
int h[200] , r[200];
int n,m;
int main(){
while(cin >> n , n){
rep(i,n)cin >> h[i] >> r[i];
cin >> m;
rep(i,m)cin >> h[n+i] >> r[n+i];
int ans = 0;
rep(i,200)dp[i] = 1;
rep(i,200)rep(j,200){... | a.cc: In function 'int main()':
a.cc:18:59: error: expected ';' before '}' token
18 | dp[i] = max(dp[j]+1,dp[i])
| ^
| ;
19 | }
... |
s873702386 | p00157 | C++ | #include <iostream>
#include <cstring>
#include <vector>
using namespace std;
typedef pair<int, int> doll;
int main()
{
int n, m, i, j;
vector<doll> vc;
int dp[200];
vc.reserve(200);
while( cin >> n, n)
{
vc.clear();
memset( dp, 0, sizeof(dp));
for( i = 0; i < n; i++)
{
doll d;
cin >> d.fi... | a.cc: In function 'int main()':
a.cc:38:17: error: 'sort' was not declared in this scope; did you mean 'short'?
38 | sort(vc.begin(), vc.end());
| ^~~~
| short
|
s368530199 | p00157 | C++ | #include <iostream>
#include <cstring>
#include <vector>
using namespace std;
typedef pair<int, int> doll;
int main()
{
int n, m, i, j;
vector<doll> vc;
int dp[200];
vc.reserve(200);
while( cin >> n, n)
{
vc.clear();
memset( dp, 0, sizeof(dp));
for( i = 0; i < n; i++)
{
doll d;
cin >> d.fi... | a.cc: In function 'int main()':
a.cc:38:22: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
38 | std::sort(vc.begin(), vc.end());
| ^~~~
| qsort
|
s464231442 | p00157 | C++ | #include<iostream>
#include<cstdlib>
#define rep(i,n) for(int i=0;i<n;i++)
#define MAX 206
using namespace std;
int test=0;
int n,m;
int dp[MAX+1];
class Doll{
public:
int h;
int r;
bool operator < (const Doll &d)const{
if(h == d.h)return r < d.h;//hが同じ時rで比較
return h < d.h;//普段はhで比較
}
};
Doll D... | a.cc: In function 'int main()':
a.cc:56:7: error: 'sort' was not declared in this scope; did you mean 'short'?
56 | sort(Dolls,Dolls+n+m);
| ^~~~
| short
|
s676149779 | p00157 | C++ | #include<iostream>
#include<cstdlib>
#define rep(i,n) for(int i=0;i<n;i++)
#define MAX 206
using namespace std;
int test=0;
int n,m;
int dp[MAX+1];
class Doll{
public:
int h;
int r;
bool operator < (const Doll &d)const{
if(h == d.h)return r < d.h;//hが同じ時rで比較
return h < d.h;//普段はhで比較
}
};
Doll D... | a.cc: In function 'int main()':
a.cc:58:7: error: 'sort' was not declared in this scope; did you mean 'short'?
58 | sort(Dolls,Dolls+n+m);
| ^~~~
| short
|
s199568520 | p00157 | C++ | #include<iostream>
#include<cstdlib>
#define rep(i,n) for(int i=0;i<n;i++)
#define MAX 206
using namespace std;
int test=0;
int n,m;
int dp[MAX+1];
class Doll{
public:
int h;
int r;
bool operator < (const Doll &d)const{
if(h == d.h)return r < d.h;//hが同じ時rで比較
return h < d.h;//普段はhで比較
}
};
Doll D... | a.cc: In function 'int main()':
a.cc:55:7: error: 'sort' was not declared in this scope; did you mean 'short'?
55 | sort(Dolls,Dolls+n+m);
| ^~~~
| short
|
s893767622 | p00157 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Container
{
public:
void append( pair< int, int > p )
{
masterList.push_back( p );
}
void cSort()
{
sort( masterList.begin(), masterList.end() );
sortedList.clear();
vector< pair< int, int > >::iterator itr = masterList.... | a.cc: In member function 'int Container::countContainment()':
a.cc:35:17: error: 'memset' was not declared in this scope
35 | memset( dp, 0, sizeof(dp) );
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s462991853 | p00157 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <string>
#include <map>
#define rep(i,n) for(int i=0; i<n; ++i)
using namespace std;
struct Doll{
int H,R,L;
bool operator<(const Doll& right)const {
return H<right.H;
}
Doll(){
H=0; R=0; L=... | a.cc: In function 'int main()':
a.cc:32:7: error: 'sort' was not declared in this scope; did you mean 'short'?
32 | sort(D.begin()+1, D.begin()+(N+M)+1);
| ^~~~
| short
|
s206858106 | p00157 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main()
{
int n;
for(;cin>>n,n;)
{
vector<pair<int,int> >data;
for(int i=0;i<n;i++)
{
int h,r;
cin>>h>>r;
data.push_back(make_pair(h,r));
}
int m;
cin>>m;
for(int i=0;i<m;i++)
{
int h,r;
cin>>h>>r;
dat... | a.cc: In function 'int main()':
a.cc:24:7: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(data.begin(),data.end());
| ^~~~
| short
|
s742129943 | p00158 | C | #include<stdio.h>
int main(){
int n,c;
while(1){
scanf("%d",&n);
if(n==0)break;
for(c=0;n!=1;c++){
if(n%2==0){
n/=2;
}
else{
n=n*3+1;
}
}
printf("%d\n",c);
}
return 0; | main.c: In function 'main':
main.c:17:3: error: expected declaration or statement at end of input
17 | return 0;
| ^~~~~~
|
s218381400 | p00158 | C | #include <cstdio>
int main(void)
{
int n;
int count;
while (scanf("%d", &n), n){
count = 0;
while (n != 1){
if (n % 2 == 0){
n /= 2;
}
else {
n = n * 3 + 1;
}
count++;
}
printf("%d\n", count);
}
return (0);
} | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s275848302 | p00158 | C | #include <stdio.h>
int main(void) {
int n, c;
while (1) {
scanf_s("%d", &n);
if (n == 0) break;
c = 0;
while (1) {
if (n == 1) break;
else if (n % 2 == 0) {
n /= 2;
c++;
}
else {
n *= 3;
n += 1;
c++;
}
}
printf("%d\n", c);
}
return 0;
} | main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s006900920 | p00158 | C | c;main(n){for(;n>1?n=n%2?n*3+1:n/2,++c:!printf("%d\n",c)+scanf("%d",&n,c=0)*n;)} | main.c:1:1: warning: data definition has no type or storage class
1 | c;main(n){for(;n>1?n=n%2?n*3+1:n/2,++c:!printf("%d\n",c)+scanf("%d",&n,c=0)*n;)}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
1 | ... |
s830322075 | p00158 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(void){
while (true){
int n; cin >> n;
if (!n){
break;
}
cout << count(n) << endl;
}
return 0;
}
int count(int n){
int ct = 0;
while (n != 1){
if (n % 2 == 0){
n = n / 2;
}
else {
n = n * 3 + 1;
}
ct++;
}
return ct... | a.cc: In function 'int main()':
a.cc:11:30: error: no matching function for call to 'count(int&)'
11 | cout << count(n) << endl;
| ~~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4025:5: n... |
s502313285 | p00158 | C++ | while num = gets.to_i
count = 0
if num == 0
break
end
while num != 1
if (num % 2) == 0
num = num / 2
count = count + 1
else
num = (num * 3) + 1
count = count + 1
end
end
puts count
end | a.cc:1:1: error: expected unqualified-id before 'while'
1 | while num = gets.to_i
| ^~~~~
|
s367845437 | p00158 | C++ | nclude<stdio.h>
int main(void)
{
int n,a;
scanf("%d",&n);
while(n!=0){
a=0;
while(n>1){
if(n%2==0) n=n/2;
else n=n*3+1;
a++;
}
printf("%d\n",a);
scanf("%d",&n);
}
return 0;
} | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude<stdio.h>
| ^~~~~~
|
s294854189 | p00158 | C++ | main(n,i){for(;scanf("%d",&n),n;printf("%d\n",i))for(i=0;n-1;i++)n=n%2?3*n+1:n/2;exit(0);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(n,i){for(;scanf("%d",&n),n;printf("%d\n",i))for(i=0;n-1;i++)n=n%2?3*n+1:n/2;exit(0);}
| ^
|
s451190423 | p00159 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true){
int n = sc.nextInt();
if(n==0)break;
int a = sc.nextInt();
double h = sc.nextDouble()/100;
double w = sc.nextDouble();
double b = Math.abs(22-w/(h*h));
for... | Main.java:18: error: variable a is already defined in method main(String[])
double a = Math.abs(22-w/(h*h));
^
1 error
|
s692726320 | p00159 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true){
int n = sc.nextInt();
if(n==0)break;
int a = sc.nextInt();
double h = sc.nextDouble()/100;
double w = sc.nextDouble();
double b = Math.abs(22-w/(h*h));
for... | Main.java:18: error: variable a is already defined in method main(String[])
double a = Math.abs(22-w(h*h));
^
Main.java:18: error: cannot find symbol
double a = Math.abs(22-w(h*h));
^
symbol: method w(double)
location: class Main
2 errors
|
s828930121 | p00159 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true){
int n = sc.nextInt();
if(n==0)break;
int a = sc.nextInt();
double h = sc.nextDouble()/100;
double w = sc.nextDouble();
double b = Math.abs(22-(w/(h*h)));
f... | Main.java:18: error: variable a is already defined in method main(String[])
double a = Math.abs(22-(w/(h*h)));
^
1 error
|
s665291771 | p00159 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true){
int n = sc.nextInt();
if(n==0)break;
int a = sc.nextInt();
double h = sc.nextDouble()/100;
double w = sc.nextDouble();
double b = Math.abs(22-(w/(h*h)));
f... | Main.java:18: error: variable a is already defined in method main(String[])
double a = Math.abs(22-(w/(h*h)));
^
1 error
|
s925820868 | p00159 | Java | import java.util.Scanner;
class Main
{
public static void main(String args[])
{
Scanner scan=new Scanner(System.in);
while(true)
{
int n=scan.nextInt();
if(n==0)break;
int num[]=new int[n];
double bmi;
int ans=0,x=0,near=100;
for(int i=0;i<n;i++)
{
num[i]=scan.next();
int h,w;
... | Main.java:17: error: incompatible types: String cannot be converted to int
num[i]=scan.next();
^
1 error
|
s568958141 | p00159 | Java | import java.util.Scanner;
class Main
{
public static void main(String args[])
{
Scanner scan=new Scanner(System.in);
while(true)
{
int n=scan.nextInt();
if(n==0)break;
int ans=0,x=0,near=0,j=0;
for(int i=0;i<n;i++)
{
int num=scan.nextInt();
int w;
double h;
h=scan.nextD... | Main.java:27: error: incompatible types: possible lossy conversion from double to int
near=Double.MAX_VALUE;
^
1 error
|
s016796072 | p00159 | C | #include<cmath>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
for(int n;scanf("%d",&n),n;){
double bmi,best=1e9;
int ibest=1000000000;
for(int j=0;j<n;j++){
int i,h,w;
scanf("%d%d%d",&i,&h,&w);
bmi=w/((h/100.0)*(h/100.0));
if(abs(22-bmi)+1e-9<abs(22-best))
best=bmi,ibest... | main.c:1:9: fatal error: cmath: No such file or directory
1 | #include<cmath>
| ^~~~~~~
compilation terminated.
|
s139653031 | p00159 | C | #include <stdio.h>
#include <math.h>
int main(void) {
int datanum,datamax;
int maxnumber;
double maxbmi;
double maxdiff;
int number,height,weight;
double heightm;
double bmi;
double diff;
while(1) {
scanf("%d",&datamax);
maxnumber=0;
maxbmi=0x7fffffff;
maxdiff=0x7fffffff;
for(datanum=0;datanum<datam... | main.c: In function 'main':
main.c:23:79: error: expected ')' before '{' token
23 | if(diff<maxdiff || (diff==maxdiff && number<maxnumber) {
| ~ ^~
| ... |
s379132089 | p00159 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main() {
int n;
while (cin >> n&&n!=0) {
double a = -100;
long float r=22, r1 = 10000;
for (int i = 0; i < n; i++) {
long float id, cm, kg;
cin >> id >> cm >> kg;
cm /= 100;
long float bmi;
bmi = (kg / (cm*cm));
long fl... | a.cc: In function 'int main()':
a.cc:9:17: error: 'long' specified with 'float'
9 | long float r=22, r1 = 10000;
| ^~~~
a.cc:9:17: error: 'long' specified with 'float'
a.cc:11:25: error: 'long' specified with 'float'
11 | long float id, cm, kg;
... |
s527208570 | p00159 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
int n;
while (cin >> n&&n!=0) {
double a = -100;
long float r=22, r1 = 10000;
for (int i = 0; i < n; i++) {
long float id, cm, kg;
cin >> id >> cm >> kg;
cm /= 100;
long float bmi;
bmi = (kg / (cm*cm));
long float r2 = r - b... | a.cc: In function 'int main()':
a.cc:8:17: error: 'long' specified with 'float'
8 | long float r=22, r1 = 10000;
| ^~~~
a.cc:8:17: error: 'long' specified with 'float'
a.cc:10:25: error: 'long' specified with 'float'
10 | long float id, cm, kg;
... |
s559028171 | p00159 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int bmi(double h, double w){
return w/((h/100)*(h/100));
}
int main(){
int n, p;
double h, w;
const double c = 22;
while(true){
cin >> n;
if(n == 0)
return 0;
int num;
double diff;
for(int i = 0; i < n; i++){
cin >> p >> ... | a.cc:40:11: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
40 | BMI = ??????(kg) / (??????(m))2
a.cc:40:25: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
a.cc:40:1: error: 'BMI' does not name a type
40 | BMI = ??????(kg) / (??????(m))2
| ^~~
|
s020735975 | p00159 | C++ | #include <iostream>
#include <cmath>
#include <utility>
#include <vector>
using namespace std;
typedef pair<double,int> P;
int main() {
int n;
vector<P> V;
P temp;
while(cin >> n) {
V.clear();
if(n==0) break;
int k;
double h,w;
for(int i=0;i<n;i++) {
cin >> k >> h >> w;
temp.fir... | a.cc: In function 'int main()':
a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
24 | sort(V.begin(),V.end());
| ^~~~
| sqrt
|
s677247549 | p00159 | C++ | #include<iostream>
#include<utility>
#include<cstdlib>
typedef std::pair<double, int> P;
const int INF = 1 << 30;
int n;
int main()
{
while( std::cin >> n, n )
{
P ans( INF, INF );
while( n-- )
{
int i;
double h, w;
std::cin >> i >> h >> w;
h /= 100.0;
ans = std::min( ans, P( fabs( w / ( ... | a.cc: In function 'int main()':
a.cc:23:49: error: 'fabs' was not declared in this scope; did you mean 'labs'?
23 | ans = std::min( ans, P( fabs( w / ( h * h ) - 22.0 ), i ) );
| ^~~~
| ... |
s379001427 | p00160 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
while(true){
int baggageNum = stdIn.nextInt();
if(baggageNum = 0)break;
int cost = 0;
for(int i=0;i < baggageNum;i++){
int w,size = 0;
for(int i=0;i<3;i++)size += st... | Main.java:33: error: class, interface, enum, or record expected
}
^
1 error
|
s522693868 | p00160 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
while(true){
int baggageNum = stdIn.nextInt();
if(baggageNum = 0)break;
int cost = 0;
for(int i=0;i < baggageNum;i++){
int size = 0;
for(int i=0;i<3;i++)size += stdI... | Main.java:9: error: incompatible types: int cannot be converted to boolean
if(baggageNum = 0)break;
^
Main.java:13: error: variable i is already defined in method main(String[])
for(int i=0;i<3;i++)size += stdIn.nextInt();
^
2 errors
|
s298793910 | p00160 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
while(true){
int baggageNum = stdIn.nextInt();
if(baggageNum == 0)break;
int cost = 0;
for(int i=0;i < baggageNum;i++){
int size = 0;
for(int i=0;i<3;i++)size += std... | Main.java:13: error: variable i is already defined in method main(String[])
for(int i=0;i<3;i++)size += stdIn.nextInt();
^
1 error
|
s508834643 | p00160 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Map.Entry;
import java.util.StringTokenizer;
import java.util.TreeMap;
/**
* Delivery Fee
*/
public class Main {
static P0160 main = new P0160();
static TreeMap<Parcel, Integer> fee = new TreeMap<Parcel, ... | Main.java:13: error: cannot find symbol
static P0160 main = new P0160();
^
symbol: class P0160
location: class Main
Main.java:13: error: cannot find symbol
static P0160 main = new P0160();
^
symbol: class P0160
location: class Main
2 errors
|
s006246914 | p00160 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Map.Entry;
import java.util.StringTokenizer;
import java.util.TreeMap;
/**
* Delivery Fee
*/
public class Main {
static P0160 main = new P0160();
static TreeMap<Parcel, Integer> fee = new TreeMap<Parcel, ... | Main.java:13: error: cannot find symbol
static P0160 main = new P0160();
^
symbol: class P0160
location: class Main
Main.java:13: error: cannot find symbol
static P0160 main = new P0160();
^
symbol: class P0160
location: class Main
2 errors
|
s868966809 | p00160 | C | include <stdio.h>
int main(void)
{
int n,x,y,h,w,i,size,sum;
while(scanf("%d",&n),n){
sum=0;
for(i=0;i<n;i++){
scanf("%d %d %d %d",&x,&y,&h,&w);
size=x+y+h;
if(size<=60&&w<=2)sum+=600;
else if(size<=80&&w<=5)sum+=800;
else if(size<=100&&w<=10)sum+=1000;
else if(size<=120&... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s783876588 | p00160 | C++ | #include<stdio.h>
int main(){
int n;
while(1){
scanf("%d",&n);if(n==0)break;
int x,y,h,w;
int S=0;
for(int i=0;i<n;i++)
{
scanf("%d %d %d %d",&x,&y,&h,&w);
int s=x+y+h;
int T1=0,T2=0;
if(s<=60)T1=1;
else if(s<=80)T1=2;
else if(s<=100)T1=3;
else if(s<=120)T1=4;
else if(s<=140)T1=5;
else if(s<=160)T1=6;
else if(s>1... | a.cc: In function 'int main()':
a.cc:40:5: error: expected primary-expression before ':' token
40 | case:1
| ^
a.cc:40:7: error: expected ';' before 'p'
40 | case:1
| ^
| ;
41 | p=600;break;
| ~
a.cc:43:5: error: expected primary-expression before ':' token
43 |... |
s135084409 | p00160 | C++ | #include <bits/stdc++.h>
#define r(i,a,n) for(i=a;i<n;i++)
#define R(i,a,n) for(int i=a;i>=n;i--)
using namespace std;
int main(){
long int n,a,b,c,s,w;
while(cin>>n,n){
long int p=0;
r(i,0,n){
cin>>a>>b>>c>>w;
s=a+b+c;
if(s<=60&&w<=2)p+=600;
else if(s<=80&&w<=5)p+=800;
else if(s<=120&&w<=15)p+=1200;
... | a.cc: In function 'int main()':
a.cc:9:19: error: 'i' was not declared in this scope
9 | r(i,0,n){
| ^
a.cc:2:22: note: in definition of macro 'r'
2 | #define r(i,a,n) for(i=a;i<n;i++)
| ^
|
s731300563 | p00160 | C++ | #include <bits/stdc++.h>
#define r(i,a,n) for(i=a;i<n;++i)
#define R(i,a,n) for(int i=a;i>=n;i--)
using namespace std;
int main(){
long int n,a,b,c,s,w;
while(cin>>n,n){
long int p=0;
r(i,0,n){
cin>>a>>b>>c>>w;
s=a+b+c;
if(s<=60&&w<=2)p+=600;
else if(s<=80&&w<=5)p+=800;
else if(s<=120&&w<=15)p+=1200;
... | a.cc: In function 'int main()':
a.cc:9:19: error: 'i' was not declared in this scope
9 | r(i,0,n){
| ^
a.cc:2:22: note: in definition of macro 'r'
2 | #define r(i,a,n) for(i=a;i<n;++i)
| ^
|
s843649882 | p00160 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main(){
int i,j,k,l,m,n,x,y,h,w,sum;
int ans;
while(1){
ans=0;
sum=0;
cin >> n;
if(n == 0)break;
for(i=0;i<n;i++){
cin >> x >> y >> h >> w;
sum = x + y + h;
if(w<=2){
if(sum<=60)ans+=600;
else if(sum<=80)a... | a.cc: In function 'int main()':
a.cc:74:4: error: expected '}' at end of input
74 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s179060678 | p00160 | C++ | #include<stdio.h>
int mian(void){
int x,y,z,w,n,i;
int sum,l;
while(scanf("%d",&n)!=0){
sum=0;
for(i=0;i<n,i++){
scanf("%d %d %d %d",&x,&y,&z,&w);
l=x+y+z;
if(l<=60 && w<=2) sum+=600;
else if(l<=80 && w<=5) sum+=800;
else if(l<=100 && w<=10) sum+=1000;
else if(l<=120 && w<=15) sum+=1200... | a.cc: In function 'int mian()':
a.cc:9:32: error: expected ';' before ')' token
9 | for(i=0;i<n,i++){
| ^
| ;
|
s235618189 | p00160 | C++ | #include<stdio.h>
int mian(void){
int x,y,z,w,n,i;
int sum,l;
while(scanf("%d",&n)!=0){
sum=0;
for(i=0;i<n;i++){
scanf("%d %d %d %d",&x,&y,&z,&w);
l=x+y+z;
if(l<=60 && w<=2) sum+=600;
else if(l<=80 && w<=5) sum+=800;
else if(l<=100 && w<=10) sum+=1000;
else if(l<=120 && w<=15) sum+=1200... | /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
|
s943337636 | p00161 | Java | import java.util.*;
public class SportMeet {
static Scanner sc = new Scanner(System.in);
static int team_number, minutes, seconds;
static Map<Integer, Integer>map = new HashMap<Integer, Integer>();
public static void main(String[] args) {
while(read()){
slove();
map.clear();
}
}
static boolean read(){
... | Main.java:2: error: class SportMeet is public, should be declared in a file named SportMeet.java
public class SportMeet {
^
1 error
|
s642773645 | p00161 | C | #include<stdio.h>
int main (void)
{
int a,i,k,temp;
int s[][9]={};
int sec[1000000]={};
int min[1000000]={};
int sumsec[1000000]={}
int sumsec2[1000000]={};
scanf("%d",&a);
do{
for(i=0,i<a;i++)
for(k=0,k<9,k++)
scanf("%d",s[i][k]);
for(i=0,i<a;i++)
sec[i]=s[i][2]+s[i][4]+s[i][6]+s[i][8];
min[i]=(s[i][1]+s[i][3]+s[i]... | main.c: In function 'main':
main.c:9:1: error: expected ',' or ';' before 'int'
9 | int sumsec2[1000000]={};
| ^~~
main.c:14:16: error: expected ';' before ')' token
14 | for(i=0,i<a;i++)
| ^
| ;
main.c:15:16: error: expected ';' before ')' token
15 | for(k=0,k<... |
s380900829 | p00161 | C | #include<stdio.h>
int main (void)
{
int a,i,k,j,temp;
int s[][9]={};
int sec[1000000]={};
int min[1000000]={};
int sumsec[1000000]={};
int sumsec2[1000000]={};
scanf("%d",&a);
do{
for(i=0;<a;i++)
for(k=0;k<9;k++)
scanf("%d",s[i][k]);
for(i=0;i<a;i++)
sec[i]=s[i][2]+s[i][4]+s[i][6]+s[i][8];
min[i]=(s[i][1]+s[i][3]... | main.c: In function 'main':
main.c:14:9: error: expected expression before '<' token
14 | for(i=0;<a;i++)
| ^
main.c:25:1: error: expected 'while' before 'for'
25 | for(i=0;i<a-1;i++)
| ^~~
main.c:25:18: error: expected ';' before ')' token
25 | for(i=0;i<a-1;i++)
| ^... |
s127872205 | p00161 | C | #include<stdio.h>
int main (void)
{
int a,i,k,j,temp;
int s[][9]={};
int sec[1000000]={};
int min[1000000]={};
int sumsec[1000000]={};
int sumsec2[1000000]={};
scanf("%d",&a);
do{
for(i=0;<a;i++)
for(k=0;k<9;k++)
scanf("%d",s[i][k]);
for(i=0;i<a;i++){
sec[i]=s[i][2]+s[i][4]+s[i][6]+s[i][8];
min[i]=(s[i][1]+s[i][3... | main.c: In function 'main':
main.c:14:9: error: expected expression before '<' token
14 | for(i=0;<a;i++)
| ^
|
s997199783 | p00161 | C | #define _CRT_SECURE_NO_WARNINGS
//#define _USE_MATH_DEFINES
#include<stdio.h>
#include<stdlib.h>
//#include<math.h>
#include<string.h>
#include "Source.h"
//#include<time.h>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
typedef struct {
int num,
t;
}SPORT;
void sort(int, SPORT[]);
int main() {
int n, m, s, i, j;... | main.c:7:10: fatal error: Source.h: No such file or directory
7 | #include "Source.h"
| ^~~~~~~~~~
compilation terminated.
|
s022692381 | p00161 | C | /*
現状さっぱりわからない。
*/
#include <stdio.h>
#include <math.h>
struct TEAM
{
int c1;
int m1;
int s1;
int m2;
int s2;
int m3;
int s3;
int m4;
int s4;
int time;
};
typedef struct TEAM team;
void sort00(team data[], int n);
int minindex00(team data[], int from, int to);
int main()
{
int n[100];
team data[100];
i... | main.c: In function 'main':
main.c:44:28: error: incompatible types when assigning to type 'int' from type 'team' {aka 'struct TEAM'}
44 | output[sp]=data[0];
| ^~~~
main.c:46:28: error: incompatible types when assigning to type 'int' from type 'team' {aka 'struct TEA... |
s604430392 | p00161 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int n;
while (cin >> n, n){
vector<pair<int, int> > vp;
for (int i = 0; i < n; i++){
int id;
cin >> id;
int score = 0;
for (int i = 0; i < 3; i++){
int m, s;
cin >> m >> s;
scor... | a.cc: In function 'int main()':
a.cc:25:68: error: 'v' was not declared in this scope; did you mean 'vp'?
25 | printf("%d\n%d\n%d\n", vp[0].second, vp[1].second, v[n - 2].second);
| ^
| ... |
s941319115 | p00161 | C++ | #include<iostream>
using namespace std;
int main(){
int win[2]={},semiwin[2]={},dobe[2]={},semidobe[2]={},jointeams,team,i,j,total,firstteam[4]={},firsttotal[4]={};
cin >> jointeams;
for(i=0;i<=3;i++){
cin >> firstteam[i];
for(j=1;j<=4;j++){
cin >> temp;
firsttotal[i] += temp*60;
cin >> tem... | a.cc: In function 'int main()':
a.cc:21:32: error: 'temp' was not declared in this scope
21 | cin >> temp;
| ^~~~
a.cc:31:33: error: 'temp' was not declared in this scope
31 | temp = firsttotal[j];
| ... |
s499968503 | p00161 | C++ | #include<stdio.h>
#include<iostream>
using namespace std;
struct SKE{int c1;int m1;int s1;int m2;int s2;int m3;int s3;int m4;int s4;int SUM;};
struct SKE NUM[1000001];
int main (){
int N;
SKE Te,M1,M2,M3,M;
while(1){
cin>>N;if(N==0)break;
for(int i=0;i<N;i++){
cin>>NUM[i].c1>>NUM[i].m1>>NUM[i].s1>>NUM[i].m2>>NUM[i].... | a.cc: In function 'int main()':
a.cc:34:2: error: expected '}' at end of input
34 | }
| ^
a.cc:8:12: note: to match this '{'
8 | int main (){
| ^
|
s550439841 | p00161 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
using namespace std;
int main(void)
{
int n, c1, m1, s1, m2, s2, m3, s3, m4, s4;
vector<pair<int, int>>g;
while((cin >> n) != 0){
for (int i = 0; i < n; ++i){
cin >> c1 >> m1 >> s1 >> m2 >> s2 >> m3 >> s3 >> m4 >> s4;
g.push_back(mak... | a.cc: In function 'int main()':
a.cc:12:26: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
12 | while((cin >> n) != 0){
| ~~~~~~~~~~ ^~ ~
| | |
| ... |
s813985672 | p00161 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
using namespace std;
int main(void)
{
int n, c1, m1, s1, m2, s2, m3, s3, m4, s4;
vector<pair<int, int>>g;
while((cin >> n) != 0){
for (int i = 0; i < n; ++i){
cin >> c1 >> m1 >> s1 >> m2 >> s2 >> m3 >> s3 >> m4 >> s4;
g.push_back(mak... | a.cc: In function 'int main()':
a.cc:12:26: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
12 | while((cin >> n) != 0){
| ~~~~~~~~~~ ^~ ~
| | |
| ... |
s018837949 | p00161 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
class Program {
static void Main() {
for (string line; (line = Console.ReadLine()) != "0";) {
var n = int.Parse(line);
var teams = new Dictionary<int, int>();
for (var i = 0; i < n; i++) {
... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
s963781916 | p00161 | C++ | #include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
bool cmp(pii lhs, pii rhs)
{
return (lhs.second < rhs.second);
}
int main()
{
int n;
while (cin >> n, n){
vector <pii> p(n);
for (int i = 0; i < n; i++){
int num, t = 0;
cin >> num;
for (int j =... | a.cc: In function 'int main()':
a.cc:31:17: error: 'sort' was not declared in this scope; did you mean 'short'?
31 | sort(p.begin(), p.end(), cmp);
| ^~~~
| short
|
s139748135 | p00161 | C++ | #include "bits/stdc++.h"
using namespace std;
#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#define BW(a,x,b) ((a)<=(x)&&(x)<=(b))
#define MP(a, b) make_pair(a, b)
#define F first
#define S second
#define INF 1 << 30
typedef pair<int, int> pi;
typedef pair<int, pi> pii;
typedef vecto... | a.cc: In function 'int main()':
a.cc:35:18: error: expected '}' at end of input
35 | return 0;
| ^
a.cc:21:12: note: to match this '{'
21 | int main() {
| ^
|
s462846044 | p00161 | C++ | M(int*a){return*a-*1[&a];}n,T[9999][2];j,m,s;main(i){for(;~scanf("%d",&n);qsort(T,n,8,M),n&&printf("%d\n%d\n%d\n",1[*T],T[1][1],T[n-2][1]))for(i=n;i--;)for(scanf("%d",T[i]+1),*T[i]=0,j=4;j--;*T[i]+=m*60+s)scanf("%d%d",&m,&s);} | a.cc:1:1: error: ISO C++ forbids declaration of 'M' with no type [-fpermissive]
1 | M(int*a){return*a-*1[&a];}n,T[9999][2];j,m,s;main(i){for(;~scanf("%d",&n);qsort(T,n,8,M),n&&printf("%d\n%d\n%d\n",1[*T],T[1][1],T[n-2][1]))for(i=n;i--;)for(scanf("%d",T[i]+1),*T[i]=0,j=4;j--;*T[i]+=m*60+s)scanf("%d%d",&m,&s);}
... |
s992896840 | p00161 | C++ | #include <iostream>
#include <cstring>
#include <vector>
using namespace std;
typedef pair<int, int> P;
int n;
vector<P> ps;
int main()
{
int c, m, s, sum;
while(cin >> n && n) {
ps.clear();
for(int k = 0; k < n; k++) {
cin >> c;
sum = 0;
for(int i = 0; i <... | a.cc: In function 'int main()':
a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'short'?
25 | sort(ps.begin(), ps.end());
| ^~~~
| short
|
s843092182 | p00161 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
int h,n,i,j,num[1000][1000],sum[1000],xmax=0;
while(1){
xmax=0;
cin >> n;
for(i=0;i<n;i++){
for(j=0;j<9;j++){
cin >> num[i][j];
if(j>0 && j%2 == 0){
sum[i]+=num[i][j];
}
else if(j>0 && j%2 != 0){
... | a.cc: In function 'int main()':
a.cc:59:4: error: expected '}' at end of input
59 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s046206679 | p00161 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef pair<int,int> P;
vector<P> a;
int main() {
int n,m,s,c1,m1,s1,m2,s2,m3,s3,m4,s4;
while(cin >> n) {
a.clear();
if(n==0) break;
for(int i=0;i<n;i++) {
cin >> c1 >> m1 >> s1 >> m2 >> s2 >> m3 >> s3 >> m4 >> s4;
m = m1+m2+m3+m4... | a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(a.begin(),a.end());
| ^~~~
| short
|
s226777208 | p00161 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<string>
#include<queue>
#include<map>
#include<stack>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<sstream>
#define reps(i,f,n) for(int i = f; i < int(n); i++)
#define rep(i,n) reps(i,0,n)
#define PII pair<int,int>
#defin... | a.cc:21:26: error: invalid declarator before ';' token
21 | typedef pair<int,int> PII;
| ^
|
s556044511 | p00161 | C++ | include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
class sorting{
public:
bool operator()(const pair<int,int>& left,const pair<int,int>& right)const{
return left.first < right.first;
}
};
int main(){
int n;
while(cin >> n,n){
vector<pair<int,int> > dat;
i... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu... |
s274883406 | p00161 | C++ | #include <iostream>
#include <vector>
#include <utility>
using namespace std;
int main()
{
int a, time, number, m1, s1, m2, s2, m3, s3, m4, s4;
vector<pair <int, int> > team;
while(1)
{
cin >> a;
if (a == 0)
{
break;
}
team.clear();
for(int i = 0; i < a; i++)
{
cin >> number;
cin >> m1 >> ... | a.cc: In function 'int main()':
a.cc:29:17: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(team.begin(), team.end());
| ^~~~
| short
|
s480156147 | p00161 | C++ | #include <iostream>
#include <vector>
#include <utility>
using namespace std;
int main()
{
int a, time, number, m1, s1, m2, s2, m3, s3, m4, s4;
vector<pair <int, int> > team;
while(1)
{
cin >> a;
if (a == 0)
{
break;
}
team.clear();
for(int i = 0; i < a; i++)
{
cin >> number;
cin >> m1 >> ... | a.cc: In function 'int main()':
a.cc:29:17: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(team.begin(), team.end());
| ^~~~
| short
|
s832374230 | p00161 | C++ | #include <iostream>
#include <vector>
#include <utility>
using namespace std;
int main()
{
int a, time, number, m1, s1, m2, s2, m3, s3, m4, s4;
vector<pair<int, int> > team;
while(1)
{
cin >> a;
if (a == 0)
{
break;
}
team.clear();
for(int i = 0; i < a; i++)
{
cin >> number;
cin >> m1 >> s... | a.cc: In function 'int main()':
a.cc:29:17: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(team.begin(), team.end());
| ^~~~
| short
|
s395979636 | p00161 | C++ | #include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <boost/bind.hpp>
using namespace std;
int main(){
int n;
while(cin >> n, n){
typedef pair<int, int> value_type;
vector<value_type> team;
int c, m, s;
for(int j=0; j < n; j++){
cin ... | a.cc:5:10: fatal error: boost/bind.hpp: No such file or directory
5 | #include <boost/bind.hpp>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s839637368 | p00162 | Java | #include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include <string>
#include <complex>
#include <functional>
using namespace std;
typedef pair<int,int> P;
int h[1000001];
int main(){
h[1]=1;
for(int i=2;i<=1000000;i*=2)h[i]=1;
for(int i=1;i<=1000000;i++){
if(... | Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<math.h>
^
Main.java:3: error: illegal character: '#'
#include<vector>
^
Main.java:4: error: illegal character: '#'
#include<algorithm>
^
Main.java:5: error: illegal character: '#'
#include<cstdio>
^
Main.... |
s613783486 | p00162 | C | #include <stdio.h> // printf(), scanf()
#include <stdbool.h>
#define MAX_N 1000000
bool f[MAX_N + 1];
void
preparation()
{
for (int i = 0; i <= MAX_N; ++i)
f[i] = false;
for (int i = 1; i <= MAX_N; ++i)
{
int j = i;
while (j % 2 == 0)
j /= 2;
while (j % 3 == 0)
j /= 3;
while (j % 5 == ... | main.c: In function 'main':
main.c:47:29: error: 'f2' undeclared (first use in this function); did you mean 'f'?
47 | if (f2[i])
| ^~
| f
main.c:47:29: note: each undeclared identifier is reported only once for each function ... |
s130507412 | p00162 | C | #include<iostream>
#include<cmath>
using namespace std;
const int MAX_NUM = 1000;
int main(){
bool list[MAX_NUM + 1] = {0};
for(int two = 0;two <= 20;two++){
for(int three = 0;three <= 13;three++){
for(int five = 0;five <= 9;five++){
int num = pow(2, two) * pow(3, three) * pow(5, five);
if(1 <= num &... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s667175148 | p00162 | C++ | #include<stdio.h>
int main(){
int x,y,c=0;
while(scanf("%d %d",&x,&y)
{
for(int i=x;i<=y;y++)
{
if(i%2==0)c++;
else if(i%3==0)c++;
else if(i%5==0)c++;
}
printf("%d\n",c);c=0;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:27: error: expected ')' before '{' token
7 | while(scanf("%d %d",&x,&y)
| ~ ^
| )
8 | {
| ~
|
s593648907 | p00162 | C++ | #include<stdio.h>
int main(){
int x,y,c=0;
while(scanf("%d %d",&x,&y)
{
for(int i=x;i<=y;y++)
{
if(i%2==0)c++;
else if(i%3==0)c++;
else if(i%5==0)c++;
}
printf("%d\n",c);c=0;
}
return 0;
}
#include<stdio.h>
int main(){
int x,y,c=0;
while(scanf("%d %d",&x,&y))
{
for(int i=x;i<=y;i++)
{
if(i%2==0)c++;
else if(i%3=... | a.cc: In function 'int main()':
a.cc:7:27: error: expected ')' before '{' token
7 | while(scanf("%d %d",&x,&y)
| ~ ^
| )
8 | {
| ~
a.cc: At global scope:
a.cc:22:5: error: redefinition of 'int main()'
22 | int main(... |
s262078595 | p00162 | C++ | #include<stdio.h>
int main(){
int x,y,c=0;
bool f[1000001];
for(int i=0;i<=1000001;i++)
f[i]=false;
for(int i=0;i<=1000001;i++)
{
if(i%2==0)f[i]=true;
else if(i%3==0)f[i]=true;
else if(i%5==0)f[i]=true;
}
while(scanf("%d %d",&x,&y))
{
for(int i=x;i<=y;i++)
{if(bool[i]==true)c++;
}
/*
for(int i=x;i<=y;i++)
{
... | a.cc: In function 'int main()':
a.cc:19:9: error: expected unqualified-id before '[' token
19 | {if(bool[i]==true)c++;
| ^
|
s042638078 | p00162 | C++ | #include <iostream>
using namespace std;
int isHammingNumber(int n){
int p=n;
while(p%2 == 0)p/=2;
while(p%3 == 0)p/=3;
while(p%5 == 0)p/=5;
return p==1;
}
int main() {
int m,n;
int count;
while(count=0,cin>>m>>n,m){
for(int i=m;i<=n;++i)if(HammingNumber(i))++count;
cout << count << endl;
}
return 0... | a.cc: In function 'int main()':
a.cc:18:41: error: 'HammingNumber' was not declared in this scope; did you mean 'isHammingNumber'?
18 | for(int i=m;i<=n;++i)if(HammingNumber(i))++count;
| ^~~~~~~~~~~~~
| isHam... |
s679828213 | p00162 | C++ | ##include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
int main(){
long long int A,B;
int n[101][101][3]={};
while(1){
cin>>A>>B;
if(A==0&&B==0)break;
long long int g=60;int c=0;
for(long long int i=A;i<=B;i++){g=60;
for(long long int j=1;j<11;j++)
{
if(g%i==0){//cout<<g<<endl... | a.cc:1:1: error: stray '##' in program
1 | ##include<stdio.h>
| ^~
a.cc:1:3: error: 'include' does not name a type
1 | ##include<stdio.h>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:2... |
s810029732 | p00162 | C++ | #include<iostream>
using namespace std;
typedef long long L;
int main() {
L m,n;
L a = pow(60,9);
while (cin >> m, m) {
cin >> n;
int ans = 0;
for (L i = m; i <= n; i++) {
if (a%i==0)ans++;
}
cout << ans << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:15: error: 'pow' was not declared in this scope
6 | L a = pow(60,9);
| ^~~
|
s453944304 | p00162 | C++ | #include <iostream>
using namespace std;
int main() {
int m, n;
while(1) {
cin << m << n;
if(m == 0)
break;
int count = 0;
for(int i = m; i <= n; i++) {
if(i % 2 == 0)
continue;
else if(i % 3 == 0)
continue;
else if(i % 5 == 0)
continue;
else
... | a.cc: In function 'int main()':
a.cc:8:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
8 | cin << m << n;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:8:9: note: can... |
s163823459 | p00162 | C++ | #include <iostream>
using namespace std;
int main() {
int m, n;
int num;
while(1) {
cin >> m >> n;
if(m == 0)
break;
int count = 0;
for(int i = m; i <= n; i++) {
num = i;
while(1) {
if(num == 1) {
count++;
break;
}
if(num % 2 == 0)
... | a.cc: In function 'int main()':
a.cc:33:2: error: expected '}' at end of input
33 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s118699002 | p00162 | 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
| |
s248754228 | p00162 | C++ | #include<queue>
#include<iostream>
#include<functional>
using namespace std;
bool bh[1000001];
int main()
{
priority_queue< int,vector<int>,greater<int> > pq;
pq.push(1); bh[1]=true;
while(pq.top()<1000000){
int a=pq.top(); pq.pop();
if(2*a<=1000000&&!bh[2*a]) pq.push(2*a),bh[2*a]=true;
if(3*a<=1000000&&!bh... | a.cc: In function 'int main()':
a.cc:26:42: error: 'upper_bound' was not declared in this scope
26 | upper_bound(ham.begin(),ham.end(),n))
| ^~~~~~~~~~~
|
s783003034 | p00162 | C++ | #include<iostream>
using namespace std;
/*
bool sw[1000001];
int i;
void sws(int k){
if(k==1){
sw[i]=true;
return;
}
if(k%2==0) sws(k/2);
else if(k%3==0) sws(k/3);
else if(k%5==0) sws(k/5);
return;
}
*/
// korenisuru
int dp[1000001];
int ... | a.cc: In function 'int f(int)':
a.cc:23:9: error: 'else' without a previous 'if'
23 | else if(n%2==0) ans |= f(n/2);
| ^~~~
|
s134827123 | p00162 | C++ | #include<iostream>
#define N 1000001
using namespace std;
int main(){
int num;
int sum[N];
int n,m;
sum[0] = 0;
num = 0;
for(int i=1;i<N;i++){
int tmp = i;
while(!(tmp%2))tmp/=2;
while(!(tmp%3))tmp/=3;
while(!(tmp%5))tmp/=5;
if(tmp==1)num++;
sum[i] = num;
}
while(1){
cin >> m;
if(!m)break;
cin >>n;
cout << sum[m] - ... | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s532809735 | p00162 | C++ | #include<iostream>
using namespace std;
bool ham[100001];
int m,n;
void solve(){
for(int i=1; i<6; i++)
ham[i] = true;
for(int i=6; i<100001; i++)
ham[i] = false;
for(int i=2; i<100001; i++){
if(ham[i]){
for(int j=i*2; j<size; j*=2){
if(j>100001)
break;
ham[j] = true;
}for(int j=i*3; j<siz... | a.cc: In function 'void solve()':
a.cc:14:41: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
14 | for(int j=i*2; j<size; j*=2){
| ~^~~~~
a.cc:18:42: error: invalid operands of types 'int' an... |
s534194272 | p00162 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
vector<int> hamming;
void ham() {
int temp;
for(int i=0;i<20;i++) {
for(int j=0;j<20;j++) {
for(int k=0;k<20;k++) {
temp = pow(2.0,(double)i)*pow(3.0,(double)j)*pow(5.0,(double)k);
if(temp <= 1000000 && temp >= 0... | a.cc: In function 'int main()':
a.cc:30:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
30 | sort(hamming.begin(),hamming.end());
| ^~~~
| sqrt
a.cc:33:8: error: 'upper_bound' was not declared in this scope
33 | up=upper_bound(hamming.begin(),hamming.end(),n);
| ... |
s960266824 | p00162 | C++ | #include<iostream>
#include<algorithm>
#define MAXNUM 1e+6;
using namespace std;
int ham[4]={1,2,3,5};
bool memo[MAXNUM+1]={false};
void func(int n){
if(n>MAXNUM || memo[n]==true){
return ;
}
func(n*2);
func(n*3);
func(n*5);
}
int main(){
int m,n,ans;
func(1);
while(cin>>m>>n,m){
ans=0;
for(int i=m;... | a.cc:3:20: error: expected ']' before ';' token
3 | #define MAXNUM 1e+6;
| ^
a.cc:8:11: note: in expansion of macro 'MAXNUM'
8 | bool memo[MAXNUM+1]={false};
| ^~~~~~
a.cc:8:17: error: expected unqualified-id before '+' token
8 | bool memo[MAXNUM+1]={false};
| ... |
s182197817 | p00162 | C++ | #include<iostream>
#include<vector>
using namespace std;
#define MAX 1000010
int main(){
int hamming[MAX];
memset(hamming,0,sizeof(int)*MAX);
hamming[0]=0;
hamming[1]=1;
long int tmp =0;
for(int i=0;tmp<MAX;i++){
for(int j=0;tmp<MAX;j++){
for(int k=0;tmp<MAX;k++){
tmp =pow(2,i)*pow(3,j)*pow(5,k);
if... | a.cc: In function 'int main()':
a.cc:8:9: error: 'memset' was not declared in this scope
8 | memset(hamming,0,sizeof(int)*MAX);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<vector>
+++ |+#include ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.