submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s120170710 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
# define rep(i, n) for(int(i)=0;(i)<(n);(i)++)
# define reps(i, n) for(int(i)=1;(i)<=(n);(i)++)
# define rrep(i, n) for(int i=((int)(n)); i>0; --i)
# define rreps(i, n) for(int i=((int)(n)); i>=0; --i)
# define ALL(v) v.begin(), v.end()
template<class T>inline bool chmax(T... | a.cc: In function 'int main()':
a.cc:20:10: error: 'n' was not declared in this scope
20 | rep(i, n) {
| ^
a.cc:4:38: note: in definition of macro 'rep'
4 | # define rep(i, n) for(int(i)=0;(i)<(n);(i)++)
| ^
a.cc:33:12: error: 'w' was not declared in th... |
s497684572 | p03944 | C++ | int W, H, N;
cin >> W >> H >> N;
int x1 = 0, x2 = W, y1 = 0, y2 = H;
int x, y, a;
rep(i, N) {
cin >> x >> y >> a;
if (a == 1)
x1 = max(x1, x);
if (a == 2)
x2 = min(x2, x);
if (a == 3)
y1 = max(y1, y);
if (a == 4)
y2 = min(y2, y);
}
int q = 0;
cout << max(q,(x2 - x1) * (y2 - y1)); | a.cc:2:9: error: 'cin' does not name a type
2 | cin >> W >> H >> N;
| ^~~
a.cc:3:29: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
3 | int x1 = 0, x2 = W, y1 = 0, y2 = H;
| ^~
a.cc:5:12: error: expected c... |
s056585981 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
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];
}
vector<vector<int>> table(h, vector<int>(w, 0));
for(int i = 0; i < n; i++){
if(a[i] == 1){
for (int x = 0; x<... | a.cc: In function 'int main()':
a.cc:14:26: error: invalid types 'int[int]' for array subscript
14 | for (int x = 0; x<x[i]-1; x++){
| ^
a.cc:21:21: error: invalid types 'int[int]' for array subscript
21 | for (int x = x[i] + 1; x<w; x++){
| ^
a... |
s296554764 | p03944 | C++ | c#include <bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
int iro[W+1][H+1];
for(int i=0; i<W+1; i++)
for(int j=0; j<H+1; j++)
iro[i][j]=0;
for(int i=0; i<N; i++){
int x, y, n;
cin >> x >> y >> n;
if(n==1){
if(x==0)
continue;
for(... | a.cc:1:2: error: stray '#' in program
1 | c#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'c' does not name a type
1 | c#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> W >> H >> N;
| ^~~
a.cc:68:5: error: 'co... |
s937294154 | p03944 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
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.at(i) >> y.at(i) >> a.at(i);
}
int A[W][H] = {W, H};
int B[W][H] = {0, 0};
for (in... | a.cc: In function 'int main()':
a.cc:23:23: error: request for member 'at' in 'B', which is of non-class type 'int [W][H]'
23 | if (B.at(0) > x.at(i)) {
| ^~
a.cc:24:23: error: request for member 'at' in 'B', which is of non-class type 'int [W][H]'
24 | ... |
s265313572 | p03944 | C++ | }
| a.cc:1:1: error: expected declaration before '}' token
1 | }
| ^
|
s819745226 | p03944 | C++ | #include "bits/stdc++.h"
using namespace std;
int main() {
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.at(i) >> y.at(i) >> a.at(i);
}
vector<int> C = { W,H };
vector<int> D = { 0,0 };
for (int i = 0;i < N;i++) {
if (a.at(i) == 1) {
if (D.at(0)... | a.cc: In function 'int main()':
a.cc:41:10: error: expected '}' at end of input
41 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s241723289 | 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);
vector<vector<bool> > B(H, vector<int>(W,false));
for (int i = 0; i < N; i++){
cin >> x[i] >> y[i] >> a[i];
}
for (int i = 0; i < N; i++){
if (a[i] ==... | a.cc: In function 'int main()':
a.cc:9:50: error: no matching function for call to 'std::vector<std::vector<bool> >::vector(int&, std::vector<int>)'
9 | vector<vector<bool> > B(H, vector<int>(W,false));
| ^
In file included from /usr/include/c++/14/vector:66,... |
s331292634 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W,H,N;
cin >> W >> H >> N;
vector<vector<int>> Z(N,vector<int>(3));
for(int i=0;i<N;i=i+1){
for(int j=0;j<3;j=j+1){
cin >> Z.at(i).at(j);
}
}
int S = 0;
for(int i=0;i<N;i=i+1){
if(Z.at(i).at(2) == 1){
S = S + (Z.at(i).at... | a.cc: In function 'int main()':
a.cc:29:8: error: 'i' was not declared in this scope
29 | else i(S < W*H)cout << S << endl;
| ^
|
s714142396 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int w,h,n,l=0,d=0;
cin>>w>>h>>n;
for(int i=0; i<n; i++){
int x,y,a;
cin>>x>>y>>a;
if(a==1) l=max(x,l);
if(a==2) w=min(x,w);
if(a==3) d=max(y,d);
if(a==4) h=min(y,h);
}
if(w-l<=0 || h-d<=0) cout<<0;
else cout<<(w-l)*(y-d);
} | a.cc: In function 'int main()':
a.cc:16:21: error: 'y' was not declared in this scope
16 | else cout<<(w-l)*(y-d);
| ^
|
s182542094 | p03944 | C | #include<stdio.h>
#include<stdlib.h>
int main()
{
int W,H,N;
int x[100],y[100],a[100];
int XU,XL=0,YU,YL=0,X,Y;
scanf("%d %d %d",&W,&H,&N);
XU=W;
YU=H;
for(int i=0;i<N;i++)
scanf("%d %d %d",&x[i],&y[i],&a[i]);
for(int i=0;i<N;i++)
if(x[i]<XL&&x[i]>XU&&y[i]<YL&&y[i]>YU)
continue;
... | main.c: In function 'main':
main.c:18:14: error: 'i' undeclared (first use in this function)
18 | switch(a[i]){
| ^
main.c:18:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:9: error: continue statement not within a loop
32 | cont... |
s305522135 | p03944 | C++ | #include <iostream>
using namespace std;
int mainn(){
int W,H,N;
int a;
int Wmin=0,Wmax,Hmin=0,Hmax;
cin >> W >> H >> N;
Wmax = W;
Hmax = H;
for(int i = 0;i<N;i++){
cin >> W >> H >> a;
switch(a){
case 1:
Wmin = min(Wmin,W);
break;
case 2:
Wmax = max(Wmax,W);
... | a.cc: In function 'int mainn()':
a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
30 | }
| ^
/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 ex... |
s364743504 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(N * 3);
for (int i = 0; i < N * 3; i++) {
cin >> vec.at(i);
}
using vi = vector<int>;
using vvi = vector<vi>;
vvi vec(W, vi(H));
for (int i = 0; i < N * 3 - 2; i += 3) {
int x, y, a;
... | a.cc: In function 'int main()':
a.cc:13:7: error: conflicting declaration 'vvi vec'
13 | vvi vec(W, vi(H));
| ^~~
a.cc:7:15: note: previous declaration as 'std::vector<int> vec'
7 | vector<int> vec(N * 3);
| ^~~
a.cc:22:27: error: request for member 'at' in 'vec.std::vector<in... |
s353623658 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina c... | a.cc: In function 'int main()':
a.cc:36:16: error: 'j' was not declared in this scope
36 | c[i][j] = 1;
| ^
|
s122406856 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina c... | a.cc:47:20: error: macro "rep" passed 3 arguments, but takes just 2
47 | rep(j, y, h)
| ^
a.cc:4:9: note: macro "rep" defined here
4 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
| ^~~
a.cc: In function 'int main()':
a.cc:36:16: error: 'j' was not declared in ... |
s316767958 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
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 x_min = 0, x_max = W;
int y_min = 0, y_max = H;
for (int i = 0; i < N; i++) {
if (a.at(i) == 1) {
... | a.cc: In function 'int main()':
a.cc:9:13: error: no match for call to '(std::vector<int>) (int&)'
9 | cin >> x(i) >> y(i) >> a(i);
| ~^~~
a.cc:9:21: error: no match for call to '(std::vector<int>) (int&)'
9 | cin >> x(i) >> y(i) >> a(i);
| ~^~~
a.cc:9:29: error... |
s490253516 | p03944 | C++ | /* 実行時間1s制限の場合
10^6 1,000,000 : 余裕をもって間に合う
10^7 10,000,000 : おそらく間に合う
10^8 100,000,000 : 非常にシンプルな処理でないと厳しい
*/
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll; // long longはデータモデル(LLP64, LP6... | a.cc: In function 'int main(int, char**)':
a.cc:71:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
71 | ans = (x_max - x_min) * (y_max - y_min);
| ^~~
| abs
|
s421783251 | p03944 | C++ | W, H, N = map(int, input().split())
min_H = 0
min_W = 0
max_H = H
max_W = W
for _ in range(N):
x, y, a = map(int, input().split())
if a == 1:
min_W = x
elif a == 2:
max_W = x
elif a == 3:
min_H = y
else:
max_H = y
print((max_H - min_H) * (max_W - min_W))
| a.cc:1:1: error: 'W' does not name a type
1 | W, H, N = map(int, input().split())
| ^
|
s845983283 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int W,H,N,a,x,y;
cin>>W>>H>>N;
pair<int,int>max=make_pair(W,H),min=make_pair(0,0);
for(int i=0;i<N;i++){
cin>>x>>y>>a;
if(a==1)min.first=max(x,min.first);
if(a==2)max.first=min(x,max.first);
if(a==3)min.second=(y,min.second);
if(a==4)... | a.cc: In function 'int main()':
a.cc:9:26: error: no match for call to '(std::pair<int, int>) (int&, int&)'
9 | if(a==1)min.first=max(x,min.first);
| ~~~^~~~~~~~~~~~~
a.cc:10:26: error: no match for call to '(std::pair<int, int>) (int&, int&)'
10 | if(a==2)max.first=min(x,max.... |
s496285197 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INPUT() freopen("input.txt", "r", stdin)
#define OUTPUT() freopen("output.txt", "w", stdout)
#define F f... | a.cc: In function 'int main()':
a.cc:59:25: error: 'a' was not declared in this scope
59 | a = (xn - x0);
| ^
a.cc:60:25: error: 'b' was not declared in this scope
60 | b = (yn - y0);
| ^
|
s982427238 | 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 lx = 0;
int rx = w;
int by = 0;
int uy = h;
for(int i = 0; i < n; i++) {
int x = sc.nextInt();
int y = sc.n... | Main.java:12: error: cannot find symbol
for(int i = 0; i < n; i++) {
^
symbol: variable n
location: class Main
1 error
|
s277169760 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef long double ld;
const int inf=1e9+7;
const ll longinf=1LL<<60;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define F first
#define S second
const int mx=1000010;
const ll ... | a.cc: In function 'int main()':
a.cc:28:3: error: expected '(' before 'int'
28 | int ans = (x2-x1)*(y2-y1);
| ^~~
| (
a.cc:29:27: error: 'ans' was not declared in this scope; did you mean 'abs'?
29 | if(x2-x1<=0 ||y2-y1<=0){ans=0;}
| ^~~
| ... |
s742609890 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
typedef long long ll;
int main() {
int w,h,n;
cin>>w>>h>>n;
int x,y,a;
pair<int,int> mi(0, 0), ma(w, h);
REP(i,n) {
cin>>x>>y>>a;
if (a==1) mi.first = max(x, mi.first);
else if(a==2) ma.first = min(x, ma.fi... | a.cc: In function 'int main()':
a.cc:19:73: error: expected ',' or ';' before ')' token
19 | int ans = max(0,(ma.first - mi.first)) * max(0, ma.second - mi.second));
| ^
|
s588997562 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;
#define REP(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, n) for (ll i = a; i < n; i++)
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
double w,h;
int n;
double ow=0,oh=0;
cin >>w>> h>> n;
... | a.cc: In function 'int main()':
a.cc:26:23: error: 'oy' was not declared in this scope; did you mean 'oh'?
26 | cout << ((w>ow&&h>oy)?(w-ow)*(h-oh):0) << endl;
| ^~
| oh
|
s245773386 | p03944 | C++ | include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,start,end) for(int i=start;i<=end;i++)
const int INF = 1001001001;
using namespace std;
typedef long long ll;
int main()
{
int W, H, N;
int cell[110][110];
int x[110], y[110], a[110];
int res=0;
cin >> W>>H>>N;
rep(i,N) {
cin ... | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:14:3: error: 'cin' was not declared in this scope
14 | cin >> W>>H>>N;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding ... |
s739697010 | p03944 | C++ | #include <iostream>
#include <cstring>
#define MOD 1000000007
using namespace std;
int n, h, w, max1=0, max3=0, min2, min4, islem;
pair<int, int> arr[101];
int main(void){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin>>w>>h>>n;
min2=w;
min4=h;
for(int i=0;i<n;i++)cin>>arr[i].first>>arr[i].seco... | a.cc: In function 'int main()':
a.cc:33:28: error: 'min3' was not declared in this scope; did you mean 'min4'?
33 | cout<<(min2-max1)*(min3-max4);
| ^~~~
| min4
a.cc:33:33: error: 'max4' was not declared in this scope; did you mean 'max3'?
... |
s892432770 | p03944 | C++ | #include <iostream>
#include <cstring>
#define MOD 1000000007
using namespace std;
int n, h, w, max1=0, max3=0, min2, min4, islem[101];
pair<int, int> arr[101];
int main(void){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin>>w>>h>>n;
min2=w;
min4=h;
for(int i=0;i<n;i++)cin>>arr[i].first>>arr[i]... | a.cc: In function 'int main()':
a.cc:18:20: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [101]')
18 | cin>>islem;
| ~~~^~~~~~~
| | |
| | int [101]
| ... |
s334592234 | p03944 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = 1000000007;
const int INF_32 = 1LL << 30;
const int64_t INF_64 = 1LL << 60;
int main()
{
int W, H, N;
cin >> W >> H >> N;
set<int> left;
set<int> right;
set<int> lo... | a.cc: In function 'int main()':
a.cc:52:18: error: 'x' was not declared in this scope
52 | if(x_max-x-min>=0 && y_max-y_min>0){
| ^
|
s371032163 | p03944 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = 1000000007;
const int INF_32 = 1LL << 30;
const int64_t INF_64 = 1LL << 60;
int main()
{
int W, H, N;
cin >> W >> H >> N;
set<int> left;
set<int> right;
set<int> lo... | a.cc: In function 'int main()':
a.cc:52:17: error: no match for 'operator-' (operand types are 'std::set<int>' and 'std::set<int>')
52 | if(right-left>0 && upper-lower>0){
| ~~~~~^~~~~
| | |
| | set<[...]>
| set<[...]>
In file includ... |
s870680364 | p03944 | C++ | #include<iostream>
using namespace std;
int main(){
int n,w,h,s;
cin>>n;
cin>>w;
cin>>h;
int x[n],y[n],a[n];
for(int i=0;i<n;i++){
cin>>x[i];
cin>>y[i];
cin>>a[i];
}
int b[4]={0,w,0,h}
for(int i=0;i<n;i++){
switch(a[i]){
case 1:
if(b[0]<x[i]){
b[0]=x[i];
... | a.cc: In function 'int main()':
a.cc:17:3: error: expected ',' or ';' before 'for'
17 | for(int i=0;i<n;i++){
| ^~~
a.cc:17:15: error: 'i' was not declared in this scope
17 | for(int i=0;i<n;i++){
| ^
|
s544071010 | p03944 | C++ | #include<iostream>
using namespase std;
int main(){
int n,w,h,s;
cin>>n;
cin>>w;
cin>>h;
int x[n],y[n],a[n];
for(int i=0;i<n;i++){
cin>>x[i];
cin>>y[i];
cin>>a[i];
}
int b[4]={0,w,0,h}
for(int i=0;i<n;i++){
switch(a[i]){
case 1:
if(b[0]<x[i]){
b[0]=x[i];
... | a.cc:3:7: error: expected nested-name-specifier before 'namespase'
3 | using namespase std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/in... |
s740464476 | p03944 | C++ | #include<iostream>
int main(){
int n,w,h,s;
cin>>n;
cin>>w;
cin>>h;
int x[n],y[n],a[n];
for(int i=0;i<n;i++){
cin>>x[i];
cin>>y[i];
cin>>a[i];
}
int b[4]={0,w,0,h}
for(int i=0;i<n;i++){
switch(a[i]){
case 1:
if(b[0]<x[i]){
b[0]=x[i];
}
break;
... | a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin>>n;
| ^~~
| 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; ///< Linked to stand... |
s382525806 | p03944 | C++ | ew,eh,n=[int(x) for x in input().rstrip().split()]
fw=0
fh=0
ansx=0
ansy=0
for i in range(n):
x,y,a=[int(x) for x in input().rstrip().split()]
if(a==1):
fw=max(fw,x)
elif(a==2):
ew=min(ew,x)
elif (a==3):
fh=max(fh,y)
elif (a==4):
eh=min(eh,y)
if(ew-fw<0):
ansx=0
... | a.cc:1:1: error: 'ew' does not name a type
1 | ew,eh,n=[int(x) for x in input().rstrip().split()]
| ^~
|
s170021107 | p03944 | C | #include<stdio.h>
int main(void)
{
int left=0,right,up,down=0,x,y,num,a;
char str[100];
fgets(str,sizeof(str),stdin);
sscanf(str,"%d %d %d",&right,&up,&num);
for(int i=0;i<num;i++)
{
fgets(str,sizeof(str),stdin);
sscanf(str,"%d %d %d",&x,&y,&a);
switch(a)
{
case 1:
if(l... | main.c: In function 'main':
main.c:32:5: error: 'ans' undeclared (first use in this function)
32 | ans = (right-left) * (up-down);
| ^~~
main.c:32:5: note: each undeclared identifier is reported only once for each function it appears in
|
s655802589 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int w,h,n;
cin >> w >> h >> n;
int xmax,xmin,ymax,ymin;
for(int i=0;i<N;i++){
int x = 0;
int y = 0;
int a = 0;
cin >> x >> y >> a;
if(a == 1){
if(xmin < x){
xmin = x;
}
}else if(a == 2){
if(xmax > x){
xmax = x;... | a.cc: In function 'int main()':
a.cc:8:17: error: 'N' was not declared in this scope
8 | for(int i=0;i<N;i++){
| ^
|
s791634173 | p03944 | C++ | #include<iostream>
#include<vector>
int main() {
int width, height, N;
std::cin >> width >> height >> N;
std::vector<std::vector<int>> data(height,std::vector<int>(width));
for (int i=0; i<N; i++) {
int temp_x,temp_y,flag;
std::cin >> temp_x >> temp_y >> flag;
if (a == 1) {
for (int y = 0; y ... | a.cc: In function 'int main()':
a.cc:11:9: error: 'a' was not declared in this scope
11 | if (a == 1) {
| ^
|
s981768612 | p03944 | C++ | include <iostream>
include <vector>
using namespace std;
int main() {
int square[105][105];
int w, h, n;
cin >> w >> h >> n;
for(int i=0; i<n; i++){
int x, y, func;
cin >> x >> y >> func;
switch(func) {
case 1:
for(int X=0; X<x; X++)
for(int Y=0; Y<105; Y++)
squa... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
8 | cin >> w >> h >> n;
| ^~~
a.cc:40:3: error: 'cout' was not declared in this scope
40 | cout << cnt << endl;
| ^~... |
s012694675 | p03944 | C++ | y#include <iostream>
include <vector>
using namespace std;
int main() {
int square[105][105];
int w, h, n;
cin >> w >> h >> n;
for(int i=0; i<n; i++){
int x, y, func;
cin >> x >> y >> func;
switch(func) {
case 1:
for(int X=0; X<x; X++)
for(int Y=0; Y<105; Y++)
sq... | a.cc:1:2: error: stray '#' in program
1 | y#include <iostream>
| ^
a.cc:1:1: error: 'y' does not name a type
1 | y#include <iostream>
| ^
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
8 | cin >> w >> h >> n;
| ^~~
a.cc:40:3: error: 'cout' was no... |
s406558786 | 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);
}
vector<int>p(4);
p.at(0) = 0;
p.at(1)=0;
p.at(2)=W;
p.at(4)=H;
... | a.cc: In function 'int main()':
a.cc:29:51: error: expected ')' before '{' token
29 | }else if(a.at(i) == 3 && y.at(i) > p.at(1){
| ~ ^
| )
a.cc:34:7: error: expected primary-expression before '}' to... |
s524249408 | 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);
}
vector<int>p(4);
p.at(0) = 0;
p.at(1)=0;
p.at(2)=W;
p.at(4)=H;
... | a.cc: In function 'int main()':
a.cc:10:6: error: expected '(' before '{' token
10 | for{int i = 0;i < N;i ++){
| ^
| (
a.cc:10:6: error: expected primary-expression before '{' token
a.cc:40:7: error: expected primary-expression at end of input
40 | }
| ^
a.cc:40:7: error:... |
s595451098 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W,H,N;
cin >> W >> H >> N;
int x[N];
int y[N];
int a[N];
for{int i = 0;i < N;i ++){
cin >> x[i] >> y[i] >> a[i];
}
int p[4];
p[0] = 0;
p[1]=0;
p[2]=W;
p[3]=H;
for(int i = 0; i < N; i ++){
if(a[... | a.cc: In function 'int main()':
a.cc:10:6: error: expected '(' before '{' token
10 | for{int i = 0;i < N;i ++){
| ^
| (
a.cc:10:6: error: expected primary-expression before '{' token
a.cc:40:7: error: expected primary-expression at end of input
40 | }
| ^
a.cc:40:7: error:... |
s092956372 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> P;
#define mod 1000000007
#define INF (1LL<<60)
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
#define YES puts("YES")
#define Yes puts("Yes... | a.cc: In function 'int main()':
a.cc:122:12: error: 'xi' was not declared in this scope; did you mean 'xmi'?
122 | if(xma-xi<0 || yma-ymi<0) cout << 0 << endl;
| ^~
| xmi
|
s516844577 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll =long long;
using db = double;
using vll = vector<long long>;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
#... | a.cc: In function 'bool coY()':
a.cc:18:32: warning: no return statement in function returning non-void [-Wreturn-type]
18 | bool coY() {cout <<"Yes"<<endl;}
| ^
a.cc: In function 'bool coN()':
a.cc:19:30: warning: no return statement in function returning non-void [-Wreturn-type... |
s599038347 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
typedef pair<int, int> Pint;
typedef pair<int64_t, int64_t> Pll;
int main() {
int W, H, N;
cin >> W >> H >> N;
int minx = 0; maxx = W; miny = 0; maxy = H;
for (int i = 0; i < N; ... | a.cc: In function 'int main()':
a.cc:11:19: error: 'maxx' was not declared in this scope
11 | int minx = 0; maxx = W; miny = 0; maxy = H;
| ^~~~
a.cc:11:29: error: 'miny' was not declared in this scope; did you mean 'minx'?
11 | int minx = 0; maxx = W; miny = 0; maxy = H;
| ... |
s444227570 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
main(){
int w,h,n;
cin>>w>>h>>n;
vector<bool>white(h,vector<bool>(w,true));
while(n--){
int a,b,c;
cin>>a>>b>>c;
if(c==1){
for(int i=0;i<h;++i)
for(int j=0;j<a;++j)
white[i][j]=false;
}
else if(c==2){
for(int i=0;i<h;... | 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:6:43: error: no matching function for call to 'std::vector<bool>::vector(int&, std::vector<bool>)'
6 | vector<bool>white(h,vector<bool>(w,true));
| ... |
s300752642 | p03944 | C++ | #include <algorithm>
#include <bits/stdc++.h>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <list>
#include <stack>
#include <string>
#include <vector>
#include <bits/stdc++.h>
#define INFINI (1000 * 1000 * 1000)
... | a.cc: In function 'int main()':
a.cc:84:14: error: 'maxx' was not declared in this scope; did you mean 'max'?
84 | cout<<max(0, maxx - minx) * max(0, maxy - miny)<<endl;
| ^~~~
| max
a.cc:84:21: error: 'minx' was not declared in this scope; did you mean 'min'?
84 | cout<<max(... |
s609303081 | p03944 | C++ | #include <cstdio>
#include <bitset>
using namespace std;
int main( int argc, char *argv[] ){
int W,H,N ;
scanf("%d%d%d",&W,&H,&N) ;
int x,y,a ;
int Wl,Hl,Wu,Hu ;
Wl = 0;
Hl = 0;
Wu = W;
Hu = H;
for(int i=0; i<N; i++){
scanf("%d%d%d",&x,&y,&a) ;
if (a==1&x>Wl){Wl=x;}
else if(a==2&... | a.cc: In function 'int main(int, char**)':
a.cc:28:38: error: expected ')' before ';' token
28 | else {printf("%d",(Wu-Wl)*(Hu-Hl););}
| ~ ^
| )
a.cc:28:39: error: expected primary-expression before ')' token
28 | else {pr... |
s661181852 | p03944 | C++ | #include<stdc++.h>
using namespace std;
#define ll long long
int main() {
ll W,H,N,x,y,a;
cin >> W >> H >> N;
vector<vector<ll>> vec;
ll w_=W, h_=H;
while(cin >> x >> y >> a) {
if (a==1) w_ -= x;
else if (a==2) w_ -= W-x;
else if (a==3) h_ -= y;
else h_ -= H-y;
}
if (w_ < 0) w_ = 0;
if (h_ < 0) h... | a.cc:1:9: fatal error: stdc++.h: No such file or directory
1 | #include<stdc++.h>
| ^~~~~~~~~~
compilation terminated.
|
s384845924 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define rep(i, n) for(int i = 0; i < (n); i++)
int int_len(int n) {
int s=0;
while(n!=0) s++, n/=10;
return s;
}
int int_sum(int n) {
int m=0,s=0,a=n;
while(a!=0) s++, a/=10;
for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow... | a.cc: In function 'int main()':
a.cc:73:25: error: 'a' was not declared in this scope
73 | vector<int> x(n),y(n);a(n);
| ^
|
s068817381 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int W,H,N,number1,number2,number3,number4,ans;
cin >> W;
cin >> H;
cin >> N;
number2 = W;
number4 = H;
vector<int> x(N);
vector<int> y(N);
vector<int> a(N);
for(int i = 0;i < N;i++){
cin >> x.at(i);
cin >... | a.cc:44:5: error: redefinition of 'int main()'
44 | int main (){
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main (){
| ^~~~
|
s414242226 | p03944 | C++ | vector<int> a(N);
for(int i = 0;i < N;i++){
cin >> x.at(i);
cin >> y.at(i);
cin >> a.at(i);
if(a.at(i) == 1 && number1 <= x.at(i)){
number1 = x.at(i);
}
else if(a.at(i) == 2 && number2 >= x.at(i)){
number2 = x.at(i);
}
else ... | a.cc:1:5: error: 'vector' does not name a type
1 | vector<int> a(N);
| ^~~~~~
a.cc:2:5: error: expected unqualified-id before 'for'
2 | for(int i = 0;i < N;i++){
| ^~~
a.cc:2:19: error: 'i' does not name a type
2 | for(int i = 0;i < N;i++){
| ^
a.cc:2:... |
s438217068 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int W,H,N,number1,number2,number3,number4,ans;
cin >> W;
cin >> H;
cin >> N;
number2 = W;
number4 = H;
vector<int> x(N);
vector<int> y(N);
vector<int> a(N);
for(int i = 0;i < N;i++){
cin >> x.at(i);
cin >... | a.cc: In function 'int main()':
a.cc:35:70: error: expected ')' before ';' token
35 | ans = (W - (W - number2 + number1) * (H-(H-number4 + number3);
| ~ ^
| )
a.... |
s871552089 | p03944 | C++ | #include <iostream>
#include <iomanip>
#include <vector>
#include <utility>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <deque>
#include <stack>
#include <queue>
#include <array>
#include <random>
using namespace std;
#define... | a.cc: In member function 'size_t custom_hash::operator()(ui64) const':
a.cc:39:42: error: 'chrono' has not been declared
39 | static const ui64 FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
| ^~~~~~
|
s675770438 | p03944 | C++ | include<bits/stdc++.h>
using namespace std;
int main(void){
int w, h, n;
cin >> w >> h >> n;
int p = 0;
int q = w;
int r = 0;
int s = h;
for(int i = 0; i < n; i++){
int x, y, a;
cin >> x >> y >> a;
if(a == 1 && p < x){
p = x;
}
else if(... | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin >> w >> h >> n;
| ^~~
a.cc:32:9: error: 'cout' was not declared in this scope
32 | cout << 0 << endl;
... |
s044435564 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
int W,H,N;
cin >> W >> H >> N;
int w1=0,w2=W,h1=0,h2=H;
int x,y,a;
while(cin >> x >> y >> a){
if (a==1){w1=max(w1,x);}
if (a==2){w2=min(w2,x);}
if (a==3){h1=max(h1,y);}
if (a==4){h2=mi... | a.cc: In function 'int main()':
a.cc:15:37: error: 'emdl' was not declared in this scope
15 | if(w1>=w2 || h1>=h2){cout << 0 << emdl;}
| ^~~~
|
s774623591 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
int W,H,N;
cin >> W >> H >> N;
int w1=0,w2=W,h1=0,h2=H;
while(cin >> x >> y >> a){
if (a==1){w1=max(w1,x);}
if (a==2){w2=min(w2,x);}
if (a==3){h1=max(h1,y);}
if (a==4){h2=min(h2,y);}
}... | a.cc: In function 'int main()':
a.cc:8:16: error: 'x' was not declared in this scope
8 | while(cin >> x >> y >> a){
| ^
a.cc:8:21: error: 'y' was not declared in this scope
8 | while(cin >> x >> y >> a){
| ^
a.cc:8:26: error: 'a' was not declared in this scope
... |
s806877082 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
int W,H,N;
cin >> W >> H >> N;
vector<vector<int>> G(2,vector<int>(110,0));
for(int i=W+1;i<110;i++){G.at(0).at(i)++;}
for(int i=H+1;i<110;i++){G.at(1).at(i)++;}
int x[N],y[N],a[N];
rep(i,N){
... | a.cc: In function 'int main()':
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13 | if(a==2){for(int j=x+1;j<110;j++){G.at(0).at(j)++;}}
| ~^~~
a.cc:13:25: error: invalid conversion from 'int*' to 'int' [-fpermissive]
13 | if(a==2){for(int j=x+1;j<110;... |
s054394404 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
int W,H,N;
cin >> W >> H >> N;
vector<vector<int>> G(2,vector<int>(110,0));
for(int i=W+1;i<110;i++){G.at(0).at(i)++;}
for(int i=H+1;i<110;i++){G.at(1).at(i)++;}
rep(i,N){
int x[i],y[i],a[i];
... | a.cc: In function 'int main()':
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13 | if(a==2){for(int j=x+1;j<110;j++){G.at(0).at(j)++;}}
| ~^~~
a.cc:13:25: error: invalid conversion from 'int*' to 'int' [-fpermissive]
13 | if(a==2){for(int j=x+1;j<110;... |
s099588818 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
int W,H,N;
cin >> W >> H >> N;
vector<vector<int>> G(2,vector<int>(110,0));
for(int i=W+1;i<110;i++){G.at(0).at(i)++;}
for(int i=H+1;i<110;i++){G.at(1).at(i)++;}
while(i<N){
int x,y,a;
cin >... | a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
10 | while(i<N){
| ^
|
s996017758 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
int W,H,N;
cin >> W >> H >> N;
vector<int> G[110];
int p,q;
rep(i,N){
int x,y,a;
cin >> x >> y >> a;
if(a==1){for(int j=x;j<=W;j++){G[p].push_back(j);}}
if(a==2){for(int j=0;j<=x;j++){... | a.cc: In function 'int main()':
a.cc:17:14: error: 'a' was not declared in this scope
17 | cout << (G[a].size())*(G[q].size()) << endl;
| ^
|
s555496241 | p03944 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <random>
#include <cstdio>
#include <cmath>
#include <map>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (int) n; i++)
struct point {
int x,y;
};
int main() {
int w,h,n; ci... | a.cc: In function 'int main()':
a.cc:75:6: error: expected '}' at end of input
75 | }
| ^
a.cc:17:12: note: to match this '{'
17 | int main() {
| ^
|
s359995159 | p03944 | C++ | #include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<iostream>
#include<queue>
#include<vector>
#include<bitset>
#include<math.h>
using namespace std;
#define INF 110000000000
#define MOD 1000000007
typedef long long ll;
typedef pair<int,int> P;
int X[110],Y[110]
int main(){
int W,H,N,x,y,a,ansX=0,ansY=0... | a.cc:17:1: error: expected initializer before 'int'
17 | int main(){
| ^~~
|
s966703324 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int w, h, n;
int x, y, a;;
int main () {
cin >> w >> h >> n;
int x_min = 0, x_max = w, y_min = 0, y_max = h;
//白い領域は長方形になる
for (int i = 0; i < n; i++){
cin >> x >> y >> a;
if (a == 1)
x_min = max(x, x_min);
else if (a == 2)
x_max = min(x... | a.cc: In function 'int main()':
a.cc:23:33: error: invalid type argument of unary '*' (have 'int')
23 | cout << (max(0, x_max-x_min))(*max(0, y_max-y_min)) << endl;
| ^~~~~~~~~~~~~~~~~~~~
a.cc:23:53: error: expression cannot be used as a function
23 | cout << (max(0, x_ma... |
s328924500 | p03944 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int W,H,N;
cin >> W >> H >> N;
int S=W*H;
for(int i=0;i<N;i++){
int x,y,a;
cin >> x >> y >> a;
switch(a){
case 1:
S-=x*H;
break;
case 2:
S-=(W-x)*H
break;
case 3:
S-=... | a.cc: In function 'int main()':
a.cc:19:19: error: expected ';' before 'break'
19 | S-=(W-x)*H
| ^
| ;
20 | break;
| ~~~~~
|
s609948423 | p03944 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
int main() {
int W, H, N;
int x, y, a;
int xMin, xMax, yMin, yMax;
scanf("%d %d %d", &W, &H, &N);
xMin = 0;
xMax = W;
yMin = 0;
yMax = H;
for (int i = 0; i < N; i++) {
sc... | a.cc: In function 'int main()':
a.cc:25:16: error: 'Max' was not declared in this scope; did you mean 'yMax'?
25 | int height = Max(xMax-xMin, 0);
| ^~~
| yMax
|
s064702976 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
void op(vector<vector<int>> &square,vector<vector<int>> &s,int n,int w,int h){
int height=h,width=w,stx=0,sty=0;
for (int i=0;i<n ;i++){
if (s.at(i).at(2) == 1){
for (int y=0;y <h;y++){
for (int x = 0;x<s.at(i).at(0);x++){
square.at(y).at(x)... | a.cc: In function 'void op(std::vector<std::vector<int> >&, std::vector<std::vector<int> >&, int, int, int)':
a.cc:21:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'class std::vector<int>'} has no member named 'st'; did you mean 'at'?
21 | stx =ma... |
s099085769 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int _main() {
double w,h;
int n;
cin >> w >> h >> n;
double x,y;
int a;
double max_x, max_y, min_x, min_y;
max_x = w;
max_y = h;
min_x = 0;
min_y = 0;
for(int i = 0; i < n; ++i){
cin >> x >> y >> a;
if(a == 1) min_x = x;
else if(a == 2) m... | a.cc: In function 'int _main()':
a.cc:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
25 | }
| ^
/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 ex... |
s940882362 | p03944 | C++ | int main() {
double w,h;
int n;
cin >> w >> h >> n;
double x,y;
int a;
double max_x, max_y, min_x, min_y;
max_x = w;
max_y = h;
min_x = 0;
min_y = 0;
for(int i = 0; i < n; ++i){
cin >> x >> y >> a;
if(a == 1) min_x = x;
else if(a == 2) max_x = x;
else if(a == 3) min_y = y;
els... | a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
4 | cin >> w >> h >> n;
| ^~~
a.cc:19:46: error: 'cout' was not declared in this scope
19 | if(max_x - min_x > 0 && max_y - min_y > 0) cout << (max_x - min_x) * (max_y - min_y) << endl;
| ... |
s333546070 | p03944 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) FFOR(i,0,n)
#define SORT(V) sor... | a.cc: In function 'int main()':
a.cc:36:14: error: invalid types 'int[int]' for array subscript
36 | A[k][l]=1;
| ^
a.cc:43:14: error: invalid types 'int[int]' for array subscript
43 | A[k][l]=1;
| ^
a.cc:50:14: error: invalid types 'int[int]' for arra... |
s422604956 | p03944 | C++ | /*
このコード、と~おれ!
Be accepted!
∧_∧
(。・ω・。)つ━☆・*。
⊂ ノ ・゜+.
しーJ °。+ *´¨)
.· ´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·'* ☆
*/
#pragma GCC optimize("Ofast")
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define rep1(i, n) for(int i = 1; i <= (n); ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#de... | a.cc: In function 'int main()':
a.cc:41:13: error: redeclaration of 'int w'
41 | int w, h, n, x, y, a, x0, y0, x1, y1;
| ^
a.cc:40:13: note: 'int w' previously declared here
40 | int w, a, b, ans = 0;
| ^
a.cc:41:28: error: redeclaration of 'int a'
41 | ... |
s195109915 | p03944 | C++ | #include "stdafx.h"
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
int w, h, n; cin >> w >> h >> n;
int wide[2] = {0,w}, height[2] = {0,h};
for (int i = 0; i < n; i++) {
int x, y, a; cin >> x >> y >> a;
if (a == 1) wide[0] = max(wide[0], x);
else if (a == 2)wide[1] = min(wide[1], ... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s316308352 | p03944 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n)+1;i++)
using namespace std;
int main() {
int w, h, n,count=0;
cin>>w>>h>>n;
vector<int> x(n);
vector<int> y(n);
vector<int> a(n);
rep(i,n) cin>>x[i]>>y{i}>>a[i];
int all=w*h;
int x1=0,x2=0,y1=0,y2=0;
rep(i,n)... | a.cc: In function 'int main()':
a.cc:11:23: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
11 | rep(i,n) cin>>x[i]>>y{i}>>a[i];
| ^~~
| |
| ... |
s043704731 | 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)
... | a.cc:36:5: error: redefinition of 'int main()'
36 | int main()
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main()
| ^~~~
|
s510202301 | p03944 | C++ | #include <bits/stdc++h.>
using namespace std;
int main(){
int w,h,n;
cin >> w >> h >> n;
vector<vector<int>> vec(n, vector<int>(3));
for (int i=0; i<n; i++){
for (int j=0; j<3; j++){
cin >> vec.at(i).at(j);
}
}
int x_min = 0;
int x_max = w;
int y_min = 0;
int y_max = h;
for (... | a.cc:1:10: fatal error: bits/stdc++h.: No such file or directory
1 | #include <bits/stdc++h.>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s980508950 | p03944 | C++ | #iclude,bits/stdc++.h>
using namespace std;
int main(){
int w,h,n,ww,hh;cin>>w>>h>>n;
int xM=0,xm=w,yM=0,ym=h;
vector<int> x(n),y(n),a(n);
for(int i=0;i<n;i++)cin>>x.at(i)>>y.at(i)>>a.at(i);
for(int j=0;j<n;j++){
if(a.at(j)==1)xM=max(xM,x.at(j));
else if(a.at(j)==2)xm=min(xm,x.at(j));
else if(a.at... | a.cc:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
1 | #iclude,bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:4:19: error: 'cin' was not declared in this scope
4 | int w,h,n,ww,hh;cin>>w>>h>>n;
| ^~~
a.cc:1:1: note: 's... |
s120544263 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
ll INF = 1000;
int main(){
int w, h, n;
cin >> w >> h >> n;
int x, y, a, max_x=0, min_x=INF, max_y=0, min_y=INF;
for (int i = 0; i < n; i++) {
cin >> x >> y >> a;
if (a == 1) max_x = max(max_x, x);
if (a == 2) min_x = min(min_x, x);
if (a == 3) ma... | a.cc:3:1: error: 'll' does not name a type
3 | ll INF = 1000;
| ^~
a.cc: In function 'int main()':
a.cc:8:31: error: 'INF' was not declared in this scope
8 | int x, y, a, max_x=0, min_x=INF, max_y=0, min_y=INF;
| ^~~
a.cc:13:17: error: 'max_y' was not declared in this... |
s914956811 | p03944 | C | #include <stdio.h>
#include <math.h>
int main(){
int w,h,n,x,y,a;
scanf("%d%d%d",&w,&h,&n);
int r1=0,r2=w,r3=0,r4=h;
for(int i=0;i<n;i++){
scanf("%d%d%d",&x,&y,&a);
switch(a){
case 1:
if(x>r1)r1=x;
break;
case 2:
if(x<r2)r2=x;
break;
case 3:
if(y... | main.c: In function 'main':
main.c:24:15: error: too few arguments to function 'fdim'
24 | printf("%d",fdim(r2-r1)*fdim(r4-r3));
| ^~~~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/... |
s835858341 | p03944 | C | #include <stdio.h>
#include <math.h>
int main(){
int w,h,n,x,y,a;
scanf("%d%d%d",&w,&h,&n);
int r1=0,r2=w,r3=0,r4=h;
for(int i=0;i<n;i++){
scanf("%d%d%d",&x,&y,&a);
switch(a){
case 1:
if(x>r1)r1=x;
break;
case 2:
if(x<r2)r2=x;
break;
case 3:
if(y... | main.c: In function 'main':
main.c:24:15: error: implicit declaration of function 'dimf'; did you mean 'fdimf'? [-Wimplicit-function-declaration]
24 | printf("%d",dimf(r2-r1)*dimf(r4-r3));
| ^~~~
| fdimf
|
s117010881 | p03944 | C++ | #include<cstdio>
int main(){
int W, H, N;
scanf("%d %d %d", &W, &H, &N);
int x[N], y[N], a[N];
for(int i=0; i<N; i++)
scanf("%d %d %d", &x[i], &y[i], &a[i]);
int k=W, l=0, m=W, n=0;
for(int i=0; i<N; i++){
if(a[i]==4){
if(k>y[i])
k = y[i];
}
if(a[i]==3){
if(l<y[i])
... | a.cc: In function 'int main()':
a.cc:33:5: error: 'print' was not declared in this scope; did you mean 'printf'?
33 | print("%d", s);
| ^~~~~
| printf
|
s403189926 | p03944 | C++ | #include<cstdio>
int main(){
int W, H, N;
scanf("%d %d %d", &W, &H, &N);
int x[N], y[N], a[N];
for(int i=0; i<N; i++)
scanf("%d %d %d", &x[i], &y[i], &a[i]);
int k=W, l=0, m=W, n=0;
for(int i=0; i<N; i++){
if(a[i]==4){
if(k>y[i])
k = y[i];
}
if(a[i]==3){
if(l<y[i])
... | a.cc: In function 'int main()':
a.cc:32:5: error: 'print' was not declared in this scope; did you mean 'printf'?
32 | print("0");
| ^~~~~
| printf
|
s283433343 | p03944 | C++ | #include<cstdio>
int main(){
int W, H, N;
scanf("%d %d %d", &W, &H, &N);
int x[N], y[N], a[N];
for(int i=0; i<N; i++)
scanf("%d %d %d", &x[i], &y[i], &a[i]);
int k=W, l=0, m=W, n=0;
for(int i=0; i<N; i++){
if(a[i]==4){
if(k>y[i])
k = y[i];
}
if(a[i]==3){
if(l<y[i])
... | a.cc: In function 'int main()':
a.cc:32:5: error: 'print' was not declared in this scope; did you mean 'printf'?
32 | print("%d", 0);
| ^~~~~
| printf
|
s027108377 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W,H,N;
cin >> W >> H >>N;
int x[W]={0,W,{}};
int y[H]={0,H,{}};
int result;
for(int i;i<N;i++){
int xin,yin,a;
cin >> xin >> y in >> a;
if(a==1 && x[0]<xin){
x[0]=xin;
}
if(a==2 && x[... | a.cc: In function 'int main()':
a.cc:11:20: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int [H]')
11 | cin >> xin >> y in >> a;
| ~~~~~~~~~~ ^~ ~
| | |
| | ... |
s141909910 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W,H,N;
cin >> W >> H >>N;
int x[W]={0,W,{}};
int y[H]={0,H,{}};
int result;
for(int i;i<N;i++){
int xin,yin,a;
cin >> xin >> y in >> a;
if(a==1 && x[0]<xin){
x[0]=xin;
}
if(a==2 && x[... | a.cc: In function 'int main()':
a.cc:11:20: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int [H]')
11 | cin >> xin >> y in >> a;
| ~~~~~~~~~~ ^~ ~
| | |
| | ... |
s568315841 | p03944 | C++ | #include <bits/stdc++.h> [0/0]
using ll = long long;
using namespace std;
int main() {
int W,H,N,x[100],y[100],a[100];
cin>>W>>H>>N;
for (i... | a.cc:1:200: warning: extra tokens at end of #include directive
1 | #include <bits/stdc++.h> [0/0]
| ... |
s504656828 | p03944 | C++ | #include <bits/stdc++.h> [0/0]
using ll = long long;
using namespace std;
int main() {
int W,H,N,x[100],y[100],a[100];
cin>>W>>H>>N;
for (i... | a.cc:1:200: warning: extra tokens at end of #include directive
1 | #include <bits/stdc++.h> [0/0]
| ... |
s735922289 | p03944 | C++ | #include <iostream>
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];
}
lbx = 0; //白い長方形の左下の頂点のx座標
lby = 0; //白い長方形の左下の頂点のy座標
rbx = W; //白い長方形の右下の頂点のx座標
lty = H; //... | a.cc: In function 'int main()':
a.cc:13:5: error: 'lbx' was not declared in this scope
13 | lbx = 0; //白い長方形の左下の頂点のx座標
| ^~~
a.cc:14:5: error: 'lby' was not declared in this scope
14 | lby = 0; //白い長方形の左下の頂点のy座標
| ^~~
a.cc:15:5: error: 'rbx' was not declared in this scope
15 |... |
s623265338 | p03944 | C++ | #include <iostream>
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];
}
lbx = 0; //白い長方形の左下の頂点のx座標
lby = 0; //白い長方形の左下の頂点のy座標
rbx = W; //白い長方形の右下の頂点のx座標
rty = H; //... | a.cc: In function 'int main()':
a.cc:13:5: error: 'lbx' was not declared in this scope
13 | lbx = 0; //白い長方形の左下の頂点のx座標
| ^~~
a.cc:14:5: error: 'lby' was not declared in this scope
14 | lby = 0; //白い長方形の左下の頂点のy座標
| ^~~
a.cc:15:5: error: 'rbx' was not declared in this scope
15 |... |
s734501733 | p03944 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <tuple>
#include <stack>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
typede... | a.cc: In function 'int main()':
a.cc:43:41: error: expected ';' before '}' token
43 | w = x[i]
| ^
| ;
44 | }
| ~
|
s363688101 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int w,h,n;
cin>>w>>h>>n;
int minx=101;
int maxx=0;
int miny=101;
int maxy=0;
for(int i=0;i<n;i++){
int a,b,c;
cin>>a>>b>>c;
if(a==1){maxx=max(maxx,b);}
else if(a==2){minx=min(minx,b);}
else if(a==3){maxy=max(maxy,c);}
else{mi... | a.cc:20:1: error: expected declaration before '}' token
20 | }
| ^
|
s500131202 | 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);
int A, B, C, D;
A = 0;
B = w;
C = 0;
D = H;
for(int i = 0; i < N; i++) {
cin >> x[i] >> y[i] >> a[i];
if (a[i] == 1 && x[i] >= A) {
... | a.cc: In function 'int main()':
a.cc:12:7: error: 'w' was not declared in this scope
12 | B = w;
| ^
a.cc:20:9: error: 'X' was not declared in this scope
20 | A = X[i];
| ^
|
s088676834 | p03944 | C++ | #include <stdc++.h>;
using namespace std;
int main() {
int W,H,N;
cin >> W>>H>>N;
vector<vector<int>> data(N, vector<int>(3));
// 入力 (2重ループを用いる)
for (int i = 0; i < N; i++) {
for (int j = 0; j < 3; j++) {
cin >> data.at(i).at(j);
}
}
int lx=0,hx=W,ly=0,hy=H;
for(int ... | a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include <stdc++.h>;
| ^
a.cc:1:10: fatal error: stdc++.h: No such file or directory
1 | #include <stdc++.h>;
| ^~~~~~~~~~
compilation terminated.
|
s019488307 | p03944 | C++ | #include <iostream>
#include <set>
using namespace std;
int main() {
int W,H,N;
cin >> W>>H>>N;
vector<vector<int>> data(N, vector<int>(3));
// 入力 (2重ループを用いる)
for (int i = 0; i < N; i++) {
for (int j = 0; j < 3; j++) {
cin >> data.at(i).at(j);
}
}
int lx=0,hx=W,ly=0,hy=H... | a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
8 | vector<vector<int>> data(N, vector<int>(3));
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <set>
+++ |+#inclu... |
s990781010 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int w,h,n;
cin >>w >>h >>n;
vector<vector<int>> s(h,vector<int> (w,1));
vector<int> x(n),y(n),a(n);
for(int i=0;i<n;i++)
cin >>x[i] >>y[i] >>a[i];
for(int k=0;k<n;k++){
if(a[k]==1){
for(int i=0;i<h;i++){
for(int j=0;j<x[k];i++)... | a.cc: In function 'int main()':
a.cc:31:23: error: no match for 'operator<' (operand types are 'std::vector<int>' and 'int')
31 | for(int i=y[k];y<h;i++){
| ~^~
| | |
| | int
| std::vector<int>
In file i... |
s023449024 | p03944 | C | #include <stdio.h>
int main(void)
{
int w,h,n,ans;
scanf("%d%d%d", &w,&h,&n);
int x[n], y[n], a[n];
for(int i=0; i<n; i++) scanf("%d%d%d", &x[i],&y[i],&a[i]);
int p[2],q[2];
p[0]=0;
p[1]=0;
q[0]=w;
q[1]=h;
for(int i=0; i<n; i++)
{
if(a[i]==1)
{
... | main.c: In function 'main':
main.c:36:5: error: expected declaration or statement at end of input
36 | return 0;
| ^~~~~~
|
s654365031 | p03944 | C++ | W, H, N = map(int, input().split())
x1 = y1 = a1 = 0
xmin = 0
xmax = W
ymin = 0
ymax = H
for _ in range(N):
x2, y2, a2 = map(int, input().split())
if (a2 == 1):
xmin = max(x2, xmin)
if (a2 == 2):
xmax = min(x2, xmax)
if (a2 == 3):
ymin = max(y2, ymin)
if (a2 == 4):
ymax = min(y2, ymax)
if (x... | a.cc:1:1: error: 'W' does not name a type
1 | W, H, N = map(int, input().split())
| ^
|
s826408276 | p03944 | C++ | const int INF = 1001001001;
const ll LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7; //10^9
const db EPS = 1e-9;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1}, dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
//#define int ll
//#define int long long
//配列版
signed main()
{
array<array<int,110>, 110> t{0};
int w,h,n; cin... | a.cc:2:7: error: 'll' does not name a type
2 | const ll LINF = 1001001001001001001ll;
| ^~
a.cc:4:7: error: 'db' does not name a type
4 | const db EPS = 1e-9;
| ^~
a.cc: In function 'int main()':
a.cc:13:3: error: 'array' was not declared in this scope
13 | array<array<int,110>, 110... |
s408737906 | p03944 | C++ | w, h, n = gets.chomp.split.map(&:to_i)
x_l = y_d = 0
x_r = w
y_u = h
while x, y, a = gets.chomp.split.map(&:to_i)
if a == 1
x_l = x
elsif a == 2
x_r = x
elsif a == 3
y_d = y
else
y_u = y
end
end
puts (x_r - x_r) * (y_u - y_d) | a.cc:1:1: error: 'w' does not name a type
1 | w, h, n = gets.chomp.split.map(&:to_i)
| ^
|
s871152945 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int w,h,n,x[200],y[200],a[200],t,b,r,l;
cin >> >> h >> n;
for(int i=0;i < n;i++){
cin >> x[i] >> y[i] >> a[i];
}
l=0;
b=0;
r=w;
t=h;
for(int i=0;i<n;i++){
switch(a[i]){
case 1:
if(l < x[i]) l = x[i];
break;
... | a.cc: In function 'int main()':
a.cc:6:11: error: expected primary-expression before '>>' token
6 | cin >> >> h >> n;
| ^~
|
s869563463 | p03944 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int x,y,a;
int w,h,n;
cin>>w>>h>>n;
int xmax=0;xmin=w,ymax=0,ymin=h;
for(int i=1;i<=n;++i){
cin>>x>>y>>a;
if(a==1)xmax=max(xmax,x);
else if(a==2)xmin=min(xmin,x);
else if(a==3)ymax=max(ymax,y);
else ym... | a.cc: In function 'int main()':
a.cc:9:20: error: 'xmin' was not declared in this scope
9 | int xmax=0;xmin=w,ymax=0,ymin=h;
| ^~~~
a.cc:9:27: error: 'ymax' was not declared in this scope; did you mean 'xmax'?
9 | int xmax=0;xmin=w,ymax=0,ymin=h;
| ... |
s235601628 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, N;
cin >> W >> H >> N;
int bigx, smallx, bigy, smally;
bigx = W, smallx = 0, bigy = H, smally = 0;
int x, y, a;
cin >> x >> y >> a;
for (int i = 0; i < N; i++) {
if (a == 1) {
smallx = max(smallx, x);
}
else if (a == 2... | a.cc:27:1: error: expected declaration before '}' token
27 | }
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.