submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s936665588 | p03943 | Java | package ARC063;
import java.util.*;
public class A {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
if(a+b==c||b+c==a||c+a==b){
System.out.println("Yes");
}else{
System.out.println("No");
}
sc.close();
}
}
| Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s819594303 | p03943 | C++ | #include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <uno... | a.cc: In function 'int main()':
a.cc:64:9: error: 'f' was not declared in this scope
64 | f = true;
| ^
a.cc:67:9: error: 'f' was not declared in this scope
67 | f = true;
| ^
a.cc:69:14: error: 'f' was not declared in this scope
69 | cout << (f ? "Yes" : "No") <... |
s645053465 | p03943 | C | #include <stdio.h>
int main()
{
int n[3], max, other;
int i;
scanf("%d%d%d", n+0, n+1, n+2);
other = n[0] + n[1] + [2];
max = n[0];
if ( max < n[1] ) max = n[1];
if ( max < n[2] ) max = n[2];
other -= max;
if ( max = other ) printf("Yes");
else printf("No");
return 0;
} | main.c: In function 'main':
main.c:8:25: error: expected expression before '[' token
8 | other = n[0] + n[1] + [2];
| ^
|
s120575414 | p03943 | 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... | a.cc: In function 'size_t left(size_t, bool)':
a.cc:99:24: error: no matching function for call to 'right(size_t&)'
99 | return swap ? right(current) : 2*current+1;
| ~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/iomanip:42,
from a.cc:9:
/usr/include/c++/14/bit... |
s057379186 | p03943 | 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++) {
| ^
|
s310774593 | p03943 | C++ | import Control.Applicative ((<$>))
distri :: Int -> Int -> int -> String
distri a b c = if (a + b + c) `mod` 2 == 0 then "Yes" else "No"
main :: IO()
main = do
[a, b, c] <- map read . words <$> getLine
putStrLn . show $ distri a b c | a.cc:3:31: error: stray '`' in program
3 | distri a b c = if (a + b + c) `mod` 2 == 0 then "Yes" else "No"
| ^
a.cc:3:35: error: stray '`' in program
3 | distri a b c = if (a + b + c) `mod` 2 == 0 then "Yes" else "No"
| ^
a.cc:1:1: erro... |
s101992201 | p03943 | C | #include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int a;
int b;
int c;
int sum1;
int dai;
// 個数のの入力
sum1 = 0;
scanf("%d %d %d",&a,&b,&c);
if(a > b) {
if (a > c) {
sum1 = b + c ;
dai = a;
... | main.c: In function 'main':
main.c:27:9: error: expected '}' before 'else'
27 | else {
| ^~~~
|
s553279536 | p03943 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication20
{
class Program
{
static void Main(string[] args)
{
var a = Console.ReadLine().Split().Select(int.Parse).ToArray();
if (a[0]... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
s256691758 | p03943 | C | #include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int a;
int b;
int c;
int sum1;
int dai;
// 個数のの入力
sum1 = 0;
scanf("%d %d %d",&a,&b,&c);
if(a > b) {
if (a > c) {
sum b + c ;
dai = a;
}
... | main.c: In function 'main':
main.c:20:13: error: unknown type name 'sum'
20 | sum b + c ;
| ^~~
main.c:20:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+' token
20 | sum b + c ;
| ^
main.c:24:13: error: unknown type name 'sum'... |
s802477977 | p03943 | C | #include <stdio.h>
int main (void){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if (a+b == c || b+c == a || c+a == b){
printf("Yes");
else
printf("No");
} | main.c: In function 'main':
main.c:9:4: error: expected '}' before 'else'
9 | else
| ^~~~
|
s627630906 | p03943 | C | #include <stdio.h>
#include <stdlib.h>
int main (int argc, char* argv[]) {
if (argc != 4) return 1;
int buf1, buf2, buf3;
buf1 = atoi(argv[1]) + atoi(argv[2]);
buf2 = atoi(argv[2]) + atoi(argv[3]);
buf3 = atoi(argv[1]) + atoi(argv[3]);
if (buf1 == atoi(argv[3]) | buf2 == atoi(argv[1]) | buf3 == atoi(a... | main.c:25:5: error: redefinition of 'main'
25 | int main (int argc, char* argv[]) {
| ^~~~
main.c:4:5: note: previous definition of 'main' with type 'int(int, char **)'
4 | int main (int argc, char* argv[]) {
| ^~~~
|
s781177051 | p03943 | C | #include <stdio.h>
int main (void){
int a,b,c;
scanf("%d %d %d,&a,&b,&c);
if (a+b == c || b+c == a || c+a == b){
printf("Yes");
else
printf("No");
} | main.c: In function 'main':
main.c:5:11: warning: missing terminating " character
5 | scanf("%d %d %d,&a,&b,&c);
| ^
main.c:5:11: error: missing terminating " character
5 | scanf("%d %d %d,&a,&b,&c);
| ^~~~~~~~~~~~~~~~~~~~
main.c:6:5: error: expected expression before 'if... |
s316941325 | p03943 | C | #include <stdio.h>
int main (void){
int a,b,c;
scanf("%d%d%d,&a,&b,&c)
if (a+b == c || b+c == a || c+a == b){
printf("Yes");
else
printf("No");
}
| main.c: In function 'main':
main.c:5:7: warning: missing terminating " character
5 | scanf("%d%d%d,&a,&b,&c)
| ^
main.c:5:7: error: missing terminating " character
5 | scanf("%d%d%d,&a,&b,&c)
| ^~~~~~~~~~~~~~~~~
main.c:6:1: error: expected expression before 'if'
6 | if (a+b == c || b... |
s436930453 | p03943 | C++ | #include <iostream>
#include <algorithm>
int main() {
int a, b, c;
std::cin >> a >> b >> c;
int m = std::max({a, b, c});
std::cout << (m == a + b + c - m ? "Yes" : "No") << std::endl;
} | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:3:1: error: '\U000000a0' does not name a type
3 |
| ^
|
s450861137 | p03943 | C | #include <stdio.h>
int main (void){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if((a + b ==c)||(b+c==a)||(c+a==b){
printf("yes\n");}
else{
printf("No\n");}
return 0;
}
| main.c: In function 'main':
main.c:6:37: error: expected ')' before '{' token
6 | if((a + b ==c)||(b+c==a)||(c+a==b){
| ~ ^
| )
main.c:12:1: error: expected expression before '}' token
12 | }
| ^
|
s503946378 | p03943 | C++ | int a, b, c;
cin >> a >> b >> c;
if(a+b==c || b+c==a || c+a==b){
cout << "YES";
}else{
cout << "NO";
}
| a.cc:2:5: error: 'cin' does not name a type
2 | cin >> a >> b >> c;
| ^~~
a.cc:3:5: error: expected unqualified-id before 'if'
3 | if(a+b==c || b+c==a || c+a==b){
| ^~
a.cc:5:6: error: expected unqualified-id before 'else'
5 | }else{
| ^~~~
|
s562464300 | p03943 | C | #include<stdio.h>
int main (void){
int a,b,c,d,e;
scanf("%d%d%d¥n",&a,&b,&c);
d = a/2 + b/2 + c/2 ;
e = [ a/2 +b/2 +c/2];
if (d == e){
printf("Yes");
elif{
printf("No");
}
return0;
} | main.c: In function 'main':
main.c:7:5: error: expected expression before '[' token
7 | e = [ a/2 +b/2 +c/2];
| ^
main.c:10:1: error: 'elif' undeclared (first use in this function)
10 | elif{
| ^~~~
main.c:10:1: note: each undeclared identifier is reported only once for each function it appears i... |
s378070213 | p03943 | Java | import java.util.Scanner;
public class MissionA {
public static void main(String[] args) {
//変数//
int a; //パックAの個数
int b; //パックBの個数
int c; //パックCの個数
boolean ans = false; //分けれるかどうか
Scanner scan = new Scanner(System.in);
//入力//
a = scan.nextInt();
b = scan.nextInt();
c = scan.nextInt()... | Main.java:3: error: class MissionA is public, should be declared in a file named MissionA.java
public class MissionA {
^
1 error
|
s206764359 | p03943 | Java | public class Main {
public static void main(String args[]) {
Scanner s = new Scanner(System.in);
String arr[] = s.nextLine().split(" ");
ArrayList<Integer> arrr = new ArrayList<Integer>();
for(String str : arr){
arrr.add(Integer.parseInt(str));
}
int a = Integer.parseInt(arr[0]);
int b = Integer.pars... | Main.java:3: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Arr... |
s788908958 | p03943 | C | #include<stdio.h>
int main (void){
int a,b,c,d,e;
scanf("%d%d%d",&a,&b,&c)
d =a/2 + b/2 + c/2 ;
e =[ a/2 +b/2 +c/2] ;
if (d == e){
printf("Yes");
elif{
printf("No");
}
} | main.c: In function 'main':
main.c:5:25: error: expected ';' before 'd'
5 | scanf("%d%d%d",&a,&b,&c)
| ^
| ;
6 | d =a/2 + b/2 + c/2 ;
| ~
main.c:7:4: error: expected expression before '[' token
7 | e =[ a/2 +b/2 +c/2] ... |
s111862222 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
// スペース区切りの整数の入力
int b = sc.nextInt();
int c = sc.nextInt();
// 文字列の入力
int max = a;
if(max < b){
max = b;
}
if(max < c){
max = c;
}
/... | Main.java:22: error: incompatible types: int cannot be converted to boolean
if(max = total - max){
^
1 error
|
s427802720 | p03943 | C | #include<stdio.h>
int main (void){
int a,b,c,d,e;
scanf("%d%d%d",&a,&b,&c);
d =a/2 + b/2 + c/2 ;
e =[ a/2 +b/2 +c/2];
if (d == e){
printf("Yes");
else{
printf("No");
}
return0;
} | main.c: In function 'main':
main.c:7:4: error: expected expression before '[' token
7 | e =[ a/2 +b/2 +c/2];
| ^
main.c:10:1: error: expected '}' before 'else'
10 | else{
| ^~~~
main.c:13:1: error: 'return0' undeclared (first use in this function)
13 | return0;
| ^~~~~~~
main.c:13:1: note... |
s585367815 | p03943 | C | #include <stdio.h>
#indlude <math.h>
int main (void){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a/2==0 && b/2==0 & c/2==0){
printf("yes\n");}
else{
printf("No\n");}
return 0;
}
| main.c:2:2: error: invalid preprocessing directive #indlude; did you mean #include?
2 | #indlude <math.h>
| ^~~~~~~
| include
|
s384166547 | p03943 | C | #include<stdio.h>
int main (void){
int a,b,c,d,e;
scanf("%d%d%d",&a,&b,&c)
d =a/2 + b/2 + c/2
e =[ a/2 +b/2 +c/2]
if (d == e){
printf("Yes")
else{
printf("No")
}
return0;
} | main.c: In function 'main':
main.c:5:25: error: expected ';' before 'd'
5 | scanf("%d%d%d",&a,&b,&c)
| ^
| ;
6 | d =a/2 + b/2 + c/2
| ~
main.c:14:1: error: expected declaration or statement at end of input
14 | }
... |
s241087832 | p03943 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
// スペース区切りの整数の入力
int b = sc.nextInt();
int c = sc.nextInt();
// 文字列の入力
int max = a;
if(max < b){
max = b;
}
if(max < c){
max = c
}
//... | Main.java:17: error: ';' expected
max = c
^
1 error
|
s615342284 | p03943 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Magatro
{
static int a, b, c;
static void Main()
{
Read();
if (c == a + b)
{
Console.WriteLine("Yes");
}
else
{
C... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
s696545859 | p03943 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int a, b, c, Max
int main() {
cin >> a >> b >> c;
Max = max(a, max(b, c));
if(a + b + c - Max == Max) {
cout << "YES\n";
}
else {
cout << "NO\n";
}
return 0;
}
| a.cc:8:1: error: expected initializer before 'int'
8 | int main() {
| ^~~
|
s208189088 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y,n;
cin >> x >> y >> n;
vector<vector<int>> data(n,vector<int>(3))
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
cin >> data[i][j];
}
}
set<int> a,b,c,d;
for(int i=0;i<n;i++){
if(data[i][2]==1) a.insert(data[i][0]);
if(data[i][2]==2... | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for(int i=0;i<n;i++){
| ^~~
a.cc:8:15: error: 'i' was not declared in this scope
8 | for(int i=0;i<n;i++){
| ^
|
s449253920 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y,n;
cin >> x >> y >> n;
vector<vector<int>> data(n,vector<int>(3))
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
cin >> data[i][j];
}
}
set<int> a,b,c,d;
for(int i=0;i<n;i++){
if(data[i][2]==1) a.insert(data[i][0]);
if(data[i][2]==2... | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for(int i=0;i<n;i++){
| ^~~
a.cc:8:15: error: 'i' was not declared in this scope
8 | for(int i=0;i<n;i++){
| ^
|
s006631257 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y,n;
cin >> x >> y >> n;
vector<vector<int>> data(n,vector<int>(3))
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
cin >> data[i][j];
}
}
set<int> a,b,c,d;
for(int i=0;i<n;i++){
if(data[i][2]==1) a.insert(data[i][0]);
if(data[i][2]==2... | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for(int i=0;i<n;i++){
| ^~~
a.cc:8:15: error: 'i' was not declared in this scope
8 | for(int i=0;i<n;i++){
| ^
|
s022620391 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y,n;
cin >> x >> y >> n;
vector<vector<int>> data(n,vector<int>(3))
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
cin >> data[i][j];
}
}
set<int> a,b,c,d;
for(int i=0;i<n;i++){
if(data[i][2]==1) a.insert(data[i][0]);
if(data[i][2]==2... | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for(int i=0;i<n;i++){
| ^~~
a.cc:8:15: error: 'i' was not declared in this scope
8 | for(int i=0;i<n;i++){
| ^
a.cc:27:37: error: expected ';' before 'cout'
27 | else S=x*y-(maxx-minx)*(max... |
s083557611 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
#include<cstdlib>
#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;
vector<vector<int>> black(4,vector<int>(0));
rep(i,n){
int x,y,a;
cin >> x >> y >> a;
a--;
if(a==0||a==1) black.at(a)... | a.cc: In function 'int main()':
a.cc:38:20: error: 'm_y' was not declared in this scope; did you mean 'min_y'?
38 | int whitey=max(0,m_y-max_y);
| ^~~
| min_y
|
s893774788 | p03944 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
using ll = long long;
const int INF = 1001001001;
const ll INF_LL = 1001001001001001001LL;
int main(void){
int w,h,n; cin >> w >> h >> n;
vector<int> x(n),y(n),a(n); rep(i,n) cin >> x[i] >> y[i] >> a[i];
vector<vector<bo... | a.cc: In function 'int main()':
a.cc:59:2: error: expected '}' at end of input
59 | }
| ^
a.cc:10:15: note: to match this '{'
10 | int main(void){
| ^
|
s358136052 | p03944 | C++ | #ifdef LOCAL
//#define _GLIBCXX_DEBUG
#endif
//#pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> Vec... | a.cc: In function 'int solve()':
a.cc:114:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
114 | return ;
| ^~~~~~
|
s971459685 | p03944 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const ll MOD = 1e9+7;
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int w, h, n;
cin >> w >> h >> n;
vector<pair<int, int>> xy(n);
int l... | a.cc: In function 'int main()':
a.cc:37:26: error: expected ';' before 'cout'
37 | if(ans > w*h) ans = w*h
| ^
| ;
38 |
39 | cout << ans << endl;
| ~~~~
|
s495011549 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w , n;
cin >> w >> h >> n;
vector < tuple <double,double,double >> A(n);
for (int i=0 ; i<n ; i++){
double a,b,c;
cin >> a >> b >> c;
A.at(i) = make_tuple(a,b,c) ;
}
int ld_x =0, ld_y = 0 , ru_x = w , ru_y = h;
for ( int i=0 ; i... | a.cc: In function 'int main()':
a.cc:18:17: error: no matching function for call to 'max(int&, double&)'
18 | ld_x = max(ld_x , a) ;
| ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s030137000 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w , n;
cin >> w >> h >> n;
vector < tuple double,double,double >> A(n);
for (int i=0 ; i<n ; i++){
double a,b,c;
cin >> a >> b >> c;
A.at(i) = make_tuple(a,b,c) ;
}
int ld_x =0, ld_y = 0 , ru_x = w , ru_y = h;
for ( int i=0 ; i<... | a.cc: In function 'int main()':
a.cc:7:39: error: template argument 1 is invalid
7 | vector < tuple double,double,double >> A(n);
| ^~
a.cc:7:39: error: template argument 2 is invalid
a.cc:11:7: error: request for member 'at' in 'A', which is of non-class type 'int'
... |
s841302712 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w , n;
cin >> w >> h >> n;
vector < tuple double,double,int>> A(n);
for (int i=0 ; i<n ; i++){
double a,b,c;
cin >> a >> b >> c;
A.at(i) = make_tuple(a,b,c) ;
}
int ld_x =0, ld_y = 0 , ru_x = w , ru_y = h;
for ( int i=0 ; i<n; i... | a.cc: In function 'int main()':
a.cc:7:35: error: template argument 1 is invalid
7 | vector < tuple double,double,int>> A(n);
| ^~
a.cc:7:35: error: template argument 2 is invalid
a.cc:11:7: error: request for member 'at' in 'A', which is of non-class type 'int'
11 | ... |
s157718061 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w , n;
cin >> h >> w >> n;
vector < tuple <int,int,int>> a(n);
for (int i=0 ; i<n ; i++){
int a,b,c;
cin >> a >> b >> c;
a.at(i) = make_tuple(a,b,c) ;
}
int ld_x =0, ld_y = h , ru_x = w , ru_y = h;
for ( int i=0 ; i<n; i++){
... | a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'at' in 'a', which is of non-class type 'int'
11 | a.at(i) = make_tuple(a,b,c) ;
| ^~
a.cc:16:20: error: request for member 'at' in 'a', which is of non-class type 'int'
16 | tie(a,b,c) = a.at(i) ;
| ... |
s103361670 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w , n;
cin >> h >> w >> n;
vector < tuple <int,int,int>> a(n);
for (int i=0 ; i<n ; i++){
int a,b,c;
cin >> a >> b >> c;
a.at(i) = make_tuple(a,b,c) ;
}
int ld_x =0, ld_y = h , ru_x = w , ru_y = h;
for ( int i=0 ; i<n; i++){
... | a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'at' in 'a', which is of non-class type 'int'
11 | a.at(i) = make_tuple(a,b,c) ;
| ^~
a.cc:16:20: error: request for member 'at' in 'a', which is of non-class type 'int'
16 | tie(a,b,c) = a.at(i)
| ^~... |
s550830118 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w , n;
cin >> h >> w >> n;
vector < tuple <int,int,int>> a(n);
for (int i=0 ; i<n ; i++){
int a,b,c;
cin >> a >> b >> c;
a.at(i) = make_tuple(a,b,c) ;
}
int ld_x =0, ld_y = h , ru_x = w , ru_y = h;
for ( int i=0 ; i<n; i++){
... | a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'at' in 'a', which is of non-class type 'int'
11 | a.at(i) = make_tuple(a,b,c) ;
| ^~
a.cc:15:14: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<... |
s528441262 | p03944 | C++ | 10 10 5
1 6 1
4 1 3
6 9 4
9 4 2
3 1 3a#include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, n;
cin >> w >> h >> n;
vector<vector<int>> a(n, vector<int>(3));
for (int i = 0; i < n; i++) {
for (int j = 0; j < 3; j++) {
cin >> a.at(i).at(j);
}
}
//残っている白い領域の左下の座標をbに 右上の座標をc... | a.cc:6:7: error: stray '#' in program
6 | 3 1 3a#include <bits/stdc++.h>
| ^
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10 10 5
| ^~
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
11 | cin >> w >> h >> n;
| ^~~
a.cc... |
s109726039 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int w, h, n;
cin >> w >> h >> n;
vector<vector<int>> a(n, vector<int>(3));
for (int i = 0; i < n; i++) {
for (int j = 0; j < 3; j++) {
cin >> a.at(i).at(j);
}
}
//残っている白い領域の左下の座標をbに 右上の座標をcに代入
vector<int> b = {0,0}, c = {w,h}... | a.cc: In function 'int main()':
a.cc:36:46: error: expected ';' before '}' token
36 | cout << (c.at(0)-b.at(0))*(c.at(1)-b.at(1))
| ^
| ;
37 | }
| ~
|
s702541486 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W ,H , N;
cin >> W >> H >> N;
vector <tuple <int , int , int >> A(N);
for ( int i=0 ; i<N ; i++){
int a,b,c;
cin >> a >> b >> c;
A.at(i)=make_tuple(c,a,b);
}
sort(A.begin() , A.end());
int x_max ,x_min , y_max , y_min;
for ( int... | a.cc: In function 'int main()':
a.cc:19:13: error: 'mmax' was not declared in this scope; did you mean 'fmax'?
19 | x_min=mmax(x_min,a);
| ^~~~
| fmax
|
s171064087 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W ,H , N;
cin >> W >> H >> N;
vector <tuple <int , int , int >> A(N);
for ( int i=0 ; i<N ; i++){
int a,b,c;
cin >> a >> b >> c;
A.at(i)=make_tuple(c,a,b);
}
sort(A.begin() , A.end());
int x_max ,x_min , y_max , y_min;
for ( int... | a.cc: In function 'int main()':
a.cc:17:25: error: expected ';' before 'if'
17 | tie(c,a,b) = A.at(i)
| ^
| ;
18 | if ( c == 1){
| ~~
|
s066351409 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W ,H , N;
cin >> W >> H >> N;
vector <tuple <int , int , int >> A(N);
for ( int i=0 ; i<N ; i++){
int a,b,c;
cin >> a >> b >> c;
A.at(i)=make_tuple(c,a,b);
}
sort(A.begin() , A.end());
int x_max ,x_min , y_max , y_min;
for ( int... | a.cc: In function 'int main()':
a.cc:16:11: error: no match for call to '(std::vector<std::tuple<int, int, int> >) (int&)'
16 | if ( A(i).first == 1){
| ~^~~
a.cc:17:24: error: no match for call to '(std::vector<std::tuple<int, int, int> >) (int&)'
17 | x_max=max(x_max,A(i).second);
... |
s063480549 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W ,H , N;
cin >> W >> H >> N;
vector <tuple <int , int , int >> A(N);
for ( int i=0 ; i<N ; i++){
int a,b,c;
cin >> a >> b >> c;
A(i)=tuple(c,a,b);
}
sort(A.begin() , A.end());
int x_max ,x_min , y_max , y_min;
for ( int i=0 ; i... | a.cc: In function 'int main()':
a.cc:11:6: error: no match for call to '(std::vector<std::tuple<int, int, int> >) (int&)'
11 | A(i)=tuple(c,a,b);
| ~^~~
a.cc:16:11: error: no match for call to '(std::vector<std::tuple<int, int, int> >) (int&)'
16 | if ( A(i).first == 1){
| ~^~~
a.... |
s766229006 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W ,H , N;
cin >> W >> H >> N;
vector <tuple <int , int , int >> a(N);
for ( int i=0 ; i<N ; i++){
int a,b,c;
cin >> a >> b >> c;
a(i)=tuple(c,a,b);
}
sort(a.begin() , a.end());
int x_max ,x_min , y_max , y_min;
for ( int i=0 ; i... | a.cc: In function 'int main()':
a.cc:11:6: error: 'a' cannot be used as a function
11 | a(i)=tuple(c,a,b);
| ~^~~
a.cc:16:11: error: no match for call to '(std::vector<std::tuple<int, int, int> >) (int&)'
16 | if ( a(i).first == 1){
| ~^~~
a.cc:17:24: error: no match for call to '... |
s883530316 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W ,H , N;
cin >> W >> H >> N;
vector <tuple <int , int , int >> a;
for ( int i=0 ; i<N ; i++){
int a,b,c;
cin >> a >> b >> c;
a.push_back(make_tuple(c,a,b));
}
sort(a.begin() , a.end());
int x_max ,x_min , y_max , y_min;
for ( i... | a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'push_back' in 'a', which is of non-class type 'int'
11 | a.push_back(make_tuple(c,a,b));
| ^~~~~~~~~
a.cc:16:11: error: no match for call to '(std::vector<std::tuple<int, int, int> >) (int&)'
16 | if ( a(i).first == 1){
... |
s012466111 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W ,H , N;
cin >> W >> H >> N;
vector <tuple <int , int , int >> a(N);
for ( int i=0 ; i<N ; i++){
int a,b,c;
cin >> a >> b >> c;
a.at(i) = make_tuple(c,a,b);
}
sort(a.begin() , a.end());
int x_max ,x_min , y_max , y_min;
for ( i... | a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'at' in 'a', which is of non-class type 'int'
11 | a.at(i) = make_tuple(c,a,b);
| ^~
a.cc:16:11: error: no match for call to '(std::vector<std::tuple<int, int, int> >) (int&)'
16 | if ( a(i).first == 1){
| ~^~~... |
s892034661 | p03944 | Java | import java.util.Scanner;
public class TaskB {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int w = in.nextInt();
int h = in.nextInt();
int x0 = 0, y0 = 0;
int n = in.nextInt();
for (int i = 0; i < n; i++) {
int x1 = in.ne... | Main.java:3: error: class TaskB is public, should be declared in a file named TaskB.java
public class TaskB {
^
1 error
|
s649599532 | p03944 | C++ | #include <bits/stdc++.h>
#define rep(i , n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9;
using namespace std;
using ll = long long;
#include <bits/stdc++.h>
int main() {
int W , H , N;
cin >> W >> H >> N;
int l = 0 , r = W , u = H , d = 0;
rep(i , n){
int x , y , a;
cin >> x >> y ... | a.cc: In function 'int main()':
a.cc:11:13: error: 'n' was not declared in this scope
11 | rep(i , n){
| ^
a.cc:2:46: note: in definition of macro 'rep'
2 | #define rep(i , n) for (int i = 0; i < (int)(n); i++)
| ^
|
s034602814 | p03944 | C++ | #include<iostream>
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];
if (a == 1){
W -= x[i];
} else if (a == 2){
} else if (a == 3){
} else if (a == 4){
H -= y... | a.cc: In function 'int main()':
a.cc:12:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | if (a == 1){
| ~~^~~~
a.cc:14:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
14 | } else if (a == 2){
| ~~^~~~
... |
s175568634 | p03944 | C++ | 10 10 5
1 6 1
4 1 3
6 9 4
9 4 2
3 1 3 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10 10 5
| ^~
|
s117177603 | p03944 | C | int main(void){
int W,H,N,i,j,k,x[100],y[100],a[100];
int size=0;
scanf("%d %d %d",&W,&H,&N);
int mat[W][H];
for(i=0;i<=N;i++){
scanf("%d %d %d",&x[i],&y[i],&a[i]);
}
for(i=0;i<W;i++){
for(j=0;j<H;j++){
mat[i][j]=0;//white
}
}
for(i=0;i<N;i++){
if(a[i]==1){
for(j=0;j<... | main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%d %d %d",&W,&H,&N);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(void){
main.c:5:3: warning... |
s707903753 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
int w, h, n;
cin >> w >> h >> n;
vector<pair<int, int>> xy(n);
for (int i = 0; i < n; i++)
{
int t1, t2, t3;
cin >> t1 >> t2 >> t3;
if (t3 > 2)
xy[i] = make_pair(t2, t3);
els... | a.cc: In function 'int main()':
a.cc:37:38: error: expected ';' before ')' token
37 | cout << (uw - lw) * (uh - lh)) << endl;
| ^
| ;
|
s320996581 | p03944 | C++ | #include <bits/stdc++.h>
#include <string.h>
//s#define rep(i, n) for (int i = 0; i < (n); i++)
#define MAX 10000
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define rep(i,a,n) for(int i=a; i<n; i++)
#define r0 return 0
#define INF (int)1e15... | a.cc: In function 'int main()':
a.cc:29:19: error: no matching function for call to 'max(int&, long long int&)'
29 | left = max(x,left);
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s285163679 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int w, h, n; cin >> w >> h >> n;
int w_right = w;
int w_left = 0;
int h_upper = h;
int h_lower = 0;
for (int i = 0; i < n; i++) {
int x, y, a; cin >> x >> y >> a;
if (a == 1) w_left = max(w_left, x);
if (a == 2) w_right = mi... | a.cc: In function 'int main()':
a.cc:19:44: error: 'maz' was not declared in this scope
19 | cout << max(0, w_right - w_left) * maz(0, h_upper - h_lower) << endl;
| ^~~
|
s330234304 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, N;
cin >> W >> H >> N;
vector<vector<bool>>data(H,vector<bool>(W,true));
for(int i=0;i<N;i++){
int x, y, a;
cin >> x >> y >> a;
if(a==1){
for(int j=0;j<H;j++){
for(int k=0;k<x;k++){
data.at(j).at(k)=false;
... | a.cc: In function 'int main()':
a.cc:43:28: error: 'cuont' was not declared in this scope; did you mean 'count'?
43 | if(data.at(i).at(j)) cuont++;
| ^~~~~
| count
|
s420867168 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int W, H, N;
cin >> W >> H >> N;
vector<vector<int>> color(H, vector<int>(W,0));
int x, y, a;
int area=0;
for(int i=0; i<N; i++){
cin >> x >> y >> a;
if(a==1){
for(int j=0; j<x; j++){
for(int k=0; k<H; k++){
color.a... | a.cc: In function 'int main()':
a.cc:37:15: error: 'error' was not declared in this scope; did you mean 'perror'?
37 | cout << error <<endl;
| ^~~~~
| perror
|
s882744499 | p03944 | C++ | #include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
us... | a.cc: In function 'int main()':
a.cc:26:13: error: expected ':' before ';' token
26 | case 1;
| ^
| :
|
s292091009 | p03944 | C++ | #include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
us... | a.cc: In function 'int main()':
a.cc:23:7: error: 'i' was not declared in this scope
23 | dep(i,n){
| ^
a.cc:23:3: error: 'dep' was not declared in this scope; did you mean 'rep'?
23 | dep(i,n){
| ^~~
| rep
|
s401910696 | p03944 | C++ | #include<iostream>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
int left = 0;
int right = W;
int bottom = 0;
int top = H;
for(int i=0; i<N; i++){
int x, y, a;
cin >> x >> y >> a;
switch(a){
case 1:
left = max(left, x);
case 2:
right = min(righ... | a.cc: In function 'int main()':
a.cc:31:2: error: expected '}' at end of input
31 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s605435601 | p03944 | C++ | #include<iostream>
int main(){
int W, H, N;
cin >> W >> H >> N;
int left = 0;
int right = W;
int bottom = 0;
int top = H;
for(int i=0; i<N; i++){
int x, y, a;
cin >> x >> y >> a;
switch(a){
case 1:
left = max(left, x);
case 2:
right = min(right, x);
case 3:
... | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> W >> H >> 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; ///< Lin... |
s366573637 | p03944 | C++ | #include <bits/stdc++.h>
#include <math.h>
#define rep(i,n) for (int i=0;i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
int main() {
int w,h,n;
cin >> w >> h >>n;
vector<vector<int>> mp(h,vector<int>(w,0));
rep(i,n){
int x,y,a;
cin >> x >>... | a.cc: In function 'int main()':
a.cc:47:13: error: 'as' was not declared in this scope; did you mean 'ans'?
47 | cout << as << endl
| ^~
| ans
|
s816168187 | p03944 | C++ | #include <bits/stdc++.h>
#include <math.h>
#define rep(i,n) for (int i=0;i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
int main() {
int w,h,n;
cin >> w >> h >>n;
vector<vector<int>> mp(h,vector<int>(x,0));
rep(i,n){
int x,y,a;
cin >> x >>... | a.cc: In function 'int main()':
a.cc:11:42: error: 'x' was not declared in this scope
11 | vector<vector<int>> mp(h,vector<int>(x,0));
| ^
a.cc:22:28: error: expected ';' before '<' token
22 | for(int j = x,j<w-1;j++){
| ... |
s493928804 | p03944 | C++ |
#include <bits/stdc++.h>
#include <ext/rope>
#define VALHALLA cin.tie(0);ios_base::sync_with_stdio(false);cout<<fixed<<setprecision(13);cerr<<fixed<<setprecision(5);
#define endl "\n"
#define pb push_back
#define all(v) v.begin(),v.end()
#define debug(x) std::cerr << #x << ": " << (x) << '\n';
#define sz(x) (int)x.siz... | a.cc:19:31: error: ISO C++ forbids declaration of 'Max' with no type [-fpermissive]
19 | template <typename T> inline Max(T a, T b) { return (a<b ? b:a);}
| ^~~
a.cc:20:31: error: ISO C++ forbids declaration of 'Min' with no type [-fpermissive]
20 | template <typename T> inlin... |
s271838495 | p03944 | C++ |
#include <bits/stdc++.h>
#include <ext/rope>
#define VALHALLA cin.tie(0);ios_base::sync_with_stdio(false);cout<<fixed<<setprecision(13);cerr<<fixed<<setprecision(5);
#define endl "\n"
#define pb push_back
#define all(v) v.begin(),v.end()
#define debug(x) std::cerr << #x << ": " << (x) << '\n';
#define sz(x) (int)x.siz... | a.cc:22:31: error: ISO C++ forbids declaration of 'Max' with no type [-fpermissive]
22 | template <typename T> inline Max(T a, T b) { return (a<b ? b:a);}
| ^~~
a.cc:23:31: error: ISO C++ forbids declaration of 'Min' with no type [-fpermissive]
23 | template <typename T> inlin... |
s357197939 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
using tiii = tuple<int,int,int>;
int main(){
int W, H ,N;
cin >> W >> H >> N;
tiii T;
vector<tiii>A(110);
for(int i =0; i <N; i++){
cin >> get<0>(A[i]) >> get<1>(A[i]) >> get<2>(A[i]);
}
//tuple<x座標,y座標,a>
int colored_H ,colored_W= 0; //塗り潰されたHとW
i... | a.cc:32:6: error: extended character is not valid in an identifier
32 | //この一行を入れるとなぜか正しく動作する
| ^
a.cc: In function 'int main()':
a.cc:32:6: error: '\U00003000' was not declared in this scope
32 | //この一行を入れるとなぜか正しく動作する
| ^~
|
s390032362 | 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();
// 要素数Nの配列x,yと整数aの定義
int[] x = int[](N);
int[] y = int[](N);
int a;
// 白い部分の4隅の座標を定義
... | Main.java:10: error: '.class' expected
int[] x = int[](N);
^
Main.java:10: error: not a statement
int[] x = int[](N);
^
Main.java:10: error: ';' expected
int[] x = int[](N);
^
Main.java:11: error: '.class' expected
int[] y = int[](N);
... |
s022824438 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
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 x0 = W;
int y0 = H;
int x1 = 0;
int y1 = 0;
for(int i = 0; i < N; i++) {
if(a[i] ... | a.cc: In function 'int main()':
a.cc:28:33: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
28 | if(x0 <= x1 || y0 <= y1) cout >> 0;
| ~~~~ ^~ ~
| | |
| ... |
s974372428 | p03944 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main(){
double w,h,n,a,b,c;
cin>>w>>h>>n;
double xl,xr,yu,yd;
xl=0;
xr=w;
yu=h;
yd=0;
for(int i=0;i<n;i++){
cin>>a>>b>>c;
if(c==1 and xl<a){
xl=a;
}
else if(c==2 and xr>a){
xr=a;
}
else if(c==3 and yb<b)... | a.cc: In function 'int main()':
a.cc:22:22: error: 'yb' was not declared in this scope; did you mean 'yd'?
22 | else if(c==3 and yb<b){
| ^~
| yd
|
s927186618 | p03944 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main(){
double w,h,n,a,b,c;
cin>>w>>h>>n;
double xl,xr,yu,yd;
xl=0;
xr=w;
yu=h;
yd=0;
for(int i=0;i<n;i++){
cin>>a>>b>>c;
if(c==1){
xl=a;
}
else if(c==2){
xr=a;
}
else if(c==3){
yd=b;
}
els... | a.cc:34:3: error: expected unqualified-id before 'if'
34 | if((xr-xl)>0 and (yu-yd)>0){
| ^~
a.cc:39:1: error: expected declaration before '}' token
39 | }
| ^
|
s428199207 | p03944 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main(){
int w,h,n,a,b,c;
cin>>w>>h>>n;
int xl,xr,yu,yd;
xl=0;
xr=w;
yu=h;
yd=0;
for(int i=0;i<n;i++){
cin>>a>>b>>c;
if(c==1){
xl=a;
}
else if(c==2){
xr=a;
}
else if(c==3){
yd=b;
}
else if(c... | a.cc: In function 'int main()':
a.cc:26:10: error: 'd' was not declared in this scope
26 | yu=d;
| ^
|
s007919144 | p03944 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main(){
int w,h,n,a,b,c;
cin>>w>>h>>n;
int xl,xr,yu,yd;
xl=0;
xr=w;
yu=h;
yd=0;
for(int i=0;i<n;i++){
cin>>a>>b>>c;
if(c==1){
xl=a;
}
else if(c==2){
xr=a;
}
else if(c==3){
yd=b;
}
else if(c... | a.cc: In function 'int main()':
a.cc:26:10: error: 'd' was not declared in this scope
26 | yu=d;
| ^
|
s819482938 | p03944 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main(){
int w,h,n,a,b,c;
cin>>w>>h>>n;
int xl,xr,yu,yd;
xl=0;
xr=w;
yu=h;
yd=0;
for(int i=0;i<n;i++){
cin>>a>>b>>c;
if(c==1){
xl=a;
}
else if(c==2){
xr=a;
}
else if(c==3){
yd=b;
}
else if(c... | a.cc: In function 'int main()':
a.cc:26:10: error: 'd' was not declared in this scope
26 | yu=d;
| ^
a.cc:29:18: error: 'yu0yd' was not declared in this scope
29 | cout<<(xr-xl)*(yu0yd);
| ^~~~~
|
s654181087 | p03944 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
void ABC40(void);
void ABC41(void);
void ABC42(void);
void ABC43(void);
void ABC44(void);
void ABC45(void);
void ABC46(void);
void ABC47(void);
void ABC48(void);
void ABC49(void);
int main(void){
ABC47();
}
void ABC47(){
int minx=0,maxx,miny=0,ma... | a.cc: In function 'void ABC47()':
a.cc:29:39: error: 's' was not declared in this scope
29 | if((maxx-minx)>=0&&(maxy-miny)>=0)s=(maxx-minx)*(maxy-miny);
| ^
a.cc:30:8: error: 's' was not declared in this scope
30 | if(s>=0)cout<<s<<endl;
| ^
|
s074944492 | p03944 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
void ABC40(void);
void ABC41(void);
void ABC42(void);
void ABC43(void);
void ABC44(void);
void ABC45(void);
void ABC46(void);
void ABC47(void);
void ABC48(void);
void ABC49(void);
int main(void){
ABC47();
}
void ABC47(){
int minx=0,maxx,miny=0,ma... | a.cc: In function 'void ABC47()':
a.cc:29:33: error: 's' was not declared in this scope
29 | if((maxx-minx)&&(maxy-miny))s=(maxx-minx)*(maxy-miny);
| ^
a.cc:30:8: error: 's' was not declared in this scope
30 | if(s>=0)cout<<s<<endl;
| ^
|
s907651508 | p03944 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
void ABC40(void);
void ABC41(void);
void ABC42(void);
void ABC43(void);
void ABC44(void);
void ABC45(void);
void ABC46(void);
void ABC47(void);
void ABC48(void);
void ABC49(void);
int main(void){
ABC47();
}
void ABC47(){
int minx=0,maxx,miny=0,ma... | a.cc: In function 'void ABC47()':
a.cc:26:13: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>='
26 | if(x>=max||y>=min)continue;
| ~^~~~~
a.cc:26:21: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to ... |
s120871331 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int xmax, ymax, n;
cin >> xmax >> ymax >> n;
vector<int> x(n);
vector<int> y(n);
vector<int> a(n);
int xmin = 0;
int ymin = 0;
for (int i = 0; i < n; i++) {
cin >> x.at(i) >> y.at(i) >> a.at(i);
if (a.at(i) == 1) {
xmin = max(x... | a.cc: In function 'int main()':
a.cc:34:33: error: 'yymax' was not declared in this scope; did you mean 'ymax'?
34 | s = max(0,(xmax-xmin))*max(0,(yymax-ymin));
| ^~~~~
| ymax
|
s650885409 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int xmax, ymax, n;
cin >> xmax >> ymax >> n;
vector<int> x(n);
vector<int> y(n);
vector<int> a(n);
int xmin = 0;
int ymin = 0;
for (int i = 0; i < n; i++) {
cin >> x.at(i) >> y.at(i) >> a.at(i);
if (a.at(i) == 1) {
xmin = max(x... | a.cc: In function 'int main()':
a.cc:34:36: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
34 | s = max(0,(xmax-xmin))*max(0,(max-ymin));
| ~~~^~~~~
|
s600228399 | p03944 | C++ | #include <iostream> #include <algorithm> using namespace std; const int maxn = 100 + 10; int main() { int w, h, n; cin >> w >> h >> n; int wl = 0, wr = w, hd = 0, hu = h; while (n--) { int x, y, a; cin >> x >> y >> a; switch (a) { case 1: wl = x; ... | a.cc:1:21: warning: extra tokens at end of #include directive
1 | #include <iostream> #include <algorithm> using namespace std; const int maxn = 100 + 10; int main() { int w, h, n; cin >> w >> h >> n; int wl = 0, wr = w, hd = 0, hu = h; while (n--) { int x, y, a; cin >> x >> y >... |
s906645966 | p03944 | C++ | #include<iostream>
using namespace std;
int max(int a,int b)
{
if(a>b)
return a;
else
return b;
}
int min(int a,int b)
{
if(a<b)
return a;
else
return b;
}
int main()
{
int w,h,n,s,i,x[105],y[105],a[105];
cin>>w>>h>>n;
int x1=0,x2=w,y1=0,y2=h;
for(i=0;i<n;i++)
{
cin>>x[i]>>y[i]>>a[i];
if(a==1)
x... | a.cc: In function 'int main()':
a.cc:25:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
25 | if(a==1)
| ~^~~
a.cc:27:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
27 | if(a==2)
| ... |
s151829892 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> v(3*N);
for(int i = 0; i < 3*N; i++){
cin >> v[i];
}
for(int i = 0; i < N; i++){
if(v[3i+2] == 1){
left.push(v[3i]);
}
else if(v.at(3i + 2) == 2){
right.push(v[3i]);
... | a.cc: In function 'int main()':
a.cc:15:12: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
15 | if(v[3i+2] == 1){
| ~~^~
| | |
| | int
| std::complex<double>
In file included from /usr/include/c++/14/bits/stl_algo... |
s723212011 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
for(int i = 0; i < N; i++){
if(vec[3i+2] == 1){
left.push(vec[3i]);
}
else if(vec.at(3i + 2) == 2){
right.push(ve... | a.cc: In function 'int main()':
a.cc:15:14: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
15 | if(vec[3i+2] == 1){
| ~~^~
| | |
| | int
| std::complex<double>
In file included from /usr/include/c++/14/bit... |
s601786858 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
vector<int> left(0);//1
vector<int> right(0);//2
vector<int> down(0);//3
vector<int> up(0);//4
for(int i = 0; i < N; i++){
if(... | a.cc: In function 'int main()':
a.cc:18:18: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
18 | if(vec.at(3i + 2) == 1){
| ~~ ^ ~
| | |
| | int
| std::complex<double>
In file included from ... |
s375374004 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
vector<int> left(0);//1
vector<int> right(0);//2
vector<int> down(0);//3
vector<int> up(0);//4
for(int i = 0; i < N; i++){
if(... | a.cc: In function 'int main()':
a.cc:18:18: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
18 | if(vec.at(3i + 2) == 1){
| ~~ ^ ~
| | |
| | int
| std::complex<double>
In file included from ... |
s851045504 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
vector<int> left(0);//1
vector<int> right(0);//2
vector<int> down(0);//3
vector<int> up(0);//4
int U = H;
int D = 0;
int L = ... | a.cc: In function 'int main()':
a.cc:22:18: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
22 | if(vec.at(3i + 2) == 1){
| ~~ ^ ~
| | |
| | int
| std::complex<double>
In file included from ... |
s982588432 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
vector<int> left(0);//1
vector<int> right(0);//2
vector<int> down(0);//3
vector<int> up(0);//4
int U = H;
int D = 0;
int L = ... | a.cc: In function 'int main()':
a.cc:22:15: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
22 | if(vec[3i + 2] == 1){
| ~~ ^ ~
| | |
| | int
| std::complex<double>
In file included from /usr/include/c+... |
s762140621 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
vector<int> left(0);//1
vector<int> right(0);//2
vector<int> down(0);//3
vector<int> up(0);//4
int U = H;
int D = 0;
int L = ... | a.cc: In function 'int main()':
a.cc:22:15: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
22 | if(vec[3i + 2] == 1){
| ~~ ^ ~
| | |
| | int
| std::complex<double>
In file included from /usr/include/c+... |
s603467131 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
vector<int> left(0);//1
vector<int> right(0);//2
vector<int> down(0);//3
vector<int> up(0);//4
int U = H;
int D = 0;
int L = ... | a.cc: In function 'int main()':
a.cc:22:15: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
22 | if(vec[3i + 2] == '1'){
| ~~ ^ ~
| | |
| | int
| std::complex<double>
In file included from /usr/include/... |
s997329370 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
vector<int> left(0);//1
vector<int> right(0);//2
vector<int> down(0);//3
vector<int> up(0);//4
int U = H;
int D = 0;
int L = ... | a.cc: In function 'int main()':
a.cc:22:15: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
22 | if(vec[3i + 2] == 1){
| ~~ ^ ~
| | |
| | int
| std::complex<double>
In file included from /usr/include/c+... |
s544759002 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
vector<int> left(0);//1
vector<int> right(0);//2
vector<int> down(0);//3
vector<int> up(0);//4
int U = H;
int D = 0;
int L = ... | a.cc: In function 'int main()':
a.cc:22:15: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
22 | if(vec[3i + 2] == '1'){
| ~~ ^ ~
| | |
| | int
| std::complex<double>
In file included from /usr/include/... |
s520580411 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
vector<int> left(0);//1
vector<int> right(0);//2
vector<int> down(0);//3
vector<int> up(0);//4
int U = H;
int D = 0;
int L = ... | a.cc: In function 'int main()':
a.cc:22:15: error: no match for 'operator+' (operand types are 'std::complex<double>' and 'int')
22 | if(vec[3i + 2]) == '1'){
| ~~ ^ ~
| | |
| | int
| std::complex<double>
In file included from /usr/include... |
s518953120 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W, H, N;
cin >> W >> H >> N;
vector<int> vec(3*N);
for(int i = 0; i < 3*N; i++){
cin >> vec[i];
}
priority_queue<int> left(0);//1
priority_queue<int> right(0);//2
priority_queue<int> down(0);//3
priority_queue<int> up(0);//4
in... | a.cc: In function 'int main()':
a.cc:12:29: error: no matching function for call to 'std::priority_queue<int>::priority_queue(int)'
12 | priority_queue<int> left(0);//1
| ^
In file included from /usr/include/c++/14/queue:66,
from /usr/include/x86_64-linux-gnu/c++/... |
s218135337 | p03944 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int w,h,n;
cin>>w>>h>>n;
int X1=0,X2=w,Y1=0,Y2=h;
for(int i=0;i<n;i++)
{
int x,y,a;
cin>>x>>y>>a;
if(a==1)
{
X1=max(X1,x);
}
else if(a==2)
{
X2=min(X2,x);
}
else if(a==3)
{
Y1=max(Y1,y);
}... | a.cc: In function 'int main()':
a.cc:31:20: error: no matching function for call to 'max(int)'
31 | long long ans=max(X2-X1)*(Y2-Y1);
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s102913545 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int W,H,N;
cin>>W>>H>>N;
int maxX=0;
int minX=W;
int maxY=0;
int minY=H;
for(int i=0;i<N;i++){
int x,y,a;
cin>>x>>y>>a;
if(a==1){
if(maxX<x)
maxX=x;
}
if(a==2){
if(x<minX)
minX=x;
}
if(a==3){
... | a.cc: In function 'int main()':
a.cc:30:13: error: 'MaxX' was not declared in this scope; did you mean 'maxX'?
30 | }if(minX<=MaxX || minY<=maxY)
| ^~~~
| maxX
|
s686395011 | p03944 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int w, h, n, bxr=0, bxl=0, byu=0, byl=0, ans = 0;
cin >> w >> h >> n ;
vector<int> vecx(n), vecy(n), op(n);
for(int i=0; i<n; i++){
cin >> vecx(n) >> vecy(n) >> op(n);
}
bxl = w;
byu = h;
ans = w*h;
for(int i=0;i<n;i++){
if(op[i] == 1 ... | a.cc: In function 'int main()':
a.cc:9:16: error: no match for call to '(std::vector<int>) (int&)'
9 | cin >> vecx(n) >> vecy(n) >> op(n);
| ~~~~^~~
a.cc:9:27: error: no match for call to '(std::vector<int>) (int&)'
9 | cin >> vecx(n) >> vecy(n) >> op(n);
| ~... |
s702789783 | p03944 | C | #include<stdio.h>
int main(){
int W,H,N = 0;
scanf("%d %d %d",&W,&H,&N);
int genten[2] = {0,0};
int kado[2] = {W,H};
int S = 0;
int WW[N],HH[N],NN[N];
for(int i=0; i<N; i++){
scanf("%d %d %d",&WW[i],&HH[i],&NN[i]);
}
for(int j=0; j<N; j++){
if(NN[j]==1){
if(genten[0] < WW[j]){
genten [0] = WW[j]... | main.c: In function 'main':
main.c:42:23: error: expected ';' before 'return'
42 | printf("%d",S)
| ^
| ;
43 |
44 | return 0;
| ~~~~~~
|
s990487971 | p03944 | C | #include<stdio.h>
int main(){
int W,H,N = 0;
scanf("%d %d %d",&W,&H,&N);
int genten[2] = {0,0};
int kado[2] = {W,H};
int S = 0;
int WW[N],HH[N],NN[N];
for(int i=0; i<N; i++){
scanf("%d %d %d",&WW[i],&HH[i],&NN[i]);
}
for(int j=0; j<N; j++){
if(NN[j]==1){
if(genten[0] < WW[j]){
genten [0] = WW[j]... | main.c: In function 'main':
main.c:42:23: error: expected ';' before 'return'
42 | printf("%d",S)
| ^
| ;
43 |
44 | return 0;
| ~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.