submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s036548546 | p00762 | C++ | #include <iostream>
#define N first
#define H second
#define mk(x, y) make_pair(x, y)
using namespace std;
typedef pair<int, int> pii;
enum drctY {
NONE = 0, UP, DOWN, LEFT, RIGHT
};
struct _X {
int back, front;
int left, right;
int bottom, top;
};
struct _Y {
int top, bottom;
int front, back;
in... | a.cc: In function 'int main()':
a.cc:118:17: error: 'memset' was not declared in this scope
118 | memset(fd, 0, sizeof(fd));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+... |
s706507413 | p00762 | C++ | #include <iostream>
#include <cstdlib>
// 2, 3, 5, 4, 1, 6
class BiasedDice
{
private:
enum { N = 29, NOF = 6, NOW = 4 }; // N: table size, NOF: num of face, NOW: num of way
int blocks[N][N]; // block table
int heights[N][N]; // height table
// dice table
static const int dice[NOF][NOF];
// rotation
static c... | a.cc: In constructor 'BiasedDice::BiasedDice()':
a.cc:25:17: error: 'memset' was not declared in this scope
25 | memset(blocks, 0, sizeof(blocks));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 |... |
s097429280 | p00762 | C++ | #include <iostream>
#define MAX 8
using namespace std;
struct Field{
int base[MAX*2][MAX*2],*tmp[MAX*2],**val;
};
int die[3][4]={{2,4,5,3},{1,3,6,4},{1,5,6,2}};
Field rank,top;
void cvt(Field*);
void fall(int,int,int,int);
void rot(int []);
int main(void){
int n,t,f,nums[6];
cvt(&rank);
cvt(&top);
do{
cin... | a.cc: In function 'int main()':
a.cc:20:14: error: reference to 'rank' is ambiguous
20 | cvt(&rank);
| ^~~~
In file included from /usr/include/c++/14/bits/move.h:37,
from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr/include/c++/14/exception:166,
... |
s194285036 | p00762 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstdio>
#include <queue>
#include <stack>
#include <map>
#include <cstdlib>
#define rep(i, n) for(int i = 0; i < n; i++)
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define all(v) (v).begin(), (v).end()
#define MP make_pair
usi... | a.cc: In function 'std::vector<int> getdir(int, int)':
a.cc:57:9: error: 'memset' was not declared in this scope
57 | memset(numdir, -1, sizeof(numdir));
| ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
9 | #include... |
s805624346 | p00762 | C++ | #include <iostream>
#include <cstdlib>
using namespace std;
//倒れる向き
#define FRONT 0
#define RIGHT 1
#define BACK 2
#define LEFT 3
//地面の中心
#define CENTER 15
int input[100][2], answer[6], height = 0, n, k = 0, w = 0; //入力される数字、答え、高さ、処理する番号、どっちの回転が適用されたか
int x, y; //現在の座標
int tmp[2];// top and front
int field[30][30][... | a.cc: In function 'void Init()':
a.cc:234:9: error: 'memset' was not declared in this scope
234 | memset(answer, 0, sizeof(answer));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cstdlib>
+++ |+#inc... |
s910949247 | p00762 | C++ | g#include <iostream>
#include <cstring>
using namespace std;
//倒れる向き
#define FRONT 0
#define RIGHT 1
#define BACK 2
#define LEFT 3
//地面の中心
#define CENTER 100
int input[100][2], answer[6], height = 0, n, k = 0, w = 0; //入力される数字、答え、高さ、処理する番号、どっちの回転が適用されたか
int x, y; //現在の座標
int tmp[2];// top and front
int field[201][2... | a.cc:1:2: error: stray '#' in program
1 | g#include <iostream>
| ^
a.cc:1:1: error: 'g' does not name a type
1 | g#include <iostream>
| ^
a.cc: In function 'int main()':
a.cc:247:9: error: 'cin' was not declared in this scope
247 | cin >> n;
| ^~~
a.cc:3:1: note: 'std::cin' ... |
s871797404 | p00762 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef struct dice{
int x;
int y;
int z;
int top;
int front;
} dice;
dice D[100];
int tops[100][100][100];
//memset( tops, 0, sizeof(tops));
int z_top = -1;
void roll( int i){
int x = D[i].x, y = D[i].y, z = D[i].z;
if( D[i].z ==... | a.cc: In function 'void roll(int)':
a.cc:31:32: error: no matching function for call to 'max(int&, std::ios_base& (&)(std::ios_base&))'
31 | if( max(D[i].front, max(back, max(left, right))) == right ){
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/s... |
s695519235 | p00763 | Java | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define NA 1000000000
typedef struct tFare
{
int borderDistance[50];
int faresPerUnitDistance[50];
} TFare;
int n, m, c, s, g;
int intervalNum[20];
TFare fareData[20];
int distances[20][100][100];
int fares[20][100][100];
int faresConsideredAllCompany[10... | Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:2: error: illegal character: '#'
#include <stdlib.h>
^
Main.java:3: error: illegal character: '#'
#include <stdbool.h>
^
Main.java:5: error: illegal char... |
s248112626 | p00763 | Java | import java.util.Arrays;
import java.util.Scanner;
public class Main_old {
public static final int MAX_DIST = 20000;
public static final int INF = Integer.MAX_VALUE / 2 - 1;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
final int n = sc.nextInt();
final in... | Main.java:4: error: class Main_old is public, should be declared in a file named Main_old.java
public class Main_old {
^
1 error
|
s159339943 | p00763 | Java | #include <stdio.h>
#define inf 1000000000
struct company_info{
int rail[100][100];
int p;
int dst[51];
int cost[10001];
};
int main(){
int n, m, c, s, g;
struct company_info company[20];
int i, j, k, l;
int x, y, d, ci;
int r;
int dp[100][100];
while(1){
scanf("%d %d %d %d %d", &n, &m, &c, &s, &g);
... | Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:3: error: illegal character: '#'
#define inf 1000000000
^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
int p;
... |
s480242709 | p00763 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#define INF INT_MAX>>1
using namespace std;
int main(void){
while(1){
int n, m, c, s, g;
cin >> n >> m >> c >> s >> g;
if(!n && !m && !c && !s && !g) break;
s--; g--;
static int dist[100][100][20];
for(int i=0; i<n; i++){
for(int j=0; j<n; ... | a.cc: In function 'int main()':
a.cc:5:13: error: 'INT_MAX' was not declared in this scope
5 | #define INF INT_MAX>>1
| ^~~~~~~
a.cc:21:62: note: in expansion of macro 'INF'
21 | else dist[i][j][k] = INF;
| ... |
s013507636 | p00763 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#define INF INT_MAX>>1
using namespace std;
int main(void){
while(1){
int n, m, c, s, g;
cin >> n >> m >> c >> s >> g;
if(!n && !m && !c && !s && !g) break;
s--; g--;
static int dist[100][100][20];
for(int i=0; i<n; i++){
for(int j=0; j<n; ... | a.cc: In function 'int main()':
a.cc:5:13: error: 'INT_MAX' was not declared in this scope
5 | #define INF INT_MAX>>1
| ^~~~~~~
a.cc:21:62: note: in expansion of macro 'INF'
21 | else dist[i][j][k] = INF;
| ... |
s211650605 | p00763 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<cassert>
#include<cstdio>
#include<queue>
using namespace std;
int n, m, c, s, g, D[100][100][20], P[20], Q[20][51], R[20][51];//n:駅数,m:路線数,c:会社数,s:スタート,g:ゴール,D:距離,P:運賃規定区間数,Q:運賃増加率変化距離,R:運賃変化率
const int inf = 1001001001;//inf:上限
int K[100];//K:スタートからその... | a.cc: In function 'int main()':
a.cc:80:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
80 | scanf_s("%d%d%d%d%d", &n, &m, &c, &s, &g); s--; g--;
| ^~~~~~~
| scanf
|
s943452749 | p00763 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<cassert>
#include<cstdio>
#include<queue>
using namespace std;
int n, m, c, s, g, D[100][100][20], P[20], Q[20][51], R[20][51];//n:駅数,m:路線数,c:会社数,s:スタート,g:ゴール,D:距離,P:運賃規定区間数,Q:運賃増加率変化距離,R:運賃変化率
const int inf = 1001001001;//inf:上限
int K[100];//K:スタートからその... | a.cc: In function 'int main()':
a.cc:80:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
80 | scanf_s("%d%d%d%d%d", &n, &m, &c, &s, &g); s--; g--;
| ^~~~~~~
| scanf
|
s165718376 | p00763 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<cassert>
#include<cstdio>
#include<queue>
using namespace std;
int n, m, c, s, g, D[100][100][20], P[20], Q[20][51], R[20][51];//n:駅数,m:路線数,c:会社数,s:スタート,g:ゴール,D:距離,P:運賃規定区間数,Q:運賃増加率変化距離,R:運賃変化率
const int inf = 1001001001;//inf:上限
int K[100];//K:スタートからその... | a.cc: In function 'int main()':
a.cc:80:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
80 | scanf_s("%d%d%d%d%d", &n, &m, &c, &s, &g); s--; g--;
| ^~~~~~~
| scanf
|
s833734034 | p00763 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define M_MAX 1000000000000000;
int main() {
while( true ) {
long long int n, m, c, s, g;
cin >> n >> m >> c >> s >> g;
if ( n == 0 ) break;
long long int d[101][101][21] = {};
for ( long long int i = 0; i <= n; i++ ) {
for ( l... | a.cc: In function 'int main()':
a.cc:5:31: error: expected ')' before ';' token
5 | #define M_MAX 1000000000000000;
| ^
a.cc:50:21: note: in expansion of macro 'M_MAX'
50 | vq.push_back( M_MAX );
| ^~~~~
a.cc:50:19: note: to match this '('
50... |
s906554931 | p00763 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<functional>
using namespace std;
int n,m,c,s,g,A,B,C,D,z[22][22000],r1[22][60],r2[22][60],r0[22],dp[102];
vector<pair<int,int>>X[22][102];
int dist[22][102][102],dist2[102][102];
priority_queue<pair<int, int>, vector<pair<int, int>>, great... | a.cc: In function 'void dijkstra(int, int)':
a.cc:15:29: error: cannot convert 'const __gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'const std::pair<int, int>'} to 'int' in initialization
15 | int a1=Q.top()first,a2=Q.top().second;Q.pop();
... |
s835613438 | p00763 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<functional>
using namespace std;
int n,m,c,s,g,A,B,C,D,z[22][22000],r1[22][60],r2[22][60],r0[22],dp[102];
vector<pair<int,int>>X[22][102];
int dist[22][102][102],dist2[102][102];
priority_queue<pair<int, int>, vector<pair<int, int>>, great... | a.cc: In function 'int main()':
a.cc:28:44: error: 'breakj' was not declared in this scope
28 | cin>>n>>m>>c>>s>>g;if(n==0)breakj;
| ^~~~~~
a.cc:50:69: error: 'd' was not declared in this scope
50 | dist2[j][k... |
s691726541 | p00763 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<functional>
using namespace std;
int n,m,c,s,g,A,B,C,D,z[22][22000],r1[22][60],r2[22][60],r0[22],dp[102];
vector<pair<int,int>>X[22][102];
int dist[22][102][102],dist2[102][102];
priority_queue<pair<int, int>, vector<pair<int, int>>, great... | a.cc: In function 'int main()':
a.cc:28:44: error: 'breakj' was not declared in this scope
28 | cin>>n>>m>>c>>s>>g;if(n==0)breakj;
| ^~~~~~
a.cc:50:69: error: 'd' was not declared in this scope
50 | dist2[j][k... |
s186509997 | p00763 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<functional>
using namespace std;
int n,m,c,s,g,A,B,C,D,z[22][22000],r1[22][60],r2[22][60],r0[22],dp[102];
vector<pair<int,int>>X[22][102];
int dist[22][102][102],dist2[102][102];
priority_queue<pair<int, int>, vector<pair<int, int>>, great... | a.cc: In function 'int main()':
a.cc:50:56: error: no matching function for call to 'min(int&, int [22000])'
50 | dist2[j][k]=min(dist2[j][k],z[dist[i][j][k]]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ... |
s519076628 | p00763 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long // <-----!!!!!!!!!!!!!!!!!!!
#define rep(i,n) for (int i=0;i<(n);i++)
#define rep2(i,a,b) for (int i=(a);i<(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define rrep2(i,a,b) for (int i=(a)-1;i>=b;i--)
#define all(a) (a).begin(),(a).end()
#de... | a.cc:59:5: error: ISO C++ forbids declaration of 'print' with no type [-fpermissive]
59 | print() {
| ^~~~~
a.cc: In member function 'int edge::print()':
a.cc:61:5: warning: no return statement in function returning non-void [-Wreturn-type]
61 | }
| ^
|
s104859955 | p00763 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long // <-----!!!!!!!!!!!!!!!!!!!
#define rep(i,n) for (int i=0;i<(n);i++)
#define rep2(i,a,b) for (int i=(a);i<(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define rrep2(i,a,b) for (int i=(a)-1;i>=b;i--)
#define all(a) (a).begin(),(a).end()
#de... | a.cc:59:5: error: ISO C++ forbids declaration of 'print' with no type [-fpermissive]
59 | print() {
| ^~~~~
a.cc: In member function 'int edge::print()':
a.cc:61:5: warning: no return statement in function returning non-void [-Wreturn-type]
61 | }
| ^
|
s535871769 | p00763 | C++ | #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <func... | a.cc: In function 'int main()':
a.cc:102:42: error: 's' was not declared in this scope
102 | }s
| ^
|
s807632877 | p00763 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<functional>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)
#define INF INT_MAX/2
#define ll long long
int dist[21][101][101];
int ddist[101][101];
int p[21];
int q[21][51];
int r[21][51];
int getCost(int c... | a.cc: In function 'int main()':
a.cc:9:13: error: 'INT_MAX' was not declared in this scope
9 | #define INF INT_MAX/2
| ^~~~~~~
a.cc:48:46: note: in expansion of macro 'INF'
48 | else dist[i][j][k] = INF;
| ^~~
a.cc:7:1: ... |
s520704343 | p00763 | C++ | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
//#define int long long
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f... | a.cc: In function 'int main()':
a.cc:40:37: error: 'c' was not declared in this scope
40 | rep(i, 0, p[c])
| ^
a.cc:10:37: note: in definition of macro 'rep'
10 | #define rep(i,a,b) for(int i=(a);i<(b);i++)
| ... |
s846823343 | p00763 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <string>
#include <algorithm>
#include <utility>
#include <cstring>
using namespace std;
template <typename T>
using reverse_queue = std::priority_queue<T, std::vector<T>, std::greater<T> >;
#define REP(var, count) for(int var=0;... | a.cc: In function 'bool loop()':
a.cc:75:47: error: 'INT_MAX' was not declared in this scope
75 | table[i].push_back( make_pair(INT_MAX, -1) );
| ^~~~~~~
a.cc:9:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding ... |
s264639629 | p00763 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int N, M, C, s, g, INF = 1e9;
while(cin >> N >> M >> C >> s >> g, N){
--s;--g;
vector< vector<int> > G(N, vector<int>(N,INF));
vector< vector< vector<int> > > D(C, G);
int x, y, d, c;
for(int i = 0; i < M; ++i){
cin >>... | a.cc: In function 'int main()':
a.cc:50:19: error: 'upper_bound' was not declared in this scope
50 | int t = upper_bound(Q[c].begin(), Q[c].end(), d) - Q[c].begin() - 1;
| ^~~~~~~~~~~
|
s507250585 | p00763 | C++ | a
| a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s602143964 | p00763 | C++ | def solve():
import sys
from itertools import combinations
from bisect import bisect
from heapq import heappush, heappop
file_input = sys.stdin
inf = float('inf')
while True:
n, m, c, s, g = map(int, file_input.readline().split())
if n == 0:
break
... | a.cc:7:17: warning: multi-character character constant [-Wmultichar]
7 | inf = float('inf')
| ^~~~~
a.cc:13:11: error: invalid preprocessing directive #Adjacency
13 | # Adjacency matrices recording distances for each company
| ^~~~~~~~~
a.cc:30:11: error: invalid... |
s853625103 | p00763 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
const ll INF = 300000000000;
ll N, M, C, S, g;
ll x[10000], y[10000], D[10000], c[10000];
ll p[20];
ll q[20][50], r[20][50];
ll sum[20][50];
ll money(ll company, ll length) {
ll u = upper_bound(q[co... | a.cc:82:1: error: '::main' must return 'int'
82 | ll main(){
| ^~
|
s572934858 | p00763 | C++ | #include <iostream>
#include <queue>
using namespace std;
#define MAX_N 100
#define MAX_C 20
#define MAX_P 50
#define MAX_D 200
#define MAX_R 10001
#define INF 0xfffffff
int fare[MAX_C][MAX_R + MAX_D];
int p[MAX_C];
int q[MAX_C][MAX_P];
int r[MAX_C][MAX_P];
bool done[MAX_N][MAX_C][MAX_R];
class node {
public:
int ... | a.cc: In function 'int dijkstra(int, int)':
a.cc:41:9: error: 'memset' was not declared in this scope
41 | memset(done, false, sizeof(done));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <queue>
++... |
s743711546 | p00763 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
const int INF=1000000000;
using namespace std;
struct edge{int to,cost;};
typedef pair<int,int>P;
int V,d[101];
vector<edge>G[101];
void dijkstra(int s){
priority_queue<P,vector<P>,greater<P> >que;
fill(d,d+V,INF);
d[s]=0;
que.pus... | a.cc: In function 'int main()':
a.cc:59:23: error: invalid types 'int[int]' for array subscript
59 | graph[C][x][y]=C[C][y][x]=min(graph[C][x][y],D);
| ^
|
s922032201 | p00764 | C++ | #include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
//#include <utility>
#include <set>
#include <iostream>
//#include <memory>
#include <string>
#include <vector>
#include <algorithm>
//#include <functional>
#include <sstream>
//#include <deque>
#include <co... | In file included from /usr/include/c++/14/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
from a.cc:1:
a.cc:86:14: error: expected unqualified-id before numeric constant
86 | const double M_PI = asin(0.5)*6;
| ^~~~
a.cc:410:1: warning: ISO C... |
s492912816 | p00764 | C++ | #include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
//#include <utility>
#include <set>
#include <iostream>
//#include <memory>
#include <string>
#include <vector>
#include <algorithm>
//#include <functional>
#include <sstream>
//#include <deque>
#include <co... | In file included from /usr/include/c++/14/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
from a.cc:1:
a.cc:86:14: error: expected unqualified-id before numeric constant
86 | const double M_PI = acos(-1);
| ^~~~
a.cc:410:1: warning: ISO C++ ... |
s461060143 | p00764 | C++ | #include <cstdio>
#include <algorithm>
// double
struct P{
P(){}
P(double _r, double _i):r(_r), i(_i){}
void real(const double& v){r = v;}
void imag(const double& v){i = v;}
double r, i;
};
double real(const P& p){return p.r;}
double imag(const P& p){return p.i;}
double norm(const P& p){double r =... | a.cc: In function 'double dist(const P&)':
a.cc:16:37: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
16 | double dist(const P& p){return std::sqrt(norm(p));}
| ^~~~
| sort
a.cc: In function 'int main()':
a.cc:107:26: e... |
s875156387 | p00764 | C++ | import java.awt.geom.Line2D;
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
while (true) {
int n = sc.nextInt();
if (n == 0)
break;
double[] x = new... | a.cc:1:1: error: 'import' does not name a type
1 | import java.awt.geom.Line2D;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.PrintWriter;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmod... |
s028141028 | p00764 | C++ | 10
802 0 10
814 0 4
820 1 4
826 1 4
832 3 5
838 5 5
845 7 3
849 10 3
853 14 4
857 18 3
3
0 0 5
8 0 5
8 8 5
3
0 0 5
7 3 6
16 0 5
9
0 3 5
8 0 8
19 2 8
23 14 6
23 21 6
23 28 6
19 40 8
8 42 8
0 39 5
11
0 0 5
8 0 5
18 8 10
8 16 5
0 16 5
0 24 5
3 32 5
10 32 5
17 28 8
27 25 3
30 18 5
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10
| ^~
|
s314582650 | p00764 | C++ | 10
802 0 10
814 0 4
820 1 4
826 1 4
832 3 5
838 5 5
845 7 3
849 10 3
853 14 4
857 18 3
3
0 0 5
8 0 5
8 8 5
3
0 0 5
7 3 6
16 0 5
9
0 3 5
8 0 8
19 2 8
23 14 6
23 21 6
23 28 6
19 40 8
8 42 8
0 39 5
11
0 0 5
8 0 5
18 8 10
8 16 5
0 16 5
0 24 5
3 32 5
10 32 5
17 28 8
27 25 3
30 18 5
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10
| ^~
|
s655805136 | p00764 | C++ | 10
802 0 10
814 0 4
820 1 4
826 1 4
832 3 5
838 5 5
845 7 3
849 10 3
853 14 4
857 18 3
3
0 0 5
8 0 5
8 8 5
3
0 0 5
7 3 6
16 0 5
9
0 3 5
8 0 8
19 2 8
23 14 6
23 21 6
23 28 6
19 40 8
8 42 8
0 39 5
11
0 0 5
8 0 5
18 8 10
8 16 5
0 16 5
0 24 5
3 32 5
10 32 5
17 28 8
27 25 3
30 18 5
0
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10
| ^~
|
s877589665 | p00764 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <limits.h>
#include <float.h>
#include <queue>
#define eps 10e-5
#define INF 1e8
#define M INT_MAX
using namespace std;
struct P{
double x;
double y;
P(){
x=M; y=M;
}
P(const double &s , const double &e)
{ x=s; y=e;}
P o... | a.cc:127:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
127 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:132:17: error: 'memset' was not declared in this scope
132 | memset(v, 0, sizeof(v));
| ^~~~~~
a.cc:8:1: note: 'memset' is def... |
s882181120 | p00764 | C++ | #include<iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <stack>
#include <list>
#include <map>
#include <cmath>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <climits>
#include <queue>
#include <stack>
using namespace std;
const dou... | a.cc: In instantiation of 'Po<T> Po<T>::operator-(const Po<T>&) const [with T = double]':
a.cc:49:10: required from here
49 | b = b - a; c = c - a;
| ^
a.cc:29:51: error: expected primary-expression
29 | Po operator-(const Po& a) const { return P(x - a.x,y - a.y); }
|... |
s680151455 | p00764 | C++ | #include<iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <stack>
#include <list>
#include <map>
#include <cmath>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <climits>
#include <queue>
#include <stack>
using namespace std;
const dou... | a.cc: In function 'double abs(const P&)':
a.cc:39:43: error: 'double Po<double>::x' is private within this context
39 | double abs(const P& a) { return sqrt(SQ(a.x) + SQ(a.y)); }
| ^
a.cc:25:11: note: declared private here
25 | T x,y;
| ^
a.c... |
s796219191 | p00764 | C++ | #include<iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <stack>
#include <list>
#include <map>
#include <cmath>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <climits>
#include <queue>
#include <stack>
using namespace std;
const dou... | a.cc: In instantiation of 'Po<T> Po<T>::operator-(const Po<T>&) const [with T = double]':
a.cc:49:10: required from here
49 | b = b - a; c = c - a;
| ^
a.cc:29:51: error: expected primary-expression
29 | Po operator-(const Po& a) const { return P(x - a.x,y - a.y); }
|... |
s161795095 | p00764 | C++ | #include<iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <stack>
#include <list>
#include <map>
#include <cmath>
#include <utility>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <climits>
#include <queue>
#include <stack>
using namespace std;
const dou... | a.cc:26:9: error: ISO C++ forbids declaration of 'Po' with no type [-fpermissive]
26 | Po() : x(0.0),y(0.0) {}
| ^~
a.cc:27:9: error: ISO C++ forbids declaration of 'Po' with no type [-fpermissive]
27 | Po(const T &x,const T &y) : x(x),y(y) {}
| ^~
a.cc:28:9: error: 'Po... |
s122506462 | p00764 | C++ | /* 解答時間→ 101:22(途中) */
#include <cmath>
#include <iostream> //基本入出力
using namespace std;
double dist2d(double x1, double y1, double x2, double y2){
return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main(){
while(1){
//入力
int n;
cin >> n;
if(n == 0)
break;
double x[25],y[25],r[25];
fo... | a.cc: In function 'int main()':
a.cc:42:46: error: 'DBL_MAX' was not declared in this scope
42 | dist[i][j] = DBL_MAX;
| ^~~~~~~
a.cc:4:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <... |
s630922626 | p00764 | C++ | /* 解答時間→ 101:22(途中) */
#include <math.h>
#include <iomanip>
#include <iostream> //基本入出力
using namespace std;
double dist2d(double x1, double y1, double x2, double y2){
return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main(){
cout << setprecision(16);
while(1){
//入力
int n;
cin >> n;
if(n =... | a.cc: In function 'int main()':
a.cc:44:46: error: 'DBL_MAX' was not declared in this scope
44 | dist[i][j] = DBL_MAX;
| ^~~~~~~
a.cc:5:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <... |
s667970240 | p00764 | C++ | /* 解答時間→ 101:22(途中) */
#include <math.h>
#include <iomanip>
#include <iostream> //基本入出力
using namespace std;
double dist2d(double x1, double y1, double x2, double y2){
return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main(){
double dist[50][50];
cout << setprecision(16);
while(1){
//入力
int n... | a.cc: In function 'int main()':
a.cc:44:46: error: 'DBL_MAX' was not declared in this scope
44 | dist[i][j] = DBL_MAX;
| ^~~~~~~
a.cc:5:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <... |
s984893790 | p00764 | 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;
int n;
P[][] cps;
C[] cs;
double[][] es;
void run() {
Scanner sc = new Scanner... | 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: ... |
s882656535 | p00764 | C++ | #include <iostream>
#include <cmath>
#include <vector>
#include <utility>
#include <algorithm>
#include <cstdio>
using namespace std;
#define sqr(x) ((x)*(x))
#define INF 1000000000
struct coordinate {
double x, y;
coordinate() {}
coordinate(double a, double b) {
x = a; y = b;
}
bool operator<(const coordinate... | a.cc: In member function 'bool coordinate::operator<(const coordinate&) const':
a.cc:9:16: error: expected unqualified-id before '(' token
9 | #define sqr(x) ((x)*(x))
| ^
a.cc:19:47: note: in expansion of macro 'sqr'
19 | return (sqr(x) + sqr(y)) < (a.sqr(x) + sqr(y));
... |
s306634419 | p00764 | C++ | #include <iostream>
#include <cmath>
#include <vector>
#include <utility>
#include <algorithm>
#include <cstdio>
using namespace std;
#define sqr(x) ((x)*(x))
#define INF 1000000000
struct coordinate {
double x, y;
coordinate() {}
coordinate(double a, double b) {
x = a; y = b;
}
bool operator<(const coordinate... | a.cc: In member function 'bool coordinate::operator<(const coordinate&) const':
a.cc:9:16: error: expected unqualified-id before '(' token
9 | #define sqr(x) ((x)*(x))
| ^
a.cc:19:47: note: in expansion of macro 'sqr'
19 | return (sqr(x) + sqr(y)) < (a.sqr(x) + sqr(y));
... |
s024861497 | p00764 | C++ | #include <iostream>
#include <cmath>
#include <vector>
#include <utility>
#include <algorithm>
#include <cstdio>
using namespace std;
#define sqr(x) ((x)*(x))
#define INF 1000000000
struct coord {
double x, y;
coord() {}
coord(double a, double b) {
x = a; y = b;
}
bool operator<(const coord & a) const {
retu... | a.cc: In member function 'bool coord::operator<(const coord&) const':
a.cc:9:16: error: expected unqualified-id before '(' token
9 | #define sqr(x) ((x)*(x))
| ^
a.cc:19:47: note: in expansion of macro 'sqr'
19 | return (sqr(x) + sqr(y)) < (a.sqr(x) + sqr(y));
| ... |
s274812962 | p00764 | C++ | #include <iostream>
#include <cmath>
#include <vector>
#include <utility>
#include <algorithm>
#include <cstdio>
using namespace std;
#define sqr(x) ((x)*(x))
#define INF 1000000000
struct coord {
double x, y;
coord() {}
coord(double a, double b) {
x = a; y = b;
}
bool operator<(const coord & a) const {
retu... | a.cc: In member function 'bool coord::operator<(const coord&) const':
a.cc:9:16: error: expected unqualified-id before '(' token
9 | #define sqr(x) ((x)*(x))
| ^
a.cc:19:47: note: in expansion of macro 'sqr'
19 | return (sqr(x) + sqr(y)) < (a.sqr(x) + sqr(y));
| ... |
s721722468 | p00765 | C++ | #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>... | a.cc: In function 'int check(const vi&, std::vector<std::vector<int> >)':
a.cc:74:36: error: 'accumulate' was not declared in this scope
74 | REP(i, seqs.size()) res += accumulate(ALL(seqs[i]), 0);
| ^~~~~~~~~~
a.cc: At global scope:
a.cc:145:1: warning: ISO C++ forbi... |
s125691521 | p00765 | C++ | #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>... | a.cc: In function 'int check(const vi&, std::vector<std::vector<int> >)':
a.cc:74:36: error: 'accumulate' was not declared in this scope
74 | REP(i, seqs.size()) res += accumulate(ALL(seqs[i]), 0);
| ^~~~~~~~~~
a.cc: At global scope:
a.cc:155:1: warning: ISO C++ forbi... |
s887184784 | p00765 | C++ | #include <iostream>
#include <fstream>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <map>
#include <numeric>
#include <queue>
#include ... | a.cc: In function 'void f(int, int)':
a.cc:77:25: error: jump to label 'fail'
77 | fail:;
| ^~~~
a.cc:72:61: note: from here
72 | rep(l,21)if(needed[l]>count[l])goto fail;
| ... |
s827026443 | p00766 | C++ | #include <iostream>
#include <cstdio>
#include <iomanip>
#include <vector>
#include <map>
#include <tuple>
#include <algorithm>
#include <cmath>
#include <set>
#include <queue>
#include <numeric>
using namespace std;
typedef long long ll;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
typedef pair<int, int> P;
ty... | a.cc: In function 'int bit_matching()':
a.cc:44:9: error: 'memset' was not declared in this scope
44 | memset(match, -1, sizeof(match));
| ^~~~~~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
11 | #include <numeric>
+++ ... |
s633800263 | p00767 | Java | package learning;
import java.util.Scanner;
public class MainClass {
public static int cal(int w, int h){
return w*w + h*h;
}
public static void print(int w, int h) {
int d = cal(w,h);
int optW = w+1;
int optH = h;
int optD = cal(optW, optH);
for(int j = (int)((Math.sqrt(2*d+1)+1)/2) ; j < (int)Math... | Main.java:4: error: class MainClass is public, should be declared in a file named MainClass.java
public class MainClass {
^
1 error
|
s971388249 | p00767 | 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:27: error: cannot find symbol
if(i*i+a*a<mi){
^
symbol: variable mi
location: class Main
Main.java:28: error: cannot find symbol
mi=i*i+a*a;
^
symbol: variable mi
location: class Main
2 errors
|
s130415407 | p00767 | Java | あああ
| Main.java:1: error: reached end of file while parsing
???
^
1 error
|
s106014899 | p00767 | Java | public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String str1 = br.readLine();
String str2 = br.readLine();
int h = Integer.parseInt(str1);
int w = Integer.parseInt(str2);
if(h==... | Main.java:2: error: cannot find symbol
public static void main(String[] args) throws IOException {
^
symbol: class IOException
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^... |
s095118825 | p00767 | Java | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scan = new Scanner(System.in);
int num1 = scan.nextInt();
int num2 = scan.nextInt();
System.out.println("最初のトークンは: "+ num1 + num2)... | Main.java:18: error: non-static variable this cannot be referenced from a static context
int a = this.checkA(num1);
^
Main.java:20: error: non-static variable this cannot be referenced from a static context
int b = this.checkB(num2);
^
Main.java:64: error: cannot find sym... |
s418460283 | p00767 | Java | import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class sample {
public static void main(String args[]){
List<Integer> X = new ArrayList<Integer>();
List<Integer> Y = new ArrayList<Integer>();
int count = 0;
int x;
... | Main.java:6: error: class sample is public, should be declared in a file named sample.java
public class sample {
^
1 error
|
s640760337 | p00767 | Java | import com.sun.tools.javac.util.List;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while ((line = br.rea... | Main.java:1: error: package com.sun.tools.javac.util is not visible
import com.sun.tools.javac.util.List;
^
(package com.sun.tools.javac.util is declared in module jdk.compiler, which does not export it to the unnamed module)
1 error
|
s459177613 | p00767 | Java | import java.util.*;
public class A {
static class Rect implements Comparable<Rect> {
int h;
int w;
int d2;
public Rect(int h, int w) {
this.h = h;
this.w = w;
this.d2 = h * h + w * w;
}
@Override
public int compareTo(Rect... | Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s107224584 | p00767 | Java | import java.util.*;
public class A {
static class Rect implements Comparable<Rect> {
int h;
int w;
int d2;
public Rect(int h, int w) {
this.h = h;
this.w = w;
this.d2 = h * h + w * w;
}
@Override
public int compareTo(Rect... | Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s153838153 | p00767 | Java | import java.io.*;
import java.util.*;
public class IntegralRectangles {
FastScanner in = new FastScanner(System.in);
PrintWriter out = new PrintWriter(System.out);
public void run() {
while (true) {
int h = in.nextInt(), w = in.nextInt();
if ((h|w) == 0) break;
int resH = 1000, resW = 1000;
loop ... | Main.java:4: error: class IntegralRectangles is public, should be declared in a file named IntegralRectangles.java
public class IntegralRectangles {
^
1 error
|
s631406932 | p00767 | C | m,M,X,Y,x,y,i,j;
main() while(scanf("%d%d",&x,&y),x||y){
m=x*x+y*y,M=90000;
for(i=150;i;i--)for(j=i+1,t=i*i+j*j;j<=150;j++)if(m==t&&x<i)M=t,X=i,Y=j;else if(m<t&&M>=t)M=t,X=i,Y=j;
printf("%d %d\n",X,Y);
} | main.c:1:1: warning: data definition has no type or storage class
1 | m,M,X,Y,x,y,i,j;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'M' [-Wimplicit-int]
1 | m,M,X,Y,x,y,i,j;
| ^
main.c:1:5: error: t... |
s815968884 | p00767 | C | m,M,X,Y,x,y,i,j;
main() while(scanf("%d%d",&x,&y),x||y){
m=x*x+y*y,M=90000;
for(i=150;i;i--)for(j=i+1,y=i*i+j*j;j<=150;j++)if(m==y&&x<i)M=y,X=i,Y=j;else if(m<y&&M>=y)M=y,X=i,Y=j;
printf("%d %d\n",X,Y);
} | main.c:1:1: warning: data definition has no type or storage class
1 | m,M,X,Y,x,y,i,j;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'M' [-Wimplicit-int]
1 | m,M,X,Y,x,y,i,j;
| ^
main.c:1:5: error: t... |
s563852138 | p00767 | C | #include <stdio.h>
int main(void){
int h, w, l;
int hs, ws;
while(1){
scanf("%d %d", &h, &w);
if(h==0 && w==0)
break;
l=h*h+w*w;
hs=h;
ws=w;
while(1){
for(h=1; h<=150; h++){
for(w=h+1; w<=150; w++){
if(h*h+w*w==l && (h!=hs || w!=ws)){
printf("%d %d", h, w);
break;
}
if(h*h+w*w>l)
coutinue;
}
}
... | main.c: In function 'main':
main.c:31:1: error: 'coutinue' undeclared (first use in this function)
31 | coutinue;
| ^~~~~~~~
main.c:31:1: note: each undeclared identifier is reported only once for each function it appears in
|
s116511972 | p00767 | C | #include <stdio.h>
int main(void) {
int h, w;
while (scanf("%d%d", &h, &w), h != 0) {
int x = h * h + w * w;
int bigh = h + 1;
int bigw = w + 1;
int h2, w2, newx;
for (h2 = 1; h2 < 150; h2++) {
for (w2 = h2 + 1; w2 < 150; w2++) {
newx = bigh ... | main.c:26:2: error: expected identifier or '(' before '?' token
26 | }?\#include <stdio.h>
| ^
main.c:26:3: error: stray '\' in program
26 | }?\#include <stdio.h>
| ^
main.c:26:4: error: stray '#' in program
26 | }?\#include <stdio.h>
| ^
|
s921663716 | p00767 | C++ |
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
using namespace std;
#define rep(i,n) for (int i = 0; i < int(n); i++)
#define all(c) (c).begin(), (c).end()
int h, w;
int main(int argc, const char * argv[]) {
while (cin >> h >> w && h > 0 && w > 0) {
pr... | a.cc:6:17: warning: extra tokens at end of #include directive
6 | #include <cmath>
using namespace std;
| ^
a.cc: In function 'int main(int, const char**)':
a.cc:14:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
14 | while (cin >> h >> w && h > 0 && w > ... |
s110922640 | p00767 | C++ | clude <algorithm>
#include <vector>
#include <cmath>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
typedef struct {
int w, h, size;
}graph;
vector<graph> g;
bool compare(graph a, graph b){
if(a.size < b. size){
return true;
} else{
if(a.size == b.size && a.h < b.h){
return true;
}
... | a.cc:1:1: error: 'clude' does not name a type
1 | clude <algorithm>
| ^~~~~
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_cxx:... |
s663327744 | p00767 | C++ | #include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define rep1(i,n) for(int i=1;i<=n;i++)
struct rec{int di,h;};
vector<rec> vc;
bool comp(rec const &l,rec const &r){
return l.di!=r.di ? l.di<r.di : l.h<r.h;
}
int main(){
rep1(i,150) rep1(j,i-1) vc.push_back({i*i+j*j,j});
sort(vc.begin(),... | a.cc: In function 'int main()':
a.cc:20:52: error: 'sqrt' was not declared in this scope
20 | printf("%d %d\n",rc.h,(int)((1e-9)+sqrt(rc.di-rc.h*rc.h)));
| ^~~~
|
s315269755 | p00767 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int h, w;
while (scanf("%d%d", &h, &w) != EOF && h && w) {
int S = h*h+w*w;
bool finished = false;
for (int i=h+1; i<=150; i++) {
int W = S - i*i;
for (int j=i+1; j<150; j++) {
if (j * j == W) {
finished = true;
... | a.cc:40:5: error: redefinition of 'int main()'
40 | int main() {
| ^~~~
a.cc:5:5: note: 'int main()' previously defined here
5 | int main() {
| ^~~~
|
s013188192 | p00767 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int h,w;
int hw;
int tai;
int cheak;
int mn;
int high,wide;
main(){
while(cin >> h >> w,h||w){
hw=h*h+w*w;
tai=-1;
mn=0;
for(int i=1;i<=150 && mn==0;i++){
cheak=0;
for(int j=i+1;j<=150 && cheak==0;j++){
if(hw<i*i+j*j && (ta... | a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
12 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:35:2: error: expected '}' at end of input
35 | }
| ^
a.cc:12:7: note: to match this '{'
12 | main(){
| ^
|
s577521330 | p00767 | C++ | m,M,X,Y,x,y,i,j;
main(){
while(scanf("%d%d",&x,&y),x||y){
m=x*x+y*y,M=90000;
for(i=150;i;i--) for(j=i-1;j;j--) if(m<i*i+j*j&&M>i*i+j*j)M=i*i+j*j,X=i,Y=j;
printf("%d %d\n",Y,X);
}
} | a.cc:1:1: error: 'm' does not name a type
1 | m,M,X,Y,x,y,i,j;
| ^
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:3:21: error: 'x' was not declared in this scope
3 | while(scanf("%d%d",&x,&y),x||y){
... |
s299977464 | p00767 | C++ | int m,M,X,Y,x,y,i,j;
main(){
while(scanf("%d%d",&x,&y),x||y){
m=x*x+y*y,M=90000;
for(i=150;i;i--) for(j=i-1;j;j--) if(m<i*i+j*j&&M>i*i+j*j)M=i*i+j*j,X=i,Y=j;
printf("%d %d\n",Y,X);
}
} | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:3:7: error: 'scanf' was not declared in this scope
3 | while(scanf("%d%d",&x,&y),x||y){
| ^~~~~
a.cc:6:1: error: 'printf' was not declared in this scope... |
s529679759 | p00767 | C++ | m,M,X,Y,x,y,i,j;
main(){ while(scanf("%d%d",&x,&y),x||y){
m=x*x+y*y,M=90000;
for(i=150;i;i--)for(j=i+1,y=i*i+j*j;j<=150;j++)if(m==y&&x<i)M=y,X=i,Y=j;else if(m<y&&M>=y)M=y,X=i,Y=j;
printf("%d %d\n",X,Y);}} | a.cc:1:1: error: 'm' does not name a type
1 | m,M,X,Y,x,y,i,j;
| ^
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){ while(scanf("%d%d",&x,&y),x||y){
| ^~~~
a.cc: In function 'int main()':
a.cc:2:29: error: 'x' was not declared in this scope
2 | ma... |
s481950167 | p00767 | C++ | m,M,X,Y,x,y,i,j;
main(){ while(scanf("%d%d",&x,&y),x||y){
m=x*x+y*y,M=90000;
for(i=150;i;i--)for(j=i+1,y=i*i+j*j;j<=150;j++)if(m==y&&x<i)M=y,X=i,Y=j;else if(m<y&&M>=y)M=y,X=i,Y=j;
printf("%d %d\n",X,Y);}} | a.cc:1:1: error: 'm' does not name a type
1 | m,M,X,Y,x,y,i,j;
| ^
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){ while(scanf("%d%d",&x,&y),x||y){
| ^~~~
a.cc: In function 'int main()':
a.cc:2:29: error: 'x' was not declared in this scope
2 | ma... |
s846890587 | p00767 | C++ | m,M,X,Y,x,y,i,j;
main(){ while(scanf("%d%d",&x,&y),x||y){
m=x*x+y*y,M=90000;
for(i=150;i;i--)for(j=i+1;j<=150;j++){y=i*i+j*j;if(m==y&&x<i)M=y,X=i,Y=j;else if(m<y&&M>=y)M=y,X=i,Y=j;}
printf("%d %d\n",X,Y);}return 0;} | a.cc:1:1: error: 'm' does not name a type
1 | m,M,X,Y,x,y,i,j;
| ^
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){ while(scanf("%d%d",&x,&y),x||y){
| ^~~~
a.cc: In function 'int main()':
a.cc:2:29: error: 'x' was not declared in this scope
2 | ma... |
s162932751 | p00767 | C++ | #前計算をしておく
$hw_dict = []
def init_dict()
for w in (1..151)
for h in (1...w)
elm = [h*h+w*w,h,w]
$hw_dict.push(elm)
end
end
$hw_dict = $hw_dict.sort()
end
def pred_pair(p1,p2)
if p1[0] < p2[0]
1
elsif p1[0] > p2[0]
-1
else
if p1[1] < p2[1]
1
elsif p1[1] > p2[1]
-1
else
0
end
end
end... | a.cc:1:2: error: invalid preprocessing directive #\U0000524d\U00008a08\U00007b97\U00003092\U00003057\U00003066\U0000304a\U0000304f
1 | #前計算をしておく
| ^~~~~~~~~~~~~~~~
a.cc:4:19: error: too many decimal points in number
4 | for w in (1..151)
| ^~~~~~
a.cc:5:27: error: too many... |
s701525037 | p00767 | C++ | #include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <queue>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <cassert>
#include <iomanip>
using namespace std;
#def... | a.cc: In function 'bool solve()':
a.cc:60:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
60 | int main(){
| ^~
a.cc:60:9: note: remove parentheses to default-initialize a variable
60 | int main(){
| ^~
| --
a.cc:60:9: note: or ... |
s226682752 | p00767 | C++ | #include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <queue>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <cassert>
#include <iomanip>
using namespace std;
#def... | a.cc: In function 'bool solve()':
a.cc:60:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
60 | int main(){
| ^~
a.cc:60:9: note: remove parentheses to default-initialize a variable
60 | int main(){
| ^~
| --
a.cc:60:9: note: or ... |
s731321974 | p00767 | C++ | 1 2
1 3
2 3
1 4
2 4
5 6
1 8
4 7
98 100
99 100
0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1 2
| ^
|
s452697529 | p00767 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,s,e) for((i)=(s);(i)<(int)(e);(i)++)
#define REP(i,e) FOR(i,0,e)
#define all(o) (o).begin(), (o).end()
#define psb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
typedef long long ll;
typedef pair<int, int> PII;
const double EPS = 1e-10;
int h, w;
i... | a.cc: In function 'int main()':
a.cc:26:10: error: expected primary-expression before '=' token
26 | rh = = rw = 200;
| ^
|
s563094419 | p00767 | C++ | #include <bits/stdc++.h>
#define mk_pii(a,b,c) make_pair((a),make_pair((b),(c)))
using namespace std;
int main(){
vector<pair<int,pair<int,int>>> v;
for(int i=1;i<150;i++){
for(int j=1;j<150;j++){
if(i < j){
v.emplace_back(mk_pii(i*... | a.cc: In function 'int main()':
a.cc:18:78: error: 'struct std::pair<int, int>' has no member named 'fir'; did you mean 'first'?
18 | if(v[i].first > x || (v[i].first == x && v[i].second.fir st > h)){
| ... |
s042798147 | p00767 | C++ | #define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define pb(a) push_back(a)
#define all(a) (a).begin(), (a).end()
#define debug(x) cout << "debug " << x << endl;
using namespace std;
string sort(string str, int len, int x){
while(len != str.size()) str+='0';
if(x == 1){
... | a.cc:8:1: error: 'string' does not name a type
8 | string sort(string str, int len, int x){
| ^~~~~~
a.cc:34:15: error: 'string' was not declared in this scope
34 | int changeNum(string str){
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixabl... |
s879465307 | p00767 | C++ | // ConsoleApplication10.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include "stdafx.h"
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct Rectangle {
int h;
int w;
bool operator<(const Rectangle& o) {
return h*h + w*w == ... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s769962762 | p00767 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, s, n) for (int i = (s); i < (n); i++)
#define all(co) begin(co), end(co)
int main() {
int h, w;
while (cin >> h >> w && h) {
int l = h * h + w * w;
usint t = tuple<int, int, int>;
t ans = t(1<<29,-1,-1);
... | a.cc: In function 'int main()':
a.cc:12:9: error: 'usint' was not declared in this scope; did you mean 'uint'?
12 | usint t = tuple<int, int, int>;
| ^~~~~
| uint
a.cc:13:9: error: 't' was not declared in this scope
13 | t ans = t(1<<29,-1,-1);
| ^
a.cc:16... |
s132655670 | p00767 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, s, n) for (int i = (s); i < (n); i++)
#define all(co) begin(co), end(co)
int main() {
int h, w;
while (cin >> h >> w && h) {
int l = h * h + w * w;
usint t = tuple<int, int, int>;
t ans = t(1<<29,-1,-1);
... | a.cc: In function 'int main()':
a.cc:12:9: error: 'usint' was not declared in this scope; did you mean 'uint'?
12 | usint t = tuple<int, int, int>;
| ^~~~~
| uint
a.cc:13:9: error: 't' was not declared in this scope
13 | t ans = t(1<<29,-1,-1);
| ^
a.cc:16... |
s499188336 | p00767 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, s, n) for (int i = (s); i < (n); i++)
#define all(co) begin(co), end(co)
int main() {
int h, w;
while (cin >> h >> w && h) {
int l = h * h + w * w;
using t = tuple<int, int, int>;
t ans = t(1<<29,-1,-1);
... | a.cc: In function 'int main()':
a.cc:18:18: error: 'v' was not declared in this scope
18 | sort(all(v));
| ^
a.cc:6:23: note: in definition of macro 'all'
6 | #define all(co) begin(co), end(co)
| ^~
|
s098990726 | p00767 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, s, n) for (int i = (s); i < (n); i++)
#define all(co) begin(co), end(co)
int main() {
int h, w;
while (cin >> h >> w && h) {
int l = h * h + w * w;
using t = tuple<int, int, int>;
t ans = t(1<<29,-1,-1);
... | a.cc: In function 'int main()':
a.cc:18:18: error: 'v' was not declared in this scope
18 | sort(all(v));
| ^
a.cc:6:23: note: in definition of macro 'all'
6 | #define all(co) begin(co), end(co)
| ^~
|
s490933127 | p00767 | C++ | int main(void) {
unsigned int h, w, d, mh, mw, md, i, j, nd;
while(1) {
std::cin >> h >> w;
if (!h && !w) return 0;
d = h * h + w * w, md = (unsigned int)-1;
for (i = 1; i < 150; i++) {
for (j = i + 1; j < 150; j++) {
nd = i * i + j * j;
if (d < nd || (d == nd && h < i)) break;
}
if (j < 150 ... | a.cc: In function 'int main()':
a.cc:4:22: error: 'cin' is not a member of 'std'
4 | std::cin >> h >> w;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int mai... |
s206432683 | p00767 | 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;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;
int ma... | a.cc: In function 'int main()':
a.cc:26:72: error: expected primary-expression before ')' token
26 | if(len<=hei*hei+wid*wid && hei*hei+wid*wid<resh*resh+resw*resw)){
| ^
|
s387677864 | p00767 | C++ | #include <iostream>
using namespace std;
int h[100], w[100], ah[100], aw[100], p[100];
int main() {
int i = 0;
while (true) {
cin >> h[i] >> w[i];
if (h[i] == 0 && w[i] == 0)break;
int m = (int)(pow(h[i], 2) + pow(w[i], 2));
//cout << m << endl;
//cout << "i:" << i << endl;
for (int j = 1; j <= 150; j+... | a.cc: In function 'int main()':
a.cc:12:31: error: 'pow' was not declared in this scope
12 | int m = (int)(pow(h[i], 2) + pow(w[i], 2));
| ^~~
|
s092323787 | p00767 | C++ | #include <iostream>
using namespace std;
int h[100], w[100], ah[100], aw[100], p[100];
int main() {
int i = 0;
while (true) {
cin >> h[i] >> w[i];
if (h[i] == 0 && w[i] == 0)break;
int m = (int)(pow(h[i], 2) + pow(w[i], 2));
//cout << m << endl;
//cout << "i:" << i << endl;
for (int j = 1; j <= 150; j+... | a.cc: In function 'int main()':
a.cc:12:31: error: 'pow' was not declared in this scope
12 | int m = (int)(pow(h[i], 2) + pow(w[i], 2));
| ^~~
|
s959562522 | p00767 | C++ | #include <iostream>
using namespace std;
typedef long long ll;
ll h[100], w[100], ah[100], aw[100], p[100];
int main() {
int i = 0;
while (true) {
cin >> h[i] >> w[i];
if (h[i] == 0 && w[i] == 0)break;
ll m = (ll)(pow(h[i], 2) + pow(w[i], 2));
//cout << m << endl;
//cout << "i:" << i << endl;
for (int... | a.cc: In function 'int main()':
a.cc:14:29: error: 'pow' was not declared in this scope
14 | ll m = (ll)(pow(h[i], 2) + pow(w[i], 2));
| ^~~
|
s762938806 | p00767 | C++ | #include <iostream>
using namespace std;
typedef long long ll;
ll h[100], w[100], ah[100], aw[100], p[100];
int main() {
int i = 0;
while (true) {
cin >> h[i] >> w[i];
if (h[i] == 0 && w[i] == 0)break;
ll m = (ll)(pow(h[i], 2) + pow(w[i], 2));
//cout << m << endl;
//cout << "i:" << i << endl;
for (int... | a.cc: In function 'int main()':
a.cc:14:29: error: 'pow' was not declared in this scope
14 | ll m = (ll)(pow(h[i], 2) + pow(w[i], 2));
| ^~~
|
s071364589 | p00767 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
int main(void){
long long h, w;
while(cin >> h >> w){
ll ansH=h, ansW=w;
if(h == 0 && w == 0){
break;
}
... | a.cc: In function 'int main()':
a.cc:20:26: error: expected ';' before '{' token
20 | }else(w - h == 1){
| ^
| ;
|
s944793555 | p00767 | C++ | #include <bits/stdc++.h>
#define rep(i, from, to) for (int i = from; i < to; ++i)
#define REP(i, from, to) for (int i = from; i <= to; ++i)
using namespace std;
struct node {
int x, y;
};
int taikaku(int x, int y) {
return x * x + y * y;
}
bool cmp(const node &n1, const node &n2) {
if (taikaku(n1.x, n1.y) < taikak... | a.cc: In function 'void solve()':
a.cc:30:25: error: reference to 'data' is ambiguous
30 | data.push_back(n);
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_6... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.