submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s517404114 | p03944 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
int W, H, N;
cin >> W >> H >> N;
int tile[100][100];//[high(y)][width(x)]
memset(tile, 0, sizeof(tile));//塗られていないのを0とする
int counter=0;
for(int i=0; i<N; i++){
int x, y, a;
cin >> x >> y... | a.cc: In function 'int main()':
a.cc:11:5: error: 'memset' was not declared in this scope
11 | memset(tile, 0, sizeof(tile));//塗られていないのを0とする
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <vector>
+++ |+#inc... |
s578957285 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define Abs(x)((x) < 0 ? (x) * -1 : (x))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y) - 1; 0 <= (x); (x)--)
#define nepi(x, y... | a.cc: In function 'int main()':
a.cc:79:24: error: 'x' was not declared in this scope
79 | cin >> x >> y >> a;
| ^
a.cc:79:29: error: 'y' was not declared in this scope
79 | cin >> x >> y >> a;
| ^
a.cc:79:34: error: 'a... |
s581330637 | p03944 | Java | import java.util.*;
public class Main{
public static void main(String[]args){
Scanner sc=new Scanner(System.in);
String po=sc.nextLine();
int w=sc.nextInt();int h=sc.nextInt();
int n=sc.nextInt();
int po[][]=new int[w][h];
for(int i=0;i<n;i++){
int a=sc.nextInt();int b=sc.nextInt();int c=sc.nextInt();
... | Main.java:8: error: variable po is already defined in method main(String[])
int po[][]=new int[w][h];
^
1 error
|
s101602821 | p03944 | C++ | import qualified Data.ByteString.Char8 as C
import Data.Maybe ( fromJust )
import Control.Monad (replicateM)
cReadLn :: IO Int
cReadLn = fst . fromJust . C.readInt <$> C.getLine
getParms :: IO [Int]
getParms = map (fst . fromJust . C.readInt) . C.words <$> C.getLine
main :: IO ()
main = do
[w,h,n] <- getParms ... | a.cc:24:8: error: stray '@' in program
24 | cut (xx@(xi,xf),yy@(yi,yf)) [x,y,a]
| ^
a.cc:24:19: error: stray '@' in program
24 | cut (xx@(xi,xf),yy@(yi,yf)) [x,y,a]
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import qualified Data.ByteString.Char8 as C
| ^... |
s870101743 | p03944 | C++ | import qualified Data.ByteString.Char8 as C
import Data.Maybe ( fromJust )
import Control.Monad (replicateM)
cReadLn :: IO Int
cReadLn = fst . fromJust . C.readInt <$> C.getLine
getParms :: IO [Int]
getParms = map (fst . fromJust . C.readInt) . C.words <$> C.getLine
main :: IO ()
main = do
[w,h,n] <- getParms ... | a.cc:24:8: error: stray '@' in program
24 | cut (xx@(xi,xf),yy@(yi,yf)) [x,y,a]
| ^
a.cc:24:19: error: stray '@' in program
24 | cut (xx@(xi,xf),yy@(yi,yf)) [x,y,a]
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import qualified Data.ByteString.Char8 as C
| ^... |
s218830859 | p03944 | C | #include<stdio.h>
int main()
{
int i=0,xi,yi,a,N;
int wl,wr,hu,hd,W,H;
scanf("%d %d %d",&W,&H,&N);
int wl=0,hd=0,wr=W,hu=H;
for(i=0;i<N;i++)
{
scanf("%d %d %d",&xi,&yi,&a);
if(a==1)
{
wl=xi;
}
else if(a==2)
{
wr=xi;
}
else if(a==3)
{
hd=yi;
}
else
{
hu=... | main.c: In function 'main':
main.c:8:9: error: redeclaration of 'wl' with no linkage
8 | int wl=0,hd=0,wr=W,hu=H;
| ^~
main.c:6:13: note: previous declaration of 'wl' with type 'int'
6 | int wl,wr,hu,hd,W,H;
| ^~
main.c:8:14: error: redeclaration of 'hd' with no linka... |
s755866741 | p03944 | C++ | Loading /Users/matsuyoshi/.emacs.d/inits/12_auto-complete.el (source)...
#include <iostream>
#include <vector>
using namespace std;
int main() {
int w, h, n;
cin >> w >> h >> n;
int max_x = w, min_x = 0;
int max_y = h, min_y = 0;
int x = 0, y = 0, a = 0;
for (int i=0; i<n; i++) {
cin >> x >> y >> a;
... | a.cc:1:1: error: 'Loading' does not name a type
1 | Loading /Users/matsuyoshi/.emacs.d/inits/12_auto-complete.el (source)...
| ^~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
f... |
s968784433 | p03944 | C++ | include <iostream>
#include <vector>
using namespace std;
int main() {
int w, h, n;
cin >> w >> h >> n;
vector<int> x(n);
vector<int> y(n);
vector<int> a(n);
for (int i=0; i<n; i++) {
cin >> x.at(i) >> y.at(i) >> a.at(i);
}
int max_x = w, min_x = 0;
int max_y = h, min_y = 0;
for (int i=0; i<n;... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu... |
s033700897 | p03944 | C | #include<stdio.h>
int main(){
int W, H, N, x, y, a, i, l, r, u, d;
scanf("%d %d %d", &W, &H, &N);
l = d = 0;
u = H;
r =
for (i = 0; i < N; i++){
scanf("%d %d %d", x, y, a);
if(a == 1 && l < x){
l = x;
} else if(a == 2 && r > x){
r = x;
} else if(a == 3 && d < y){
d = y... | main.c: In function 'main':
main.c:10:3: error: expected expression before 'for'
10 | for (i = 0; i < N; i++){
| ^~~
|
s269051103 | p03944 | C++ | #include <iostream>
using namespace std;
int main(){
int W, H ,N;
cin >> W >> H >> N;
int A[101][101];
for(int i = 0; i < W; i++){
for(int j = 0; j < H; j++){
A[i][j] = false;
}
}
int x, y, a;
for(int i = 0; i < N; i++){
cin >> x >> y >> a;
if(a == 1){
for(int i = 0; i < W; i++... | a.cc: In function 'int main()':
a.cc:53:12: error: expected '}' at end of input
53 | return 0;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s633179946 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 10000000005
#define NIL -1
int main(){
int w, h; cin >> w >> h;
int n; cin >> n;
int x[n+2], y[n+2], a[n+2];
int p[n+1][n+1];
for(... | a.cc: In function 'int main()':
a.cc:53:21: error: 'k' was not declared in this scope
53 | if(p[i][k]) count++;
| ^
|
s435314166 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 10000000005
#define NIL -1
int main(){
int w, h; cin >> n >> h;
int n; cin >> n;
int x[n+2], y[n+2], a[n+2];
int p[n+1][n+1];
for(... | a.cc: In function 'int main()':
a.cc:11:22: error: 'n' was not declared in this scope
11 | int w, h; cin >> n >> h;
| ^
a.cc:16:16: error: 'x' was not declared in this scope
16 | cin >> x[i] >> y[i] >> a[i];
| ^
a.cc:16:24: error: 'y' was not declared in... |
s578311617 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int w,h,n;
cin >> w >> h >> n;
int x[n],y[n],a[n];
for(int i=0; i<n; i++) cin >> x[i] >> y[i] >> a[i];
int ox = 0;
int oy = 0;
int px = w;
int py = h;
for(int i=0; i<n; i++){
if(a[i] == 1) ox = x[i];
else if(a[i] == 2) px = x[i];
else if(a[i] ... | a.cc: In function 'int main()':
a.cc:23:9: error: expected ',' or ';' before 'cout'
23 | cout << ans << endl;
| ^~~~
|
s972509877 | p03944 | C | #include<stdio.h>
int main(void)
{
int W,H,N,x,y,a;
int ansx = 0,ansy = 0;
scanf("%d%d%d",&W,&H,&N);
for(int i = 0;i < N;i++)
{
scanf("%d%d%d",&x,&y,&a);
switch(a)
{
case 1:
if(ansx < x){ansx = x;}
break;
case 2:
if(x < W){W = x;}
break;
case 3... | main.c: In function 'main':
main.c:29:6: error: 'w' undeclared (first use in this function)
29 | if(w <= x || h <= y){printf("0");}
| ^
main.c:29:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:29:16: error: 'h' undeclared (first use in this function)
... |
s397915650 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, n;
cin >> w >> h >> n;
vector<int> x(n);
vector<int> y(n);
vector<int> a(n);
for (int i = 0; i < n; i ++) {
cin >> x.at(i) >> y.at(i) >> a.at(i);
}
int k = 0, l = w, m = 0, n = h;
for (int i = 0; i < n; i ++) {
if (a.at(i) ... | a.cc: In function 'int main()':
a.cc:14:28: error: redeclaration of 'int n'
14 | int k = 0, l = w, m = 0, n = h;
| ^
a.cc:5:13: note: 'int n' previously declared here
5 | int w, h, n;
| ^
|
s043723578 | p03944 | C | /*
結果:
*/
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <stdbool.h>
#define inf (INT_MAX-1)
#define INF 9223372036854775807
#define PI 3.14159265358979323846;
#define EPS 1e-10
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<... | main.c: In function 'main':
main.c:111:46: error: implicit declaration of function 'max'; did you mean 'Max'? [-Wimplicit-function-declaration]
111 | if (num[i][2] == 1) { xmin = max(xmin, num[i][0]); }
| ^~~
| ... |
s380536536 | p03944 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
using namespace std;
#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define PRINT(str) printf(#str "\n")
#define yOUT PRINT(Yes)
#define nOUT PRINT(No)
#define YOUT PRINT(YES)
#define NOU... | a.cc: In function 'int main()':
a.cc:27:16: error: 'x' was not declared in this scope
27 | cin >> x >> y >> a;
| ^
a.cc:27:21: error: 'y' was not declared in this scope
27 | cin >> x >> y >> a;
| ^
a.cc:27:26: error: 'a' was not declared in this scope... |
s688353054 | p03944 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
using namespace std;
#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define PRINT(str) printf(#str "\n")
#define yOUT PRINT(Yes)
#define nOUT PRINT(No)
#define YOUT PRINT(YES)
#define NOU... | a.cc: In function 'int main()':
a.cc:27:16: error: 'x' was not declared in this scope
27 | cin >> x >> y >> a;
| ^
a.cc:27:21: error: 'y' was not declared in this scope
27 | cin >> x >> y >> a;
| ^
a.cc:27:26: error: 'a' was not declared in this scope... |
s495166750 | p03944 | C++ | #include<bits/stdc++.h>
#include <algorithm>
using namespace std;
int main(void){
int W, H, N;
cin>>W>>H>>N;
vector<int> x_min(1,0), x_max(1,W), y_min(1,0), y_max(1,H);
int i,j;
int tmp[3];
for(i=0;i<N;i++){
cin>>tmp[0]>>tmp[1]>>tmp[2];
if(tmp[2]==1) x_min.push_back(tmp[0]);
if(tmp[2]==2) x_max.... | a.cc: In function 'int main()':
a.cc:25:12: error: expected ';' before '}' token
25 | exit(0)
| ^
| ;
26 | }
| ~
|
s385367874 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int c[101][101];
int b[101];
int main(){
int W,H,N,x,y,a;
cin>>W>>H>>N;
for(int n=1;n<=N;n++){
cin>>x>>y>>a;
if(a==1){
for(int i=0;i<x;i++){
for(int j=0;j<H;j++)
c[i][j]=1;
}
}
else if(a==2){
for(int i=x;i<W;i++){
for(int j=0;j<H;j++)
c[i]... | a.cc: In function 'int main()':
a.cc:37:21: error: 'j' was not declared in this scope
37 | for(j=0;j<H;j++)
| ^
|
s721440541 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[101][101];
int b[101];
int main(){
int W,H,N,x,y,a;
cin>>W>>H>>N;
for(int n=1;n<=N;n++){
cin>>x>>y>>a;
if(a==1){
for(int i=0;i<x;i++){
for(int j=0;j<H;j++)
c[i][j]=1;
}
}
else if(a==2){
for(int i=x;i<W;i++){
for(int j=0;j<H;j++)
c[i]... | a.cc: In function 'int main()':
a.cc:13:33: error: 'c' was not declared in this scope
13 | c[i][j]=1;
| ^
a.cc:19:33: error: 'c' was not declared in this scope
19 | c[i][j]=1;
| ... |
s125163999 | p03944 | C++ | // 別解
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int W,H,N;
cin>>W>>H>>N;
int xmax=W
int xmin=0;
int ymax=H;
int ymin=0;
for(int i=0;i<N;++i){
int x,y,a;
cin>>x>>y>>a;
if(a==1){
if(xmin<=x)
xmin=x;
}
if(a==2){
if(x<=xm... | a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'int'
11 | int xmin=0;
| ^~~
a.cc:20:10: error: 'xmin' was not declared in this scope; did you mean 'ymin'?
20 | if(xmin<=x)
| ^~~~
| ymin
a.cc:40:17: error: 'xmin' was not declared in this s... |
s773495273 | p03944 | C | #include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
int xx, yy, n;
int x[120], y[120], a[120];
while(~scanf("%d %d %d", &xx, &yy, &n))
{
int i;
int ans = 0;
int x1 = 0, x2 = xx, y1 = 0, y2 = yy;
for(i = 0; i < n; i++)
{
scanf("%d %d %d", &x[i], &y[i], &a[i]);
if(a[i] == 1)
x1 =... | main.c:2:9: fatal error: iostream: No such file or directory
2 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s640753353 | p03944 | C++ | //
// Created by Tzyark on 2018/9/19.
//
#include <iostream>
using namespace std;
int c[101][101];
int main() {
int W, H, N, x, y, a;
cin >> W >> H >> N;
memset(c, 0, sizeof(c));
for (int n = 0; n < N; n++) {
cin >> x >> y >> a;
if (a == 1) {
for (int i = 0; i < x; i++) {
... | a.cc: In function 'int main()':
a.cc:10:5: error: 'memset' was not declared in this scope
10 | memset(c, 0, sizeof(c));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <iostream>
+++ |+#include <cstring>
... |
s012503583 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
main()
{
int w, h, n;
cin >> w >> h >> n;
int x, y, a, g, j, k, l;
g = j = 0;
k = w;
l = h;
for (int i = 0;i<n;i++){
cin >> x >> y >> a;
if(a==1&&g<x)
g = x;
else if(a==2&&k>x)
k = x;
else if(a==3&&j<y)
j = y;
... | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:25:22: error: expression cannot be used as a function
25 | cout << (k - g)(l - j) << endl;
| ~~~~~~~^~~~~~~
|
s738731480 | p03944 | C++ | #include<stdio.h>
#include<iostream>
#include<string>
#include<math.h>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#include<stack>
#include<vector>
#include<time.h>
#include<ctime>
#include<functional>
#define int long long
#define itn int
using namespace std;
typedef pair<int, int> P;
int main() ... | cc1plus: error: '::main' must return 'int'
|
s883315272 | p03944 | C++ | #include<stdio.h>
#include<iostream>
#include<string>
#include<math.h>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#include<stack>
#include<vector>
#include<time.h>
#include<ctime>
#include<functional>
#define int long long
#define itn int
using namespace std;
typedef pair<int, int> P;
int main() ... | cc1plus: error: '::main' must return 'int'
|
s999834790 | p03944 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a)... | a.cc: In function 'int main()':
a.cc:31:11: error: redeclaration of 'int a'
31 | int x,y,a;
| ^
a.cc:23:13: note: 'int a' previously declared here
23 | int W,H,N,a;
| ^
|
s149294795 | p03944 | C++ | #include <iostream>
using namespace std;
int main(){
int W,H,N;
cin >> W >> H >> N;
int x,y,a;
int xmax,xmin,ymax,ymin;
xmin = 0;
xmax = W;
ymin = 0;
ymax = H;
for(int i = 0; i < N; i++){
cin >> x >> y >> a;
switch(a){
case 1:
if(xmin < x) xmin = x;
break;
case 2:
... | a.cc: In function 'int main()':
a.cc:32:45: error: 'yanss' was not declared in this scope; did you mean 'yans'?
32 | if(xans>=0 && yans>=0) printf("%d\n",xans*yanss);
| ^~~~~
| yans
|
s384062181 | p03944 | C++ | ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓╬╬╬╬╬╬▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬
//╬╬╬╬╬╬╬╬╬╬╬╬▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓╬╬╬╬╬╬
//╬╬╬╬╬╬╬╬╬╬▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓╬╬╬╬
//╬╬╬╬╬╬╬▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓╬╬
//╬╬╬╬╬╬▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓
//╬╬╬╬╬▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//╬╬╬╬▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬... | a.cc:1:1: error: extended character ╬ is not valid in an identifier
1 | ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
| ^
a.cc:1:1: error: extended character ╬ is not valid in an identifier
a.cc:1:1: error: extended character ╬ is not valid in an identifier
a.cc:1:1: error: extended character ╬ is not valid in an ... |
s237650479 | p03944 | C++ | #include <iostream>
#include <algorithm>
#include <numeric>
#include <vector>
int main(void) {
int W,H,N;
std::cin >> W >> H >> N;
int map[100][100] = {0};
for (int i = 0; i < N; ++i) {
int x, y, a;
std::cin >> x >> y >> a;
switch (a) {
case 1:
for (int i = 0; i < x; i++) {
... | a.cc: In function 'int main()':
a.cc:52:18: error: 'y' was not declared in this scope
52 | for (int j = y; j < H; j++) {
| ^
|
s631943260 | p03944 | C++ | #include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main() {
int w, h, n, s;
// 長方形を作るx座標の左端、右端を表す(xp[0]: 右, xp[1]: 左)
int xp[2];
// 長方形を作るy座標の上端、下端を表す(yp[0]: 上, yp[1]: 下)
int yp[2];
cin >> w >> h >> n;
// 初期位置をセット
xp[0] = w;
xp[1] = 0;
yp[0] = h;
yp[1] = 0;
for (int i ... | a.cc:25:14: error: extended character is not valid in an identifier
25 | if (a == 1 && xp[1] < x) {
| ^
a.cc: In function 'int main()':
a.cc:25:14: error: unable to find numeric literal operator 'operator""\U00003000'
25 | if (a == 1 && xp[1] < x) {
| ^~~
|
s681293861 | p03944 | C++ | #include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main() {
int w, h, n, s;
// 長方形を作るx座標の左端、右端を表す(xp[0]: 右, xp[1]: 左)
int xp[2];
// 長方形を作るy座標の上端、下端を表す(yp[0]: 上, xp[1]: 下)
int yp[2];
cin >> w >> h >> n;
xp[0] = w;
xp[1] = 0;
yp[0] = h;
yp[1] = 0;
for (int i = 0; i < n; i+... | a.cc:34:21: error: extended character is not valid in an identifier
34 | if (yp[1] > y) {
| ^
a.cc: In function 'int main()':
a.cc:34:21: error: '\U00003000' was not declared in this scope
34 | if (yp[1] > y) {
| ^~
|
s873676346 | p03944 | C++ | #include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main() {
int w, h, n, s;
// 長方形を作るx座標の左端、右端を表す(x[0]: 右, x[1]: 左)
int xp[2];
// 長方形を作るy座標の上端、下端を表す(y[0]: 上, x[1]: 下)
int yp[2];
cin >> w >> h >> n;
xp[0] = w;
xp[1] = 0;
yp[0] = h;
yp[1] = 0;
for (int i = 0; i < n; i++) {... | a.cc: In function 'int main()':
a.cc:34:22: error: expected primary-expression before '>' token
34 | if (xp[0] - xp[1]) > 0 && yp[0] - yp[1] > 0) {
| ^
|
s069555816 | p03944 | Java | import java.util.Scanner;
public class SnukesColoring2 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int h = sc.nextInt();
int n = sc.nextInt();
int[] x = new int [n];
int[] y = new int [n];
int[] a = n... | Main.java:3: error: class SnukesColoring2 is public, should be declared in a file named SnukesColoring2.java
public class SnukesColoring2 {
^
1 error
|
s720420551 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W,H,N;
int x[110],b[110],a[110];
cin >> W>> H>> N;
int num[110][110];
for(int i=0;i<N;i++) cin >> x[i] >> y[i] >> e[i];
int a=0,b=w,c=0,d=h;
for(int i0;i<N;i++){
if(f[i]==1)a=max(a,x[i]);
if(f[i]==2)b=min(b,x[i]);
if(f[i]==3)c=max(c,y[i]);
i... | a.cc: In function 'int main()':
a.cc:9:45: error: 'y' was not declared in this scope
9 | for(int i=0;i<N;i++) cin >> x[i] >> y[i] >> e[i];
| ^
a.cc:9:53: error: 'e' was not declared in this scope
9 | for(int i=0;i<N;i++) cin >> x[i] >> y[i] >> e[... |
s380014377 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, N;
cin >> W >> H >> N;
int xf = 0;
int yf = 0;
for(int i = 0;i < N;i++){
int x, y, a;
cin >> x >> y >> a;
if(a == 1){
W -= x - xf;
xf += x - xf;
}
else if(a == 2){
if(W + xf > x){
W = x - xf;
}
}
else if(a == 3){
... | a.cc:36:2: error: stray '#' in program
36 | }#include <bits/stdc++.h>
| ^
a.cc:71:2: error: stray '#' in program
71 | }#include <bits/stdc++.h>
| ^
a.cc:36:3: error: 'include' does not name a type
36 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:39:5: error: redefinition of 'int main()'
3... |
s298365604 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
int i,j,k,m,n,w,h;
int ansx,ansy;
cin>>w>>h>>n;
int x,y,a;
int shang=h,xia=0,zuo=0,you=w;
for(i=1; i<=n; i++)
{
cin>>x>>y>>a;
if(a==1)
zuo=max(x,zuo);
if(a==2)
you=... | a.cc: In function 'int main()':
a.cc:23:16: error: invalid type argument of unary '*' (have 'int')
23 | if(you-zuo)*(shang-xia)<=0)
| ^~~~~~~~~~~~
|
s449347723 | p03944 | C++ | // バケット法による解
#include <iostream>
#include <string>
using namespace std;
int main() {
int W, H, N;
cin >> W >> H >> N;
int XY[N][3];
for (int i = 0; i < N; ++i) cin >> XY[i][0] >> XY[i][1] >> XY[i][2];
int a[4] = {0}; // バケット
a[0] = 0; // left
a[1] = W; // right
a[2] = 0; // bottom
... | a.cc: In function 'int main()':
a.cc:28:5: error: expected ',' or ';' before 'if'
28 | if (a[1] - a[0] <=0 | a[3] - a[2]) area = 0;
| ^~
|
s151057454 | p03944 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
using namespace std;
int main (void) {
int W=0, H=0, N=0;
cin >> W >> H >> N;
int x=0,y=0,a=0;
int W1=0, W2=0, H1=0, H2=0;
for (int i=0; i<N; i++) {
cin >> x >> y >> a;
switch (a) {
case 1:
W1... | a.cc:33:1: error: expected declaration before '}' token
33 | }
| ^
|
s421082882 | p03944 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
using namespace std;
int main (void) {
int W=0, H=0, N=0;
cin >> W >> H >> N;
int x,y,a=0;
int W1=0, W2=0, H1=0, H2=0;
for (int i=0; i<N; i++) {
cin >> x >> y >> a;
switch (a) {
case 1:
W1=max... | a.cc:31:7: error: extended character is not valid in an identifier
31 | if (ans <= 0) {
| ^
a.cc:31:14: error: extended character is not valid in an identifier
31 | if (ans <= 0) {
| ^
a.cc: In function 'int main()':
a.cc:31:7: error: 'ans\U00003000' was not declared in this... |
s717738650 | p03944 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
using namespace std;
int main (void) {
int W, H, N;
cin >> W >> H >> N;
int x,y,a=0;
int W1=0, W2=0, H1=0, H2=0;
for (int i=0; i<N; i++) {
cin >> x >> y >> a;
switch (a) {
case 1:
W1=max(W1,x)... | a.cc: In function 'int main()':
a.cc:34:5: error: break statement not within loop or switch
34 | break;
| ^~~~~
|
s900819980 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int llint;
int main(){
int w, h, n, i;
int x[110], y[110], a[110];
cin>>w>>h>>n;
int maxx=0, minx=w, maxy=0, miny=h;
for(i=0; i<n; i++) cin>>x[i]>>y[i]>>a[i];
for(i=0; i<n; i++){
if(a[i]==1 && x[i]>maxx) maxx=x[i];
if(a[i]==2 && x[i]<minx) minx=... | a.cc: In function 'int main()':
a.cc:18:20: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
18 | else cout<0<<endl;
| ~^~~~~~
|
s697442415 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int llint;
int main(){
int w, h, n, i;
int x[110], y[110], a[110];
cin>>w>>h>>n;
int maxx=0, minx=w, maxy=0, miny=h;
for(i=0; i<n; i++) cin>>x[i]>>y[i]>>a[i];
for(i=0; i<n; i++){
if(a[i]==1 && x[i]>maxx) maxx=x[i];
if(a[i]==2 && x[i]<minx) minx=... | a.cc: In function 'int main()':
a.cc:18:19: error: expected primary-expression before ',' token
18 | else cout<,0<<endl;
| ^
a.cc:18:21: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
18 | else cout<,0<<endl;
... |
s933968495 | p03944 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int W = sc.nextInt();
int H = sc.nextInt();
int N = sc.nextInt();
int l = 0;int r = W;int u = H;int d = 0;
int[] x = new int[3*N];
for(int i = 0;i < 3*N;i += 3){
x[i] = sc.nextInt();
x... | Main.java:28: error: package system does not exist
else system.out.println("0");
^
1 error
|
s352557314 | p03944 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int W = sc.nextInt();
int H = sc.nextInt();
int N = sc.nextint();
int l = 0;int r = W;int u = H;int d = 0;
int[] x = new int[3*N];
for(int i = 0;i < 3*N;i += 3){
x[i] = sc.nextInt();
x... | Main.java:7: error: cannot find symbol
int N = sc.nextint();
^
symbol: method nextint()
location: variable sc of type Scanner
1 error
|
s579426835 | p03944 | C++ | #include <algorithm>
#include <iostream>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
int S[H][W], x, y, a, c=0, i, j, k;
for(i=0; i<H; i++){
for(j=0; j<W; j++){
S[i][j]=0;
}
}
for(k=0; k<N; k++){
cin >> x >> y >> a;
if(a==1){
for(i=0; i<H; i++){
for(j=0; j<x; j++){
S... | a.cc: In function 'int main()':
a.cc:47:2: error: expected '}' at end of input
47 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s216548022 | p03944 | C++ | #include <algorithm>
#include <iostream>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
int S[H][W], x, y, a, c=0, i, j, k;
for(i=0; i<H; i++){
for(j=0; j<W; j++){
S[i][j]=0;
}
}
for(k=0; k<N; k++){
cin >> x >> y >> a;
if(a==1){
for(i=0; i<H; i++){
for(j=0; j<x; j++){
S... | a.cc: In function 'int main()':
a.cc:41:25: error: request for member 'begin' in 'S', which is of non-class type 'int [H][W]'
41 | cout << count(S.begin(), S.end(), '1');
| ^~~~~
a.cc:41:36: error: request for member 'end' in 'S', which is of non-class type 'int [H][W]'
41 | ... |
s076689224 | p03944 | C | #include<stdio.h>
int main(){
int l=0,r,u,d=0,n=0;
int x,y,a;
scanf("%d%d%d",&r,&u,&n);
for(int i=0;i<n;i++){
scanf("%d%d%d",&x,&y,&a);
switch(a){
case 1:
(x<l)?l=x;
break;
case 2:
(r<x)?r=x;
break;
case 3:
(y<d)?d=y;
break;
case 4:... | main.c: In function 'main':
main.c:10:18: error: expected ':' before ';' token
10 | (x<l)?l=x;
| ^
| :
main.c:13:18: error: expected ':' before ';' token
13 | (r<x)?r=x;
| ^
| :
main.c:16:18: error: expecte... |
s584043941 | p03944 | C++ | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <li... | a.cc:55:9: error: expected unqualified-id before 'return'
55 | return 0;
| ^~~~~~
a.cc:56:1: error: expected declaration before '}' token
56 | }
| ^
|
s012583126 | p03944 | C++ | #include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#define INF 1000000007
using namespace std;
int main(){
int X,Y,A;
int W1,W2,H1,H2,N;
scanf("%d %d %d",&W1,&H1,&N);
while(N--){
scanf(" %d %d %d",&X,&Y,&A);
if(A==1) W1=max(W1,X);
if(A==2) W2=min(W2,X);
if(A==3) H1=max... | a.cc: In function 'int main()':
a.cc:18:50: error: expected ';' before 'return'
18 | printf("%d\n",(W1<W2&&H1<H2?(W2-W1)*(H2-H1):0))
| ^
| ;
19 | return 0;
| ~~~~~~ ... |
s563087493 | p03944 | C++ | #include <bits/stdc++.h>
const long long MOD = 1000000007;
const int INF = INT_MAX / 2;
const long double PI = 3.1415926;
using namespace std;
#define FOR(i, r, n) for(int i=(ll)(r); i<(ll)(n); i++)
#define REP(i, n) FOR(i, (0), n)
#define ALL(r) r.begin(), r.end()
#define ll long long int
typedef vector<ll> vc;
typed... | a.cc: In function 'int main()':
a.cc:43:20: error: no matching function for call to 'max(int, long long int)'
43 | cout << max(0, (r - l)*(u - d)) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-g... |
s463753581 | p03944 | Java | public class Main {
static Scanner s = new Scanner(System.in);
public static void main(String[] args) {
int x,y,a;
int left = 0;
int under = 0;
int width = s.nextInt();
int height = s.nextInt();
int n = s.nextInt();
for (int i = 0; i < n; i++) {
... | Main.java:2: error: cannot find symbol
static Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:2: error: cannot find symbol
static Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors... |
s237227705 | p03944 | C | #include <stdio.h>
#include <stdlib.h> ... | main.c: In function 'main':
main.c:38:9: error: expected declaration or statement at end of input
38 | return 0;
| ^~~~~~
|
s833614602 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w,h,n;
cin>>w>>h>>n;
int xlow=0,xhigh=w,ylow=0,yhigh=h;
for(int i=0;i<n;i++){
int x,y,a;
cin>>x>>y>>a;
switch(a){
case 1:
xlow=max(xlow,x);
break;
case 2:
xhigh=min(xh... | a.cc: In function 'int main()':
a.cc:25:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
25 | ans=(yhigh-ylow)*(xhigh-xlow);
| ^~~
| abs
a.cc:26:26: error: 'hlow' was not declared in this scope; did you mean 'ylow'?
26 | if(yhigh<ylow||xhigh<hlow){
| ... |
s626878845 | p03944 | C | #include <stdio.h>
int main(){
int W, H, N, i;
int x[101],y[101],a[101];
int ax=W,bx=0,ay=H,by=0;
int i;
for(i=1;i<=N;i++){
scanf("%d %d %d",&x[i],&y[i],&a[i]);
switch(a[i]){
case 1: if(bx<=x[i])bx=x[i];
break;
case 2: if(ax>=x[i])ax=x[i];
break;
case 3: if(by<=y[i])by=y[... | main.c: In function 'main':
main.c:6:13: error: redeclaration of 'i' with no linkage
6 | int i;
| ^
main.c:3:16: note: previous declaration of 'i' with type 'int'
3 | int W, H, N, i;
| ^
|
s377400563 | p03944 | C++ | #include<iostream>
using namespace std;
int main(){
int W , H , N;
cin >> W >> H >> N ;
int WWL = 0 , WWR = W , WHU = 0 , WHO = H;
for(int i = 0 ; i < N ; i++){
int x , y , a;
cin >> x >> y >> a;
if( a == 1 ){
WWL = x;
}else if(a == 2){
WWR = x;
}else if(a == 3){
WHU... | a.cc: In function 'int main()':
a.cc:26:39: error: expected ',' or ';' before 'l'
26 | int men = (WWR - WWL) * (WHO - WHU)l;
| ^
|
s784706383 | p03944 | C++ |
using namespace std;
using ll=long long;
#include <string>
#include <vector>
#include <cmath>
#include <iostream>
int main()
{
int W, H, N;
cin >> W >> H >> N;
int minx = 0, miny = 0;
for (size_t i = 0; i < N; i++)
{
int x, y, a;
cin >> x >> y >> a;
switch (a)
{
case 1:
if (minx < x) minx = x;
br... | a.cc: In function 'int main()':
a.cc:39:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
39 | return;
| ^~~~~~
|
s176049729 | p03944 | C++ |
#include "stdafx.h"
using namespace std;
using ll=long long;
#include <string>
#include <vector>
#include <cmath>
#include <iostream>
int main()
{
int W, H, N;
cin >> W >> H >> N;
int minx = 0, miny = 0;
for (size_t i = 0; i < N; i++)
{
int x, y, a;
cin >> x >> y >> a;
switch (a)
{
case 1:
if (minx... | a.cc:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s811603565 | p03944 | C++ | #include <iostream>
#include <array>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
using ll = long long;
int main()
{
int W, H, N, x_zero = 0, y_zero = 0;
cin >> W >> H >> N;
for (size_t i = 0; i < N; i++)
{
int xi, yi, ai;
cin >> xi >> yi >> ai;
if (ai == 1 && x_zero < xi) { x_z... | a.cc: In function 'int main()':
a.cc:24:61: error: expected ';' before '}' token
24 | if (h <= 0 || w <= 0){ cout << "0" << endl; return 0};
| ^
| ;
|
s238119074 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make... | a.cc: In function 'int main()':
a.cc:39:2: error: expected '}' at end of input
39 | }
| ^
a.cc:18:11: note: to match this '{'
18 | int main(){
| ^
|
s330978688 | p03944 | C | #define SORT(v) sort(v.begin(), v.end())
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cstdarg>
#include <cstdio>
#include <cmath>
#include <numeric>
#include <utility>
// #include "ane.cpp"
#define INF (int)1e9
#define INFLL (... | main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s252602226 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int b[114][514];
int main(){
int w,h,n;
cin>>w>>h>>n;
for(int Z=0;Z<n;Z++){
int x,y,a;
cin>>x>>y>>a;
if(a==1){
for(int i=0;i<x;i++){
for(int j=0;j<h;j++){b[i][j]=1;}
}
}
else if(a==2){
for(int i=x;x<w;x++){
for(int j=0;j<h;j++)b[i][j]=1;
... | a.cc: In function 'int main()':
a.cc:28:39: error: 'ha' was not declared in this scope; did you mean 'a'?
28 | for(int j=y;j<ha;j++)b[i][j]=1;
| ^~
| a
|
s221116548 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w,h,n;
cin>>w>>h>>n;
int x,y,a;
int b[100][100]={};
int minx=100,my=100;
while(1){
if(n==0)break;
cin>>x>>y>>a;
if(a==1)
if(minx>w-x)minx=w-x;
else if(a==2)
if(minx>x)minx=x;
else if(a==3)
if(miny>h-y)miny=h-y;
else if(a==4)
if(m... | a.cc: In function 'int main()':
a.cc:17:7: error: 'miny' was not declared in this scope; did you mean 'minx'?
17 | if(miny>h-y)miny=h-y;
| ^~~~
| minx
a.cc:21:13: error: 'miny' was not declared in this scope; did you mean 'minx'?
21 | cout<<minx*miny<<endl;
| ^~~~
... |
s656445937 | p03944 | C++ | #include<iostream>
using namespace std;
int main()
{
int w, h, n, a, b, c, d;
cin>>w>>h>>n;
a =0, b = w, c =0, d = h;
while( n--)
{
int x, y, m;
cin>>x>>y>>m;
if( m ==1) a = max( a, x );
if( m ==2) b = min( b, x );
if( m ==3) c = max( c, y );
if( m ==4) d = min( d, y );
}
w =(b-a<0?0:b-a);
h =(d-c<0?0:d-c);
c... | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:4:1: error: extended character is not valid in an identifier
4 |
| ^
a.cc:2:1: error: '\U000000a0' does not name a type
2 |
| ^
a.cc:4:1: error: '\U000000a0' does not name a type
4 |
| ^
|
s294637876 | p03944 | Java | import java.util.Scanner;
public class Bquestion {
public static void main(String[] args) {
int w,h,n;
Scanner sc=new Scanner(System.in);
w=sc.nextInt();
h=sc.nextInt();
n=sc.nextInt();
int[]x=new int[n];
int[]y=new int[n];
int[]a=new int[n];
for(int i=0;i<n;i++){
x[i]=sc.nextInt();
y[i]... | Main.java:2: error: class Bquestion is public, should be declared in a file named Bquestion.java
public class Bquestion {
^
1 error
|
s704145311 | p03944 | C++ | #include <iostream>
#include <vector>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
using namespace std;
const int INF = 1e9;
#define MAX 100
int main(void) {
int w, h, n, x, y, a, minx = 0, miny = 0, maxx, maxy;
cin >> w >> h >> n;
maxx = w;
maxy = h;
for (int i = 0; i < ... | a.cc: In function 'int main()':
a.cc:37:13: error: redeclaration of 'int a'
37 | int a = (maxx - minx) > 0 ? maxx - minx : 0;
| ^
a.cc:12:28: note: 'int a' previously declared here
12 | int w, h, n, x, y, a, minx = 0, miny = 0, maxx, maxy;
| ^
a.c... |
s375581760 | p03944 | C++ |
yutaro at debian in ~/program/atcoder/abc042/A
$ ls
mainA.cpp
yutaro at debian in ~/program/atcoder/abc042/A
$ ./a.out
5 5 7
YES
yutaro at debian in ~/program/atcoder/abc042/A
$ ./a.out
7 7 5
NO
yutaro at debian in ~/program/atcoder/abc042/A
$ ..
yutaro at debian in ~/program/atcoder/abc042
$ B
yutaro at deb... | a.cc:2:1: error: 'yutaro' does not name a type
2 | yutaro at debian in ~/program/atcoder/abc042/A
| ^~~~~~
|
s365986801 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int w,h,n,x,y,a;
cin>>w>>h>>n;
int xl=0,xr=w,yl=0,yr=h;
for(int i=0;i<n;i++){
cin>>x>>y>>a;
if(a==1) xl=max(x,xl);
else if(a==2) xr=min(x,xr);
else if(a==3) yl=max(y,yl);
else yr=min(y,yr);
}
if(xl<xr&&yl<... | a.cc:1:1: error: stray '\177' in program
1 | <U+007F>#include<bits/stdc++.h>
| ^~~~~~~~
a.cc:1:2: error: stray '#' in program
1 | #include<bits/stdc++.h>
| ^
a.cc:1:3: error: 'include' does not name a type
1 | #include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3:... |
s734400138 | p03944 | C | #include<stdio.h>
int main(){
int W,H,N;
scanf("%d",&W);
scanf("%d",&H);
scanf("%d",&N);
int x1=0,x2=W,y1=0,y2=H;
int x[N],y[N],a[N];
for(int i=0;i<N;i++){
scanf("%d",&x[i]);
scanf("%d",&y[i]);
scanf("%d",&a[i]);
if(a[i]==1){
if(x1<x[i])x1=x[i];
}
else if(a[... | main.c: In function 'main':
main.c:32:16: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
32 | if(x1>x2+1)pritnf("0\n");
| ^~~~~~
| printf
|
s824653319 | p03944 | Java | import java.util.Scanner;
public class Fill {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int y[] = {0, 0};
int x[] = {0, 0};
x[1] = sc.nextInt();
y[1] = sc.nextInt();
int n = sc.nextInt();
for(int i = 0;i < n;i++){
int x2 = sc.nextInt();
int y2 = sc.nextInt();
... | Main.java:3: error: class Fill is public, should be declared in a file named Fill.java
public class Fill {
^
1 error
|
s554793209 | p03944 | C | #include <iostream>
using namespace std;
typedef struct xyz{
int x;
int y;
int a;
}c;
int main ()
{
int W,H,N;
int i,j,k;
int sum = 0;
int sum1 = 0;
int s[100][100] = {0};
struct xyz c[100] ={0};
/*
scanf("%d",&W);
scanf("%d",&H);
scanf("%d",&N);
*/
ci... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s501009338 | p03944 | C | #include<iostream>
using namespace std;
typedef struct xyz{
int x;
int y;
int a;
}c;
int main ()
{
int W,H,N;
int i,j,k;
int sum = 0;
int sum1 = 0;
int s[100][100] = {0};
struct xyz c[100] ={0};
/*
scanf("%d",&W);
scanf("%d",&H);
scanf("%d",&N);
*/
cin... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s377840733 | p03944 | C++ | #include<iostream>
#include<fstream>
#include<string>
#include<cmath>
using namespace std;
int x[100],y[100],a[100]
int main(){
int w, h, n
int xn,xx,yn,yx,d
cin>>w>>h>>n;
for(int i=0;i<w;i++){
cin >> x[i]>>y[i]>>a[i];
}
for(int i=0,i<w,i++){
if(a[i]==1)
xn = max(xn,x[i]);
else if(a[i]==2)
xx =... | a.cc:9:1: error: expected initializer before 'int'
9 | int main(){
| ^~~
|
s836641870 | p03944 | C++ | #include <iostream>
#include<math.h>
using namespace std;
int w,h,n,a,b,c,x1=0,x2,y=0,y2;
int main() {
cin>>w>>h>>n;
x2=w;y2=h;
for(int i=0;i<n;i++){
cin>>a>>b>>c;
if(c==1)x1=max(a,x1);else
if(c==2)x2=min(a,x2);else
if(c==3)y=max(b,y);else
y2=min(b,y2);
}
if(x2>x1&&y2>y){
cout<<x2-x1)*(y2-y)<<endl;
}el... | a.cc: In function 'int main()':
a.cc:16:20: error: expected ';' before ')' token
16 | cout<<x2-x1)*(y2-y)<<endl;
| ^
| ;
|
s483258133 | p03944 | C | #include <stdio.h>
int main(void){
int W, H, N;
scanf("%d %d %d",&W, &H, &N);
int x[N], y[N], a[N];
int i;
for(i=0;i<N;i++){
scanf("%d %d %d", &x[i], &y[i], &a[i]);
}
int w=0,h=0;
for(i=0;i<N;i++){
if(a[i]=1){
if(x[i]>=w){
w=x[i];
}... | main.c:35:12: error: expected declaration specifiers or '...' before string constant
35 | printf("%d\n", ans);
| ^~~~~~
main.c:35:20: error: unknown type name 'ans'
35 | printf("%d\n", ans);
| ^~~
main.c:37:5: error: expected identifier or '(' before 'return'
3... |
s727616501 | p03944 | C | #include <stdio.h>
#include <string.h>
int main(void){
int W, H, N;
scanf("%d%d%d",&W, &H, &N);
char x[N], y[N], a[N];
for(int i=0;i<N;i++){
scanf("%s%s%s", &x[i], &y[i], &a[i]);
}
int w=0,h=0;
for(i=0;i<N;i++){
if(a[i]=1){
if(x[i]>w){
w=x[i];
... | main.c: In function 'main':
main.c:11:9: error: 'i' undeclared (first use in this function)
11 | for(i=0;i<N;i++){
| ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
|
s996482485 | p03944 | C++ | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
... | a.cc: In function 'int main()':
a.cc:40:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
40 | ans = (r-l)*(t-b);
| ^~~
| abs
|
s926694385 | p03944 | C++ |
#include<iostream>
#include<algorithm>
#include<vector>
#include<typeinfo>
#include<type_traits>
#include<exception>
using sll = size_t;//signed long long;
struct zxc{
sll x, y;
size_t a;
zxc(sll x_ = 0, sll y_ = 0, size_t a_ = 0) :x(x_), y(y_), a(a_) {}
};
int main() {
// std::cout << "size_t:" << typeid(size... | a.cc: In function 'int main()':
a.cc:54:51: error: no matching function for call to 'std::exception::exception(const char [4])'
54 | throw(std::exception("DIE"));
| ^
In file included from /usr/include/c++/14/exception:36,
... |
s315970469 | p03944 | C++ |
#include<iostream>
#include<algorithm>
#include<vector>
#include<typeinfo>
#include<type_traits>
using sll = size_t;//signed long long;
struct zxc{
sll x, y;
size_t a;
zxc(sll x_ = 0, sll y_ = 0, size_t a_ = 0) :x(x_), y(y_), a(a_) {}
};
int main() {
std::cout << "size_t:" << typeid(size_t).name() << "\n";
st... | a.cc: In function 'int main()':
a.cc:52:51: error: no matching function for call to 'std::exception::exception(const char [4])'
52 | throw(std::exception("DIE"));
| ^
In file included from /usr/include/c++/14/exception:36,
... |
s761442977 | p03944 | C++ | #include <stdio.h>
int main(){
int w, h, n;
int x[101], y[101], a[101];
int xmin, xmax, ymin, ymax;
scanf("%d %d %d", &w, &h, &n);
for(int i=1; i<n+1, i++){
scanf("%d %d %d", &x[i], &y[i], &a[i]);
}
xmin =0;
ymin=0;
xmax=w;
ymax=h;
for(i=1; i<n+1; i++){
switch(a[i]){
case 1:
xmin = x[i];
break;
case 2:
xm... | a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before ')' token
8 | for(int i=1; i<n+1, i++){
| ^
| ;
a.cc:16:5: error: 'i' was not declared in this scope
16 | for(i=1; i<n+1; i++){
| ^
|
s817273037 | p03944 | C++ | #include <stdio.h>
int main(){
int w, h, n;
int x[101], y[101], a[101];
int xmin, xmax, ymin, ymax;
scanf("%d %d %d", &w, &h, &n);
for(int i=1; i<n+1, i++){
scanf("%d %d %d", &x[i], &y[i], &a[i]);
}
xmin =0;
ymin=0;
xmax=w;
ymax=h;
for(i=1; i<n+1, i++){
switch(a[i]){
case 1:
xmin = x[i];
break;
case 2:
xm... | a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before ')' token
8 | for(int i=1; i<n+1, i++){
| ^
| ;
a.cc:16:5: error: 'i' was not declared in this scope
16 | for(i=1; i<n+1, i++){
| ^
a.cc:16:20: error: expected ';' before ')' ... |
s315672494 | p03944 | C++ | #include <stdio.h>
int main(){
int w, h, n;
int x[101], y[101], a[101];
int xmin, xmax, ymin, ymax;
scanf("%d %d %d", &w, &h, &n);
for(int i=1; i<n+1, i++){
scanf("%d %d %d", &x[i], &y[i], &a[i]);
}
xmin =0;
ymin=0;
xmax=w;
ymax=h;
for(int i=1; i<n+1, i++){
switch(a[i]){
case 1:
xmin = x[i];
break;
case 2:
... | a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before ')' token
8 | for(int i=1; i<n+1, i++){
| ^
| ;
a.cc:16:24: error: expected ';' before ')' token
16 | for(int i=1; i<n+1, i++){
| ^
| ... |
s085544027 | p03944 | Java | import java.util.*;
public class Main
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int W = sc.nextInt();
int H = sc.nextInt();
int N = sc.nextInt();
int[] x = new int[N];
int[] y = new int[N];
int[] a = new int[N];
int xmin = 0;
int xmax = W;
int ymin = 0;
int y... | Main.java:3: error: '{' expected
public class Main
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:37: error: class, interface, enum, or recor... |
s888362031 | p03944 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int W, H, N;
cin >> W >> H >> N;
int point[N][3];
for (int i = 0; i < N; i++){
for (int j = 0; j < 3; j++) {
cin >> point[i][j];
}
}
int dl[2] = {0, 0};
int ur[2] = {W, H};
for (int i... | a.cc: In function 'int main()':
a.cc:27:29: error: 'mh' was not declared in this scope
27 | dl[1] = max(mh[1], point[i][1]);
| ^~
|
s362004414 | p03944 | C++ | #include <iostream>
using namespace std;
int main()
{
int W, H, N;
cin >> W >> H >> N;
int point[N][3];
for (int i = 0; i < N; i++){
for (int j = 0; j < 3; j++) {
cin >> point[i][j];
}
}
int dl[2] = {0, 0};
int ur[2] = {W, H};
for (int i = 0; i < N; i++) {
... | a.cc: In function 'int main()':
a.cc:26:29: error: 'mh' was not declared in this scope
26 | dl[1] = max(mh[1], point[i][1]);
| ^~
|
s731446827 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int xy[101][101],W,H,N;
int main(){
scanf("%d %d %d",&W,&H,&N);
int x,y,a;
for(int i=0;i<N;i++){
scanf("%d %d %d",&x,&y,&a);
switch (a) {
case 1:for(int j=0;j<x;j++){
for(int k=0;k<H;k++){
xy[j][k]=1;
}
}
break;... | a.cc: In function 'int main()':
a.cc:48:5: error: 'maxW' was not declared in this scope
48 | maxW=max(cnt,maxW);
| ^~~~
a.cc:57:5: error: 'maxH' was not declared in this scope
57 | maxH=max(cnt,maxH);
| ^~~~
a.cc:61:10: error: 'maxH' was not declared in this scope
61 | int S=(maxH... |
s476035238 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int xy[101][101],W,H,N;
int main(){
scanf("%d %d %d",&W,&H,&N);
int x,y,a;
for(int i=0;i<N;i++){
scanf("%d %d %d",&x,&y,&a);
switch (a) {
case 1:for(int j=0;j<x;j++){
for(int k=0;k<H;k++){
xy[j][k]=1;
}
}
break;... | a.cc: In function 'int main()':
a.cc:46:23: error: 'cnt' was not declared in this scope; did you mean 'int'?
46 | if(xy[j][i]==0) cnt++;
| ^~~
| int
a.cc:48:5: error: 'maxW' was not declared in this scope
48 | maxW=max(cnt,maxW);
| ^~~~
a... |
s728623629 | p03944 | C | #include<stdio.h>
int main(){
int i,a,b,c;
int a1[100];
int b1[100];
int c1;
scanf("%d %d %d",&a,&b,&c);
int total=a*b;
for(i=0;i<c;i++){
scanf("%d %d %d",&a1[i],&b1[i],&c1);
if(c1==1){
total=total-(a[i]+a[i-1]+a[i-2])*b;
}
if(c1==2){
total=total-(a-a1[i]+a[i-1]+a[i-2])*b;
a=a1;
}
if(c1==3){... | main.c: In function 'main':
main.c:12:39: error: subscripted value is neither array nor pointer nor vector
12 | total=total-(a[i]+a[i-1]+a[i-2])*b;
| ^
main.c:12:44: error: subscripted value is neither array nor pointer nor vector
12 | ... |
s363480636 | p03944 | C++ | #include <algorithm>//min/max/sort(rand-access it)/merge
#include <array>
#include <bitset>
// #include <chrono>//std::chrono::/system_clock/steady_clock/high_resolution_clock/duration
#include <climits>//INT_MAX/INT_MIN/ULLONG_MAX
#include <cmath>//fmin/fmax/fabs/sin(h)/cos(h)/tan(h)/exp/log/pow/sqrt/cbrt/ceil/floor/r... | /usr/bin/ld: /tmp/cctJMARc.o: in function `main':
a.cc:(.text+0x278): undefined reference to `void rar<int>(unsigned long, int*)'
/usr/bin/ld: a.cc:(.text+0x2bd): undefined reference to `void rar2<int>(unsigned long, unsigned long, int**)'
collect2: error: ld returned 1 exit status
|
s338245884 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
struct Corner{
double x,y;
};
const int MAX_N=100;
double x[MAX_N+1],y[MAX_N+1],a[MAX_N+1];
int main(){
double w,h;
int n;
double wide,height;
cin>>w>>h>>n;
Corner co[2][2];
co[0][0].x=0; co[0][0].y=0;
co[0][1].x=0; co[0][1].y=h;
co[1... | a.cc: In function 'int main()':
a.cc:47:13: error: expected primary-expression before '<' token
47 | if(wide=<0||height=<0){
| ^
a.cc:47:24: error: expected primary-expression before '<' token
47 | if(wide=<0||height=<0){
| ^
|
s212995267 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
struct Corner{
double x,y;
};
const int MAX_N=100;
double x[MAX_N+1],y[MAX_N+1],a[MAX_N+1];
int main(){
double w,h;
int n;
double wide,height;
cin>>w>>h>>n;
Corner co[2][2];
co[0][0].x=0; co[0][0].y=0;
co[0][1].x=0; co[0][1].y=h;
co[1... | a.cc: In function 'int main()':
a.cc:47:13: error: expected primary-expression before '<' token
47 | if(wide=<0||height=<0){
| ^
a.cc:47:24: error: expected primary-expression before '<' token
47 | if(wide=<0||height=<0){
| ^
|
s792595876 | p03944 | Java | import java.util.Arrays;
import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int W = Integer.parseInt(scan.next());
int H = Integer.parseInt(scan.next());
int N = Integer.parseInt(scan.next());
int[] xs ... | Main.java:4: error: class B is public, should be declared in a file named B.java
public class B {
^
1 error
|
s639846811 | p03944 | C++ | #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <functional>
#include <algorithm>
#include <complex>
#include <map>
#include <cmath>
#include <string>
#include <cstdio>
#include <stdio.h>
#include <cstdlib>
#include <istream>
using namespace std;
//--------------------... | a.cc: In function 'int main()':
a.cc:56:16: error: invalid use of member function 'std::stack<_Tp, _Sequence>::size_type std::stack<_Tp, _Sequence>::size() const [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; size_type = long unsigned int]' (did you forget the '()' ?)
56 | if (s1.size > ... |
s014982718 | p03944 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(int argc, char const* argv[]){
int w,h,n;cin>>w>>h>>n;
vector<int> x(n),y(n),a(n);
for (int i = 0; i < n; i++) {
cin>>x[i]>>y[i]>>a[i];
}
int xi=0,xj=w,yi=0,yj=h;
for (int i = 0; i < n; i++) {
if(a[i] == 1){
... | a.cc: In function 'int main(int, const char**)':
a.cc:24:46: error: 'ji' was not declared in this scope; did you mean 'yi'?
24 | if(xj<xi || yj<yi || w < xj-xi || h < yj-ji)cout<<"0"<<endl;
| ^~
| yi
|
s338027742 | p03944 | C | #include <iostream>
#include <cmath>
#include <cstdio>
#include <vector>
#include <string>
using namespace std;
int main() {
long long width, height, N;
//int width_a = 0, height_a = 0;
long long uplimit;
long long lowlimit = 0;
long long rightlimit;
long long leftlimit = 0;
long long S;
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s591041881 | p03944 | C | #include <stdio.h>
int main () {
int W, H, N;
scanf("%d %d %d", &W, &H, &N);
int map[100][100] = {};
int i, j;
for (i=0; i<H; i++) {
for (j=0; j<W; j++) {
map[i][j] = 1;
}
}
int w, h, a;
int x, y;
for (i=0; i<N; i++) {
scanf("%d %d %d", &w, &h, &a);
switch (a) {
... | main.c: In function 'main':
main.c:55:21: error: expected expression before '<' token
55 | for (x=0; x=<W; x++) {
| ^
|
s268679067 | p03944 | C | #include <stdio.h>
int main(){
int W,H,N;
scanf("%d %d %d",&W,&H,&N);
int x[N],y[N],a[N],i;
for(i=0;i<N;i++){
scanf("%d %d %d",&x[i],&y[i],&a[i]);
}
int xl=0,xr=W,yu=H,yl=0;
for(i=0;i<N;i++){
if(a[i]==1)
if(xl<x[i])
xl=x[i];
if(a[i]==2)
if(xr>x[i])
xr=x[i];
if(a[i]==3)
if(yl<y[i]... | main.c: In function 'main':
main.c:34:23: error: 'yr' undeclared (first use in this function); did you mean 'yl'?
34 | if((xr-xl)>0&(yr-yl)>0)
| ^~
| yl
main.c:34:23: note: each undeclared identifier is reported only once for each function it appears in... |
s851525591 | p03944 | Java | import java.util.Scanner;
public class MissionB {
public static void main(String[] args) {
//変数//
int W; //右上頂点x座標
int H; //右上頂点y座標
int N; //長方形内の点の個数
int minwx; //白い部分のx座標始まり
int maxwx; //白い部分のx座標終わり
int minwy; //白い部分のy座標始まり
int maxwy; //白い部分のy座標終わり
int warea; //白い部分の面積
int[] x; //点のx座標... | Main.java:3: error: class MissionB is public, should be declared in a file named MissionB.java
public class MissionB {
^
1 error
|
s245745273 | p03944 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int w = sc.nextInt();
// スペース区切りの整数の入力
int h = sc.nextInt();
int n = sc.nextInt();
// 文字列の入力
int x[] = new int[n];
int y[] = new int[n];
int a[] = new int[n];
int maxx = w... | Main.java:18: error: not a statement
for(int i=0; i++; i<n){
^
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.