submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s261884646 | p00711 | C++ | #include<cstdio>
#include<cstdlib>
#include<iostream>
#include<string>
#include<map>
#include<vector>
#include<algorithm>
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
using namespace s... | a.cc: In function 'int main()':
a.cc:59:13: error: overloaded function with no contextual type information
59 | count = 0;
| ^
|
s383230775 | p00711 | C++ | // Red and Black.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include "stdafx.h"
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef long long ll;
//Global
int x, y;
const int MAX_N = 20;
char maze[... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s367410951 | p00711 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef long long ll;
//Global
int x, y;
const int MAX_N = 20;
char maze[MAX_N][MAX_N+1];
const int INF = 1000000;
int X, Y;//"@"???????????????
int memo[MAX_N][MAX_N];
int dx[4] = { 1,0,-1,0 };
int dy[4] = { 0... | a.cc: In function 'void solve()':
a.cc:40:20: error: expected ')' before numeric constant
40 | memset(memo.0, sizeof(memo));
| ~ ^~
| )
a.cc:40:9: error: 'memset' was not declared in this scope
40 | memset(memo.0, sizeof(memo));
| ^~~~~... |
s406285543 | p00711 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef long long ll;
//Global
int x, y;
const int MAX_N = 20;
char maze[MAX_N][MAX_N+1];
const int INF = 1000000;
int X, Y;//"@"???????????????
int memo[MAX_N][MAX_N];
int dx[4] = { 1,0,-1,0 };
int dy[4] = { 0... | a.cc: In function 'void solve()':
a.cc:40:9: error: 'memset' was not declared in this scope
40 | memset(memo,0, sizeof(memo));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<queue>
+++ |+#include <cs... |
s779324249 | p00711 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef long long ll;
//Global
int x, y;
const int MAX_N = 20;
char maze[MAX_N][MAX_N+1];
const int INF = 1000000;
int X, Y;//"@"???????????????
int memo[MAX_N][MAX_N];
int dx[4] = { 1,0,-1,0 };
int dy[4] = { 0... | a.cc: In function 'void solve()':
a.cc:40:9: error: 'memset' was not declared in this scope
40 | memset(memo,0, sizeof(memo));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<queue>
+++ |+#include <cs... |
s431818503 | p00711 | C++ | #include <iostream>
#include <math.h>
#include <queue>
#include <cstdio>
using namespace std;
int W, H;
char c[100][101];
bool visited[100][100];
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
void computer(){
memset(visited,false,sizeof visited);
queue<int> que;
int i, j;
for(i=0;i<H;i++){
... | a.cc: In function 'void computer()':
a.cc:14:5: error: 'memset' was not declared in this scope
14 | memset(visited,false,sizeof visited);
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <cstdio>
+++ |+#includ... |
s130457185 | p00711 | C++ | //??¨??¢?´¢:??±???????????¢?´¢??????????????¢?´¢
//??????????????¢?????¬?????????
//?????°??¢??°???????????????(?????????)????????\???(?????????)
#include <stdio.h>
#include <queue>
#include <string.h>
using namespace std;
int W,H;
char c[101][101];
bool visited[100][100];
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1... | a.cc: In function 'void compute()':
a.cc:67:2: error: 'cout' was not declared in this scope
67 | cout << answer << endl;
| ^~~~
a.cc:9:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
8 | #include <string.h>
+++ |+#include <iostream>
9... |
s534168278 | p00711 | C++ | #include<iostream>
using namespace std;
int main(){
while(1){
int dfs(int x,int y,int count);
int w,h;
int dx[4]={0,-1,0,1};
int dy[4]={-1,0,1,0};
int sum=0;
char maps[21][21];
int main(){
int sx,sy;
cin >> h >> w;
if(h==0 && w==0) break;
for(int i=0;i<h;... | a.cc: In function 'int main()':
a.cc:13:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
13 | int main(){
| ^~
a.cc:13:13: note: remove parentheses to default-initialize a variable
13 | int main(){
| ^~
| --
... |
s766120724 | p00711 | C++ | 1>------ テ」ツδ禿」ツδォテ」ツδ嘉ゥツ鳴凝・ツァツ? テ」ツδ療」ツδュテ」ツつクテ」ツつァテ」ツつッテ」ツδ?4_3, テヲツァツ凝ヲツ按?Debug Win32 ------
1> Source3.cpp
1> 4_3.vcxproj -> C:\Users\hokiken\Documents\programming\contest5\Debug\4_3.exe
========== テ」ツδ禿」ツδォテ」ツδ? 1 テヲツュツ」テ・ツクツクテァツオツづ、ツコツ?」ツ?? テ・ツ、ツアテヲツ閉療」ツ?? テヲツ崢エテヲツ鳴ーテ、ツクツ催ィツヲツ?」ツ?? テ」ツつケテ」ツつュテ」ツδε」ツδ?========== | a.cc:1:10: error: extended character 」 is not valid in an identifier
1 | 1>------ テ」ツδ禿」ツδォテ」ツδ嘉ゥツ鳴凝・ツァツ? テ」ツδ療」ツδュテ」ツつクテ」ツつァテ」ツつッテ」ツδ?4_3, テヲツァツ凝ヲツ按?Debug Win32 ------
| ^
a.cc:1:10: error: extended character 」 is not valid in an identifier
a.cc:1:10: error: extended character 」 is not valid in an i... |
s615006279 | p00711 | C++ | #include <iostream>
#include <queue>
using namespace std;
struct locate{
int x;
int y;
};
char graph[20][20];
int cou = 0;
int H,W;
void bfs(locate z){
queue<locate> Q;
locate u;
locate v;
Q.push(z);
while(!Q.empty()){
u = Q.front();Q.pop();
if(u.y < H - 1){
if(graph[u.y + 1][u.x] =... | a.cc:71:1: error: expected declaration before '}' token
71 | }
| ^
|
s784923922 | p00711 | C++ | #include <bits/stdc++.h>
#define REP(i,a) for(int i=0;i<(a);i++)
#define MOD 1000000007
int main(){
while(1){
int h,w;
cin>>w>>h;
if(h==0&&w==0) break;
char a[h][w];
queue<pair<int,int>> q;
bool used[h][w];
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>a[i][j];
us... | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin>>w>>h;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note... |
s047034634 | p00711 | C++ | #include <bits/stdc++.h>
#define REP(i,a) for(int i=0;i<(a);i++)
#define MOD 1000000007
int main(){
while(1){
int h,w;
cin>>w>>h;
if(h==0&&w==0) break;
char a[h][w];
queue<pair<int,int>> q;
bool used[h][w];
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>a[i][j];
us... | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin>>w>>h;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note... |
s088005701 | p00711 | C++ | #include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<stack>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
int main(){
while(1){
int h,w;
cin>>w... | a.cc: In function 'int main()':
a.cc:21:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
21 | cin>>w>>h;
| ^~~
| sin
a.cc:24:5: error: 'queue' was not declared in this scope; did you mean 'std::queue'?
24 | queue<pair<int,int>> q;
| ^~~~~
| std::q... |
s230751961 | p00711 | C++ | #include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<stack>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
int main(){
while(1){
... | a.cc: In function 'int main()':
a.cc:22:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
22 | cin>>w>>h;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linke... |
s083794683 | p00711 | C++ | #include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<stack>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
int main(){
while(1){
... | a.cc: In function 'int main()':
a.cc:22:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
22 | cin>>w>>h;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linke... |
s992562854 | p00711 | C++ | #include "bits/stdc++.h"
using std::cin;
using std::cout;
int cnt = 0;
char map[21][21];
void dfs(int x, int y, int mx, int my){
if((x < 0) || (x >= mx)){
return;
}
if((y < 0) || (y >= my)){
return;
}
if(map[x][y] == '#'){
return;
}
map[x][y] = '#';
cnt++;
d... | a.cc: In function 'int main()':
a.cc:44:6: error: expected '}' at end of input
44 | }
| ^
a.cc:26:11: note: to match this '{'
26 | int main(){
| ^
|
s798934868 | p00711 | C++ | #pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#include "bits/stdc++.h"
using namespace std;
using ll = long long int;
#define debug(v) {printf("L%d %s > ",__LINE__,#v);cout<<(v)<<endl;}
#define debugv(v) {printf("L%d %s > ",__LINE__,#v);for(auto e:(v)){cout<<e<<" ";}cout<<endl;}
#define debuga(m,w) {printf("... | a.cc: In function 'int solve()':
a.cc:181:20: error: no match for 'operator<<' (operand types are '{anonymous}::MaiPrinter' and '<unresolved overloaded function type>')
181 | printer << ans << endl;
| ~~~~~~~~~~~~~~~^~~~~~~
a.cc:81:28: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::... |
s758050524 | p00711 | C++ | #pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#include "bits/stdc++.h"
using namespace std;
using ll = long long int;
#define debug(v) {printf("L%d %s > ",__LINE__,#v);cout<<(v)<<endl;}
#define debugv(v) {printf("L%d %s > ",__LINE__,#v);for(auto e:(v)){cout<<e<<" ";}cout<<endl;}
#define debuga(m,w) {printf("... | In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:3:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Allo... |
s871201642 | p00711 | C++ | #pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#include "bits/stdc++.h"
using namespace std;
using ll = long long int;
#define debug(v) {printf("L%d %s > ",__LINE__,#v);cout<<(v)<<endl;}
#define debugv(v) {printf("L%d %s > ",__LINE__,#v);for(auto e:(v)){cout<<e<<" ";}cout<<endl;}
#define debuga(m,w) {printf("... | In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:3:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Allo... |
s920638733 | p00711 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef unsigned int uint;
typedef long long int lint;
typedef unsigned long long int ulint;
//#define DEBUG
#ifdef DEBUG
# define dump(i) cout << "[*] " #i " : " << i << endl;
# define debug(i) i
void print(char map[20][20], int w, int h) {
for (int i = 0; i < h; ++i) {... | a.cc:29:10: warning: "print" redefined
29 | # define print(j, k)
| ^~~~~
a.cc:28:10: note: this is the location of the previous definition
28 | # define print(i, j, k)
| ^~~~~
a.cc:136:33: error: macro "print" passed 3 arguments, but takes just 2
136 | print(tile, w... |
s335274859 | p00711 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int W, H;
char visit[21][21];
int dfs(int h, int w){
int sum=1;
if(0>w || w==W || 0>h || h==H) return 0;
if(visit[h][w]=='#') return 0;
if(visit[h][w]=='!') return 0;
visit[h][w] = '!';
sum += dfs(h, w+1);
sum += dfs(h, w-1);
sum... | a.cc:4:1: error: '\U0000200b' does not name a type
4 |
|
a.cc: In function 'int dfs(int, int)':
a.cc:9:16: error: 'W' was not declared in this scope
9 | if(0>w || w==W || 0>h || h==H) return 0;
| ^
a.cc:9:31: error: 'H' was not declared in this scope
9 | if(0>w || w==W || ... |
s913948406 | p00711 | C++ | int main()
{
int W, H, i, j, f, d, count;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
char map[32][32];
char s[32];
while (1) {
gets(s);
sscanf(s, "%d %d", &W, &H); if (W == 0 && H == 0) { break; }
for (i = 0; i < 30; i++) {
strcpy(map[i], "##############################");
... | a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope
10 | gets(s);
| ^~~~
a.cc:11:5: error: 'sscanf' was not declared in this scope
11 | sscanf(s, "%d %d", &W, &H); if (W == 0 && H == 0) { break; }
| ^~~~~~
a.cc:13:7: error: 'strcpy' was not declared ... |
s224913745 | p00711 | C++ | #include <stdio.h>
int main()
{
int W, H, i, j, f, d, count;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
char map[32][32];
char s[32];
while (1) {
gets(s);
sscanf(s, "%d %d", &W, &H); if (W == 0 && H == 0) { break; }
for (i = 0; i < 30; i++) {
strcpy(map[i], "###################... | a.cc: In function 'int main()':
a.cc:11:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(s);
| ^~~~
| getw
a.cc:14:7: error: 'strcpy' was not declared in this scope
14 | strcpy(map[i], "##############################");
| ^~~~~~
a.cc:2:1: no... |
s146520033 | p00711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int W, H, i, j, f, d, count;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
char map[32][32];
char s[32];
while (1) {
gets(s);
sscanf(s, "%d %d", &W, &H); if (W == 0 && H == 0) { break; }
for (i = 0; i < 30; i++) {
strcp... | a.cc: In function 'int main()':
a.cc:15:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
15 | gets(s);
| ^~~~
| getw
|
s628463090 | p00711 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
bool c[20][20] = {} ;
int cnt,w, h, p[20][20] = {};
int main() {
int j, f,cx,cy;
char in[20];
while (1) {
for (int i = 0; i < 400; i++) {
c[i / 20][i % 20] = p[i / 20][i % 20] = 0;
}
cnt = 0;
f = 1;
scanf("%d %d", &w, &h);
if (w ==0&& h == 0)
brea... | a.cc: In function 'int main()':
a.cc:61:36: error: lvalue required as left operand of assignment
61 | if (w != 1 && h = 1) {
| ~~~~~~~^~~~
|
s321669084 | p00711 | 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
| |
s587974974 | p00711 | C++ | #include <string>
#include <iostream>
using namespace std;
int w, h;
bool b[20][20];
bool ok[20][20];
char dx[] = {-1, 1, 0, 0};
char dy[] = {0, 0, -1, 1};
void dfs(int x, int y){
for(int i=0;i<4;i++){
if(0<=x+dx[i]&&x+dx[i]<w&&0<=y+dy[i]&&y+dy[i]<h){
if(!b[y+dy[i]][x+dx[i]]) continue;
if(ok[y+dy[i]][x+dx[... | a.cc: In function 'int main()':
a.cc:29:17: error: 'memset' was not declared in this scope
29 | memset(b,false,sizeof(b));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iostream>
++... |
s433120845 | p00711 | C++ | import java.util.*;
import java.awt.Point;
public class Main {
static int w,h,sx,sy;
static int[] dx = {-1, 0, 1, 0}, dy = {0, -1, 0, 1};
static String[] field;
static boolean[][] visited;
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while(read()) {
System.out.println... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.awt.Point;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:... |
s260977152 | p00711 | C++ | #define B(a,x,b) ((a)<=(x)&&(x)<(b))
char T[999];
int x,y,cx,cy,i,c;
void R(a,b){
if(B(0,a,x)&&B(0,b,y)&&T[b*20+a]){
T[b*20+a]=0;i++;R(a-1,b);R(a+1,b);R(a,b-1);R(a,b+1);
}
}
main(){
for(;scanf("%d%d",&x,&y),x;){
for(i=0;i<x*y;i++){
int _x=i%x, _y=i/x;
for(;(c=getchar())!='\n';);
switch(c){
case '... | a.cc:6:6: error: variable or field 'R' declared void
6 | void R(a,b){
| ^
a.cc:6:8: error: 'a' was not declared in this scope
6 | void R(a,b){
| ^
a.cc:6:10: error: 'b' was not declared in this scope
6 | void R(a,b){
| ^
a.cc:12:1: warning: ISO C++ forbids declaration ... |
s519378596 | p00711 | C++ |
#define B(a,x,b) ((a)<=(x)&&(x)<(b))
char T[999];
int x,y,cx,cy,i,c;
void R(int a,int b){
if(B(0,a,x)&&B(0,b,y)&&T[b*20+a]){
T[b*20+a]=0;i++;R(a-1,b);R(a+1,b);R(a,b-1);R(a,b+1);
}
}
main(){
for(;scanf("%d%d",&x,&y),x;){
for(i=0;i<x*y;i++){
int _x=i%x, _y=i/x;
for(;(c=getchar())!='\n';);
switch(c){
... | a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
13 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:14:14: error: 'scanf' was not declared in this scope
14 | for(;scanf("%d%d",&x,&y),x;){
| ^~~~~
a.cc:17:33: error: 'getchar' was not decl... |
s989801200 | p00711 | C++ | #include <iostream>
#include <cmath>
#include <vector>
#include <cctype>
#include <algorithm>
#include <string>
#include <queue>
using namespace std;
char map[21][21];
int w, h;
int tile = 0;
void dfs(int x, int y){
if (!(0 <= x && x < w && 0 <= y < h)) return;
tile++;
map[y][x] = '#';
if (map[y-1][x]... | a.cc: In function 'int main()':
a.cc:27:9: error: 'memset' was not declared in this scope
27 | memset(map, '#', sizeof(map));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include <queue>
+++ |+#include <cs... |
s049494633 | p00711 | C++ | #include <iostream>
#include <cmath>
#include <vector>
#include <cctype>
#include <algorithm>
#include <string>
#include <queue>
using namespace std;
char map[21][21];
int w, h;
int tile = 0;
void dfs(int x, int y){
if (!(0 <= x && x < w && 0 <= y < h)) return;
tile++;
map[y][x] = '#';
if (map[y-1][x]... | a.cc: In function 'int main()':
a.cc:27:9: error: 'memset' was not declared in this scope
27 | memset(map, '#', sizeof(map));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include <queue>
+++ |+#include <cs... |
s450879921 | p00711 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
char field[20][20];
bool flag[20][20];
int W, H, ans;
void dfs(int x, int y) {
//field[x][y] = '.';
//cout << x << ' ' << y << endl;
//cout << flag[x][y] << endl;
... | a.cc: In function 'int main()':
a.cc:34:5: error: 'memset' was not declared in this scope
34 | memset(flag, false, sizeof(flag));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include <cs... |
s146923757 | p00711 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
using namespace std;
int w,h;
int ans=1;
char tile[21][21];
void saiki(int x,int y){
if(x<0 | x>h | y<0 | y>w)return;
tile[x][y]='#';
if(tile[x-1][y]=='.')ans++,saiki(x-1,y);
if(tile[x+1][y]=='.')ans++,saiki(x+1,y);
if(tile[x][y-1]=='.')ans++,saiki(x,y-1);
i... | a.cc: In function 'int main()':
a.cc:26:17: error: 'memset' was not declared in this scope
26 | memset(tile,0,sizeof(tile));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<vector>
+++... |
s970418789 | p00711 | C++ | #include <iostream>
using namespace std;
char S[21][21];
int count = 0;
void a(int i, int j){
if(S[i][j] == '.'){
count++;
S[i][j] = '#';
a(i - 1, j);
a(i + 1, j);
a(i, j + 1);
a(i, j - 1);
}
}
int main(){
while(true){
memset(S,'#',sizeof(S));
count = 0;
int x, y;
cin >> x >> y;
if(x == 0 &&... | a.cc: In function 'int main()':
a.cc:20:17: error: 'memset' was not declared in this scope
20 | memset(S,'#',sizeof(S));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ ... |
s930765050 | p00711 | C++ | #include<iostream>
#include<string>
using namespace std;
int w,h;
string map[40];
int vec[4][2]={{0,1},{0,-1},{-1,0},{1,0}};
void move(int x,int y){
int ans=0;
map[x][y]='#';
for(int i=0;i<4;i++){
if((x+vec[i][0]>=0)&&(y+vec[i][1]>=0)&&(x+vec[i][0]<h)&&(y+vec[i][1]<w)){
if(map[x+vec[i][0]][y+vec[i][1]]=='.'){
... | a.cc: In function 'void move(int, int)':
a.cc:13:42: error: void value not ignored as it ought to be
13 | ans+=move(x+vec[i][0],y+vec[i][1]);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:17:16: error: return-statement with a value, in function return... |
s058426840 | p00711 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#define rep(i, n) for(int i = 0; i < n; i ++)
#define ALL(T) T.begin(), T.end()
#define mp make_pair
#define pb push_back
#d... | a.cc: In function 'int main()':
a.cc:19:22: error: 'memset' was not declared in this scope
19 | #define MEMSET(v, h) memset((v), h, sizeof(v))
| ^~~~~~
a.cc:39:9: note: in expansion of macro 'MEMSET'
39 | MEMSET(m, '#');
| ^~~~~~
a.cc:12:1: note: 'memset' is define... |
s578942302 | p00711 | C++ | 6 9
....#.
.....#
......
......
......
......
......
#@...#
.#..#. | a.cc:2:5: error: stray '#' in program
2 | ....#.
| ^
a.cc:3:6: error: stray '#' in program
3 | .....#
| ^
a.cc:9:2: error: invalid preprocessing directive #@
9 | #@...#
| ^
a.cc:10:2: error: stray '#' in program
10 | .#..#.
| ^
a.cc:10:5: error: stray '#' in program
... |
s280714517 | p00711 | C++ | #include <iostream>
#include <queue>
using namespace std;
typedef pair<int, int> P;
char t[20][20];
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int ans,h,w;
queue<P> q;
int bfs(int x, int y){
q.push( P(x, y) );
while( !q.empty() ){
P now = q.front();
q.pop();
for( int i = 0 ; i < 4 ; i+... | a.cc: In function 'int main()':
a.cc:39:5: error: 'memset' was not declared in this scope
39 | memset( t, 0, sizeof(t) );
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <queue>
+++ |+#include <cstring>
3... |
s388377895 | p00711 | C++ | # -*- coding: utf-8 -*-
count = 0
def dfs(i, j, island):
global count
print i, j
dxy = [(1, 0), (0, 1), (-1, 0), (0, -1)]
if i < 0 or i >= len(island) or j < 0 or j >= len(island[0]):
return
if island[i][j] == '#' or island[i][j] == 'x':
return
island[i][j] = 'x'
coun... | a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:35:5: error: empty character constant
35 | '''
| ^~
a.cc:35:7: warning: missing terminating ' character
35 | '''
| ^
a.cc:35:7: error: missing terminating ' character
a.cc:37:5: error... |
s812233355 | p00711 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int W,H;
void solve(int,int);
char dfs[20][20];
int d_x[]={1,0,-1,0},d_y[]={0,1,0,-1};
int main(){
while(1){
int ans=0;
cin>>W>>H;
if(W==0&&H==0) break;
int dx,dy;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin>>dfs[j][i];
if(dfs[j][... | a.cc: In function 'int main()':
a.cc:32:17: error: 'memset' was not declared in this scope
32 | memset(dfs,0,sizeof(dfs));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
++... |
s395543315 | p00711 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int W,H;
void solve(int,int);
char dfs[20][20];
int d_x[]={1,0,-1,0},d_y[]={0,1,0,-1};
int main(){
while(1){
int ans=0;
cin>>W>>H;
if(W==0&&H==0) break;
int dx,dy;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin>>dfs[j][i];
if(dfs[j]... | a.cc: In function 'int main()':
a.cc:33:17: error: 'memset' was not declared in this scope
33 | memset(dfs,0,sizeof(dfs));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
++... |
s780108109 | p00711 | C++ | #include<iostream>
#include<algorithm>
#include<memory>
#include<cstdlib>
using namespace std;
int W,H;
void solve(int,int);
char dfs[20][20];
int d_x[]={1,0,-1,0},d_y[]={0,1,0,-1};
int main(){
while(1){
int ans=0;
cin>>W>>H;
if(W==0&&H==0) break;
int dx,dy;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++)... | a.cc: In function 'int main()':
a.cc:35:17: error: 'memset' was not declared in this scope
35 | memset(dfs,0,sizeof(dfs));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<cstdlib>
+++ ... |
s655602684 | p00711 | C++ | #include<iostream>
#include<algorithm>
#include<memory>
#include<cstdlib>
using namespace std;
int W,H;
void solve(int,int);
char dfs[20][20];
int d_x[]={1,0,-1,0},d_y[]={0,1,0,-1};
int main(){
while(1){
int ans=0;
cin>>W>>H;
if(W==0&&H==0) break;
int dx,dy;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++)... | a.cc: In function 'int main()':
a.cc:35:17: error: 'memset' was not declared in this scope
35 | memset(dfs,0,sizeof(dfs));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<cstdlib>
+++ ... |
s871120258 | p00712 | Java | #include <iostream>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
#include <memory.h>
using namespace std;
const int INF = 2 << 27;
#define ll long long
typedef pair<int,int> P;
int p;
int q;
int a;
int n;
int solv(int id, int v[]);
int l... | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <vector>
^
Main.java:3: error: illegal character: '#'
#include <math.h>
^
Main.java:4: error: illegal character: '#'
#include <stdio.h>
^
Main.java:5: error: illegal character: '#'
#include <algorithm>
^... |
s795513814 | p00712 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
public class Main {
static PrintWriter out;
static InputReader ir;
static boolean debug = false;
static void solve() {
f... | Main.java:197: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:198: error: class, interface, enum, or record expected
import java.io.InputStream;
^
Main.java:199: error: class, interface, enum, or record expected
import java.io.PrintWriter;
^
Main.java:200: error: class, interf... |
s592575084 | p00712 | Java | import java.util.Scanner;
public class Main {
static int p,q,a,n,count;
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(true){
count=0;
p=sc.nextInt();
q=sc.nextInt();
a=sc.nextInt();
n=sc.nextInt();
if(p+q+a+n==0) break;
s.clear();
search(1,0,0,1);
S... | Main.java:15: error: cannot find symbol
s.clear();
^
symbol: variable s
location: class Main
1 error
|
s410151280 | p00712 | Java | import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.util.*;
import java.io.*;
public class Main1 {
int p, q, a, n, cnt;
void run() {
Scanner sc = new Scanner(System.in);
for(;;) {
p = sc.nextInt(); q = sc.nextInt(); a = sc.nextInt(); n = sc.nextInt();
if( (p|q|a|n) == 0 ) break;
... | Main.java:7: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
^
Main.java:43: error: cannot access Main
new Main().run();
^
bad source file: ./Main.java
file does not contain class Main
Please remove or make sure it appears in the correct subdirec... |
s819383160 | p00712 | Java |
public class Main {
public static int dfs(int p, int q, int a, int n, int cur_pro, int prev_d){
if(n < 0){
return 0;
}
if(p == 0 && cur_pro <= a){
return 1;
}else if(n == 0){
return 0;
}
int sum = 0;
int divide = /* a */ a / cur_pro + 1;
while(p * divide >= q){
//System.out.printl... | Main.java:40: error: cannot find symbol
public static void main(String[] args) throws IOException {
^
symbol: class IOException
location: class Main
Main.java:41: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... |
s867557835 | p00712 | C | #include<stdio.h>
#include<stdlib.h>
int func(int p, int q, double a, int n, int i)
{
int i;
int b=0;
if(n>0&&p>0){
for(i=1;i<=a;i++){
if(p*i==q){
b++;
b+=func(p*i-q, a/i, n-1, i);
}
}
}
return b;
}
int main(void)
{
i... | main.c: In function 'func':
main.c:6:9: error: 'i' redeclared as different kind of symbol
6 | int i;
| ^
main.c:4:45: note: previous definition of 'i' with type 'int'
4 | int func(int p, int q, double a, int n, int i)
| ~~~~^
main.c:13:20: error: t... |
s563902432 | p00712 | C | #include<stdio.h>
#include<stdlib.h>
int func(int p, int q, double a, int n, int i)
{
int i;
int b=0;
if(n>0&&p>0){
for(i=1;i<=a;i++){
if(p*i==q){
b++;
b+=func(p*i-q, a/i, n-1, i);
}
}
}
return b;
}
int main(void)
{
i... | main.c: In function 'func':
main.c:6:9: error: 'i' redeclared as different kind of symbol
6 | int i;
| ^
main.c:4:45: note: previous definition of 'i' with type 'int'
4 | int func(int p, int q, double a, int n, int i)
| ~~~~^
main.c:13:20: error: t... |
s569607269 | p00712 | C | #include<stdio.h>
#include<stdlib.h>
int func(int p, int q, double a, int n, int 1)
{
int i;
int b=0;
if(n>0&&p>0){
for(i=1;i<=a;i++){
if(p*i==q){
b++;
}
b+=func(p*i-q, q*i, a/i, n-1, i);
}
}
return b;
}
int main(void)
{
... | main.c:4:45: error: expected ';', ',' or ')' before numeric constant
4 | int func(int p, int q, double a, int n, int 1)
| ^
main.c: In function 'main':
main.c:30:24: error: implicit declaration of function 'unit'; did you mean 'unix'? [-Wimplicit-function-declaratio... |
s090088518 | p00712 | C | #include<stdio.h>
#include<stdlib.h>
int func(int p, int q, double a, int n, int l)
{
int i;
int b=0;
if(n>0&&p>0){
for(i=l;i<=a;i++){
if(p*i==q){
b++;
}
b+=func(p*i-q, q*i, a/i, n-1, i);
}
}
return b;
}
int main(void)
{
... | main.c: In function 'main':
main.c:30:24: error: implicit declaration of function 'unit'; did you mean 'unix'? [-Wimplicit-function-declaration]
30 | printf("%d\n", unit(p, q, (double)a, n, 1));
| ^~~~
| unix
|
s562131438 | p00712 | C | #include<stdio.h>
#include<stdlib.h>
int func(int p, int q, double a, int n, int l)
{
int i;
int b=0;
if(n>0&&p>0){
for(i=l;i<=a;i++){
if(p*i==q){
b++;
}
b+=func(p*i-q, q*i, a/i, n-1, i);
}
}
return b;
}
int main(void)
{
... | main.c: In function 'main':
main.c:30:24: error: implicit declaration of function 'unit'; did you mean 'unix'? [-Wimplicit-function-declaration]
30 | printf("%d\n", unit(p, q, (double)a, n, 1));
| ^~~~
| unix
|
s857042468 | p00712 | C | #include <iostream>
#include <algorithm>
using namespace std;
int a, n, p, q;
int gcd(int x, int y){
return (y == 0) ? x : gcd(y, x%y);
}
int lcm(int x, int y){
return x * y / gcd(x, y);
}
int solve(int sp, int sq, int sa, int sn, int pre){
if(sn > n) return 0;
if(p / q < sp / sq) return 0;
if(sp == p &&... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s436655150 | p00712 | C++ | inline int solve(pair<int,int> fra, int b, int a, int n){
int res = 0, temp = 1, hoge;
// cout<<fra.numerator<<"/"<<fra.denominator<<" "<<b<<" "<<a<<" "<<n<<endl;
if(n == 0) return 0;
if(n == 1){
if(fra.numerator == 1 && b <= fra.denominator && fra.denominator <= a) return 1;
else return 0;
}
if(fra.numerator... | a.cc:1:18: error: 'pair' was not declared in this scope
1 | inline int solve(pair<int,int> fra, int b, int a, int n){
| ^~~~
a.cc:1:23: error: expected primary-expression before 'int'
1 | inline int solve(pair<int,int> fra, int b, int a, int n){
| ^~~
a.cc:1:27... |
s673673178 | p00712 | C++ | #include<cstdio>
int gcd(int a,int b){
if(b==0)return a;
return gcd(b,a%b);
}
int p,q,a,n;
int cnt;
void dfs(int v,int l,int r,int now){
if(v!=0){
int d=gcd(r,l);
if((double)p/q<(double)l/r)return;
if(l/d==p && r/d==q)cnt++;
}
if(v<n){
for(int i=now;i<=a/r;i++){
data[v]=i;
dfs(v+1,l*i+r,r*i,i);
... | a.cc: In function 'void dfs(int, int, int, int)':
a.cc:19:25: error: 'data' was not declared in this scope
19 | data[v]=i;
| ^~~~
|
s711640280 | p00712 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define fst first
#define snd second
#define MP make_pair
#define PB push_back
VI PS, QS, AS, NS, cnts;
int P, Q, A, N;
int T;
VVI have_n_ts;
// p / q
PII ymemo[10000][10000] = {}
int p_, q_;... | a.cc:23:1: error: expected ',' or ';' before 'int'
23 | int p_, q_;
| ^~~
a.cc: In function 'void yakubun(int, int)':
a.cc:26:5: error: 'p_' was not declared in this scope; did you mean 'p'?
26 | p_ = p, q_ = q;
| ^~
| p
a.cc:26:13: error: 'q_' was not declared in this scope; did you... |
s461033697 | p00712 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define fst first
#define snd second
#define MP make_pair
#define PB push_back
VI PS, QS, AS, NS, cnts;
int P, Q, A, N;
int T;
VVI have_n_ts;
// p / q
PII ymemo[10000][10000] = {};
int p_, q_... | a.cc: In function 'void yakubun(int, int)':
a.cc:27:34: error: no match for 'operator&&' (operand types are 'bool' and 'PII' {aka 'std::pair<int, int>'})
27 | if (p_ < 10000 && q_ < 10000 && ymemo[p_][q_]) {
| ~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~
| | ... |
s347787196 | p00712 | C++ | // Header {{{
// includes {{{
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numer... | a.cc: In function 'int solve(Fraction, int, int, int, std::vector<Fraction>)':
a.cc:322:38: error: no matching function for call to 'Fraction::Fraction(int)'
322 | if (frac > Fraction(1 / start) * cn) { return 0; }
| ^
a.cc:215:17: note: candidate: 'Fraction::Fractio... |
s610549436 | p00712 | C++ | #include <iostream>
using namespace std;
void func(int,int,double,int);
int p,q,a,n,cnt;
double k;
int main(){
while(1){
cin>>p>>q>>a>>n;
if(!p&&!q&&!a&&!n) break;
k=1.0*p/q;
cnt=0;
func(0,1,0,1);
cout<<cnt<<endl;
}
return 0;
}
void func(int x,int w,double y,int I){
if(-0.00000001<=k... | a.cc:30:5: error: redefinition of 'int p'
30 | int p,q,a,n,cnt;
| ^
a.cc:4:5: note: 'int p' previously declared here
4 | int p,q,a,n,cnt;
| ^
a.cc:30:7: error: redefinition of 'int q'
30 | int p,q,a,n,cnt;
| ^
a.cc:4:7: note: 'int q' previously declared here
4 | int p,q,a,n... |
s958734204 | p00712 | C++ | #include <cmath>
#include <cstdio>
#pragma warning(disable : 4996)
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<typename Type> class Fraction {
public:
// ------ Variable ------ //
Type p, q;
// ------ Constructor ------... | a.cc:16:18: error: declaration of template parameter 'Type' shadows template parameter
16 | template<typename Type> friend bool operator==(const Fraction<Type>& f1, const Fraction<Type>& f2) { return f1 == f2; }
| ^~~~~~~~
a.cc:9:10: note: template parameter 'Type' declared here
9 ... |
s268665283 | p00712 | C++ | #include <cmath>
#include <cstdio>
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<typename Type> class Fraction {
public:
// ------ Variable ------ //
Type p, q;
// ------ Constructor ------ //
Fraction() : p(0), q(1) {}
... | a.cc:16:18: error: declaration of template parameter 'Type' shadows template parameter
16 | template<typename Type> friend bool operator==(const Fraction<Type>& f1, const Fraction<Type>& f2) { return f1.p == f2.p && f1.q == f2.q; }
| ^~~~~~~~
a.cc:8:10: note: template parameter 'Type' ... |
s152703286 | p00712 | C++ | #include <cmath>
#include <cstdio>
#pragma warning(disable : 4996)
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<typename Type> class Fraction {
public:
// ------ Variable ------ //
Type p, q;
// ------ Constructor ------... | a.cc:17:18: error: declaration of template parameter 'Type' shadows template parameter
17 | template<typename Type> friend bool operator==(const Fraction<Type>& f1, const Fraction<Type>& f2) { return f1.p == f2.p && f1.q == f2.q; }
| ^~~~~~~~
a.cc:9:10: note: template parameter 'Type' ... |
s522208300 | p00712 | C++ | #include <cmath>
#include <cstdio>
#pragma warning(disable : 4996)
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<typename Type> class Fraction<Type> {
public:
// ------ Variable ------ //
Type p, q;
// ----... | a.cc:9:31: error: 'Fraction' is not a class template
9 | template<typename Type> class Fraction<Type> {
| ^~~~~~~~
a.cc:17:14: error: declaration of template parameter 'Type' shadows template parameter
17 | template<typename Type> friend bool operator==(const Fraction<Type... |
s564735219 | p00712 | C++ | #include <cmath>
#include <cstdio>
#pragma warning(disable : 4996)
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<typename Type> class Fraction {
public:
// ------ Variable ------ //
Type p, q;
// ------ Constructor ------... | a.cc:16:9: error: invalid constructor; you probably meant 'Fraction<Type> (const Fraction<Type>&)'
16 | Fraction(const Fraction<Type> f) : p(f.p), q(f.q) {}
| ^~~~~~~~
a.cc:18:18: error: declaration of template parameter 'Type' shadows template parameter
18 | template<typename Type> ... |
s204377613 | p00712 | C++ | #include <cmath>
#include <cstdio>
#pragma warning(disable : 4996)
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<typename Type> class Fraction {
public:
// ------ Variable ------ //
Type p, q;
// ------ Constructor ------... | a.cc:18:18: error: declaration of template parameter 'Type' shadows template parameter
18 | template<typename Type> friend bool operator==(const Fraction<Type>& f1, const Fraction<Type>& f2) { return f1 == f2; }
| ^~~~~~~~
a.cc:9:10: note: template parameter 'Type' declared here
9 ... |
s015261821 | p00712 | C++ | #include <cmath>
#include <cstdio>
#pragma warning(disable : 4996)
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<class Type> class Fraction {
public:
// ------ Variable ------ //
Type p, q;
// ------ Constructor ------ //... | a.cc:18:18: error: declaration of template parameter 'Type' shadows template parameter
18 | template<class Type> friend bool operator==(const Fraction<Type>& f1, const Fraction<Type>& f2) { return f1 == f2; }
| ^~~~~
a.cc:9:10: note: template parameter 'Type' declared here
9 | temp... |
s069450947 | p00712 | C++ | #include <cmath>
#include <cstdio>
#pragma warning(disable : 4996)
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<class Type> class Fraction {
public:
// ------ Variable ------ //
Type p, q;
// ------ Constructor ------ //... | a.cc:18:18: error: declaration of template parameter 'Type' shadows template parameter
18 | template<class Type> friend bool operator==(const Fraction<Type>& f1, const Fraction<Type>& f2) { return f1 == f2; }
| ^~~~~
a.cc:9:10: note: template parameter 'Type' declared here
9 | temp... |
s678323411 | p00712 | C++ | #include <cmath>
#include <cstdio>
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<class Type> class Fraction {
public:
// ------ Variable ------ //
Type p, q;
// ------ Constructor ------ //
Fraction() : p(0), q(1) {}
Fr... | a.cc: In function 'bool operator<(const Fraction<Type2>&, const Fraction<Type2>&)':
a.cc:23:125: error: expected primary-expression before 'f3'
23 | template<class Type2> friend bool operator<(const Fraction<Type2>& f1, const Fraction<Type2>& f2) { return Fraction f3 = f1 - f2; return f3.p < 0; }
| ... |
s709265090 | p00712 | C++ | #include <cmath>
#include <cstdio>
#pragma warning(disable : 4996)
using namespace std;
template<typename Type> Type gcd(Type a, Type b) {
if (b == 0) return a;
return gcd(b, a % b);
}
// ----- Fraction Class ------ //
template<class Type> class Fraction {
public:
// ------ Variable ------ //
Type p, q;
// ------ ... | a.cc: In constructor 'Fraction<Type>::Fraction(const Type&, const Type&)':
a.cc:16:71: error: expected primary-expression before '>' token
16 | Fraction(const Type& p_, const Type& q_) : p(p_ / gcd(abs<Type>(p_), abs<Type>(q_))), q(q_ / gcd(abs<Type>(p_), abs<Type>(q_))) { if (q < 0) p = -p, q = -q; }
... |
s280312292 | p00712 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
... | a.cc: In function 'std::pair<long long int, long long int> bun(long long int, long long int, long long int, long long int)':
a.cc:174:9: error: 'si3' was not declared in this scope; did you mean 'si1'?
174 | si3=si1*bo2/g+si2*bo1/g;
| ^~~
| si1
a.cc:175:15: error: 'so3' was not dec... |
s486200434 | p00712 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
using namespace std;
void yakubun(int &p,int &q){
for(int i = 2; i <= q; i++){
if(p%i==0&&q%i==0){
p/=i;
q/=i;
i--;
}
}
}
int gcd(int a,int b){
if(b==0)
return a;
return gcd(b,a%b);
}
int lcm(int a,int b){
ret... | a.cc: In function 'void dfs(int, int, int, int, int)':
a.cc:47:27: error: 'sqrt' was not declared in this scope
47 | for(int i = (int)(sqrt(1.0*lim/a)+EPS); i >= next; i--){
| ^~~~
|
s908755949 | p00712 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<sstream>
#include<queue>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
int cont;
void saiki(double rest,int a, int n, int st, vector<int>& bin){
if(fabs(rest)<0.0000... | a.cc: In function 'void saiki(double, int, int, int, std::vector<int>&)':
a.cc:17:12: error: 'fabs' was not declared in this scope; did you mean 'labs'?
17 | if(fabs(rest)<0.0000001){cont++; return;}
| ^~~~
| labs
|
s849795374 | p00712 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<sstream>
#include<queue>
#include<cstdlib>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
int cont;
void saiki(double rest,int a, int n, int st, vector<int>& bin){
if... | a.cc: In function 'void saiki(double, int, int, int, std::vector<int>&)':
a.cc:18:12: error: 'fabs' was not declared in this scope; did you mean 'labs'?
18 | if(fabs(rest)<0.0000001){cont++; return;}
| ^~~~
| labs
|
s301589237 | p00712 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<sstream>
#include<queue>
#include<cstdlib>
#include<cmath>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
int cont;
void saiki(double rest,int a, int n, int st, vector<i... | a.cc: In function 'void saiki(double, int, int, int, std::vector<int>&)':
a.cc:21:19: error: break statement not within loop or switch
21 | if(rest<0)break;
| ^~~~~
|
s950661562 | p00712 | C++ | #include <iostream>
using namespace std;
int P, Q, MS, C;
bool f(int shi, int bo, int start, int dep, int check){
//cout << "!" << endl;
//cout << shi << " " << bo << endl;
if(check > MS) {
return false;
}
if(shi * Q == bo * P) {
Count++;
//return true;
}
if(shi * Q > bo * P) {
ret... | a.cc: In function 'bool f(int, int, int, int, int)':
a.cc:15:5: error: 'Count' was not declared in this scope
15 | Count++;
| ^~~~~
a.cc: In function 'int main()':
a.cc:41:5: error: 'Count' was not declared in this scope
41 | Count = 0;
| ^~~~~
|
s140187879 | p00712 | C++ | #include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std... | a.cc: In function 'int main()':
a.cc:71:9: error: 'cin' was not declared in this scope
71 | while(cin >>p >>q >>a >>n && p){
| ^~~
a.cc:18:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
17 | #include <ctime>
+++ |+#include <iostrea... |
s144302571 | p00712 | C++ | #include <iostream>
using namespace std;
int a, n, x;
int cnt, deno;
void search( double p, double q , int x){
if( x / deno < 1 || ) return 0;
if( x )
}
int main(){
int p, q;
while( cin >> p >> q >> a >> n && p ){
cnt = 0;
deno = 2;
}
} | a.cc: In function 'void search(double, double, int)':
a.cc:7:27: error: expected primary-expression before ')' token
7 | if( x / deno < 1 || ) return 0;
| ^
a.cc:7:36: error: return-statement with a value, in function returning 'void' [-fpermissive]
7 | if( x / deno < ... |
s931747969 | p00712 | C++ | #include<iostream>
#include<algorithm>
int all[8];
int max, maxcnt;
int res = 0;
int gcm(int a, int b){
if (b == 0)return a;
else gcm(b, a%b);
}
int lcm(int a, int b){
int c = gcm(a, b);
return a / c*b / c*c;
}
bool ask(int p, int q, int pp, int qq){
return p*qq >= pp*q;
}
std::pair<int, int> hiku(int p, int ... | a.cc: In function 'int main()':
a.cc:56:17: error: 'memset' was not declared in this scope
56 | memset(all, 0, sizeof(all));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
... |
s575638718 | p00712 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main()
{
int p, q, a, n, m[8];
while (cin >> p >> q >> a >> n, p || q || a || n){
int counter = 0;
for (int i0 = 1; i0 <pow((double)a, (double)3 / (double)2); i0++){
m[0] = i0;
if (n >= 1){
int s = q * m[0];
if (s * p / q == s / m[0]){... | a.cc: In function 'int main()':
a.cc:95:18: error: expected '}' at end of input
95 | return 0;
| ^
a.cc:8:1: note: to match this '{'
8 | {
| ^
|
s181905850 | p00712 | C++ | #include <iostream>
using namespace std;
class Frac{
public:
int num, den;
Frac():num(0), den(1){}
Frac(const Frac &f):num(f.num), den(f.den){}
Frac(int num_, int den_):num(num_), den(den_){}
Frac& operator-=(const Frac &f){
int g = __gcd(den, f.den);
Frac t((num * f.den - f.num * ... | a.cc: In member function 'Frac& Frac::operator-=(const Frac&)':
a.cc:12:17: error: '__gcd' was not declared in this scope
12 | int g = __gcd(den, f.den);
| ^~~~~
|
s079395748 | p00713 | C | #include"env.h"
double X[300],Y[300],x,y,d,s,t,p,q;
N,i,j,m,c;
C(k){
c=0;
for(k=N;k--;c>m?m=c:0)
c+=k==i|k==j|hypot(X[k]-p,Y[k]-q)<1;
}
main(){
for(;scanf("%d",&N)*N;printf("%d \n",m)){
for(i=N;i--;)
scanf("%lf%lf",X+i,Y+i);
for(m=1;++i<N;)
for(j=i;j--;
d<2?
s=(X[i]+X[j])/2,t=(Y[i]+Y[j])/2,
... | main.c:1:9: fatal error: env.h: No such file or directory
1 | #include"env.h"
| ^~~~~~~
compilation terminated.
|
s721161268 | p00713 | C | #include <iostream>
#include <algorithm>
#include <cmath>
#include <complex>
using namespace std;
typedef complex<double> Point;
const double EPS = 1e-8;
int n;
Point data[300];
int calc(Point a, Point b){
int res = 0;
double d = abs(b - a) / 2.0;
Point ab = (b - a) / (2.0 * d);
if(d < 1){
Point o = ab... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s092674992 | p00713 | C++ | #include <cstdio>
#include <complex>
#include <iostream>
#define rep(i,n) for(int i=0;i<n;i++)
#define re real()
#define im imag()
using namespace std;
int main(){
while(true){
int n,mx=1;
scanf("%d",&n);
if(n==0) break;
complex<double> p[300];
rep(i,n) scanf("%lf%lf",&p[i].re,&p[i].im);
rep(i,n) rep(j,i){... | a.cc: In function 'int main()':
a.cc:5:16: error: lvalue required as unary '&' operand
5 | #define re real()
| ^
a.cc:14:47: note: in expansion of macro 're'
14 | rep(i,n) scanf("%lf%lf",&p[i].re,&p[i].im);
| ^~
a.cc:6:16: e... |
s501784057 | p00713 | C++ | #include <cstdio>
#include <complex>
#include <algorithm>
#include <iostream>
#define rep(i,n) for(int i=0;i<n;i++)
#define re real()
#define im imag()
using namespace std;
int main(){
while(true){
int n,mx=1;
scanf("%d",&n);
if(n==0) break;
complex<double> p[300];
rep(i,n) scanf("%lf%lf",&p[i].re,&p[i].im);... | a.cc: In function 'int main()':
a.cc:6:16: error: lvalue required as unary '&' operand
6 | #define re real()
| ^
a.cc:15:47: note: in expansion of macro 're'
15 | rep(i,n) scanf("%lf%lf",&p[i].re,&p[i].im);
| ^~
a.cc:7:16: e... |
s318040945 | p00713 | C++ | #include <cstdio>
#include <complex>
#include <algorithm>
#include <utility>
#include <iostream>
#define rep(i,n) for(int i=0;i<n;i++)
#define re real()
#define im imag()
using namespace std;
int main(){
while(true){
int n,mx=1;
scanf("%d",&n);
if(n==0) break;
complex<double> p[300];
rep(i,n) scanf("%lf%lf",... | a.cc: In function 'int main()':
a.cc:7:16: error: lvalue required as unary '&' operand
7 | #define re real()
| ^
a.cc:16:47: note: in expansion of macro 're'
16 | rep(i,n) scanf("%lf%lf",&p[i].re,&p[i].im);
| ^~
a.cc:8:16: e... |
s229191187 | p00713 | C++ | #define _USE_MATH_DEFINES
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
using namespace std;
#define EPS 1e-8
#define INF 1000000
struct Point{
... | a.cc:182:24: error: stray '\' in program
182 | printf(\"%d\\n\",ans);
| ^
a.cc:182:25: warning: missing terminating " character
182 | printf(\"%d\\n\",ans);
| ^
a.cc:182:25: error: missing terminating " character
182 | ... |
s566768319 | p00713 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
#define MAX_N 310
long double x[MAX_N], y[MAX_N];
int n, maxn;
int main() {
while (true) {
cin >> n;
if (n == 0) { break; }
for (int i = 0; i < n; i++) {
cin >> x[i] >> y[i];
}
maxn = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j... | a.cc: In function 'int main()':
a.cc:30:40: error: 'sqrt' was not declared in this scope
30 | Dist = sqrt((x[j] - x[i])*(x[j] - x[i]) + (y[j] - y[i])*(y[j] - y[i]));
| ^~~~
|
s965816272 | p00713 | C++ | #include <cmath>
#include <cstdio>
#include <algorithm>
??
#define MAX_N 300
const double PI=acos(-1.0);
??
struct Point{
????????double x,y;
????????Point(){
????????????????x=y=0;
????????}
????????bool operator<(const Point& p)const{
????????????????return this->x < p.x;
????????}
};
??
struct comp{
????????bool ope... | a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
a.cc:7:1: error: expected unqualified-id before '?' token
7 | ??
| ^
a.cc:17:1: error: expected unqualified-id before '?' token
17 | ??
| ^
a.cc:29:1: error: expected unqualified-id before '?' token
29 | ??
| ^
a.... |
s333099454 | p00713 | C++ | #include <complex>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
#define X real()
#define Y imag()
// ----- debug macro -----
#define DMPPT(p,stream) stream << (p).X << "," << (p).Y
// ----- ----- ----- -----
// ???????§???????????§????????????£°????£°?????????????????????§???????????\?... | a.cc:19:9: error: 'a' does not name a type
19 | a = a * PT(0,-1);
| ^
a.cc:20:9: error: expected unqualified-id before 'return'
20 | return a / abs(a);
| ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
21 | }
| ^
a.cc: In function 'int main()':
a... |
s290618235 | p00713 | C++ | #include <bits/stdc++.h>
using namespace std;
#define EPS 1e-8
typedef complex<double> Point;
int main(){
int N;
while(cin >> N,N){
Point p[N];
for(int i = 0 ; i < N ; i++){
cin >> p[i].real() >> p[i].imag();
}
int res = 1;
for(int i = 0 ; i < N-1 ; i++){
for(int j = i+1 ; j < N ; j++){
P... | a.cc: In function 'int main()':
a.cc:13:17: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
13 | cin >> p[i].real() >> p[i].imag();
| ~~~ ^~ ~~~~~~~~~~~
| | |
| | ... |
s389268708 | p00713 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <functional>
#include <ctime>
using namespace std;
#define fst first
#define snd second
#define all(c) ((c).begin()), ((c).end())
#define TEST(x,a) { auto y=(x); if (sign(y-a)) { cout... | a.cc: In function 'void verify_maximum_circle_cover2()':
a.cc:161:20: error: 'maximum_circle_cover1' was not declared in this scope; did you mean 'maximum_circle_cover3'?
161 | printf("%d\n", maximum_circle_cover1(ps, 1.0));
| ^~~~~~~~~~~~~~~~~~~~~
| maximum_circl... |
s718667233 | p00713 | 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
| |
s335870521 | p00713 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> P;
const LL MOD = 1000000007LL;
const double EPS = 1e-10;
struct Point {
double x, y;
Point(double x = 0, double y = 0) :x(x), y(y) {}
Point operator+(Point &p) {
return Point(x + p.x, y + p.y... | a.cc: In function 'Point project(Segment, Point)':
a.cc:83:21: error: no match for 'operator+' (operand types are 'Point' and 'Point')
83 | return s.p1 + base*r;
| ~~~~ ^ ~~~~~~
| | |
| Point Point
a.cc:11:15: note: candidate: 'Poin... |
s574381098 | p00713 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> P;
const LL MOD = 1000000007LL;
const double EPS = 1e-10;
struct Point {
double x, y;
Point(double x = 0, double y = 0) :x(x), y(y) {}
Point operator+(Point &p) {
return Point(x + p.x, y + p.y... | a.cc: In function 'Point project(Segment, Point)':
a.cc:83:21: error: no match for 'operator+' (operand types are 'Point' and 'Point')
83 | return s.p1 + base*r;
| ~~~~ ^ ~~~~~~
| | |
| Point Point
a.cc:11:15: note: candidate: 'Poin... |
s957793116 | p00713 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> P;
const LL MOD = 1000000007LL;
const double EPS = 1e-10;
struct Point {
double x, y;
Point(double x = 0, double y = 0) :x(x), y(y) {}
Point operator+(Point &p) {
return Point(x + p.x, y + p.y... | a.cc: In function 'Point project(Segment, Point)':
a.cc:110:21: error: no match for 'operator+' (operand types are 'Point' and 'Point')
110 | return s.p1 + base*r;
| ~~~~ ^ ~~~~~~
| | |
| Point Point
a.cc:11:15: note: candidate: 'Poi... |
s118592844 | p00713 | C++ | 3
1 0
0 0
0 1
3
6.47634 7.69628
5.16828 4.79915
6.69533 6.20378
6
7.15296 4.08328
6.50827 2.69466
5.91219 3.86661
5.29853 4.16097
6.10838 3.46039
6.34060 2.41599
8
7.90650 4.01746
4.10998 4.18354
4.67289 4.01887
6.33885 4.28388
4.98106 3.82728
5.12379 5.16473
7.84664 4.67693
4.02776 3.87990
20
6.65128 5.47490
6.42743 6... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s271804641 | p00713 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int N;
pair<double,double> dots[300];
int main(){
while(cin >> N && N != 0){
for(int i = 0; i < N; i++){
pair<double,double> p;
cin >> dots[i].second >> dots[i].first;
}
int maxCnt = 1;
// ~ðìé½ßÌQ_ðßé
for... | a.cc: In function 'int main()':
a.cc:25:44: error: 'sqrt' was not declared in this scope
25 | double v = sqrt((dot1.first - dot2.first)*(dot1.first - dot2.first)
| ^~~~
|
s187100665 | p00713 | C++ |
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
while(true){
final int n = sc.nextInt();
... | a.cc:76:5: error: stray '@' in program
76 | @Override
| ^
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
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.util.HashMap;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.