submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s718310463
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,h;
cin >> a;
cin >> b;
cin >> c;
cout << (a+b)h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:9:10: error: 'c' was not declared in this scope
9 | cin >> c;
| ^
a.cc:10:16: error: expected ';' before 'h'
10 | cout << (a+b)h/2 << endl;
| ^
| ;
|
s332744142
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<((a+b)+h)/2;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:16: error: 'h' was not declared in this scope
6 | cout<<((a+b)+h)/2;
| ^
|
s071951188
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int cal(int a,int b,int h){
int d ;
d = (a + b)*h/2;
return d;
}
int main(){
int a,b,h;
cin >> a;
cin >> b;
cin >> h;
cout << cal(a,b,h);
return 0;
|
a.cc: In function 'int main()':
a.cc:18:12: error: expected '}' at end of input
18 | return 0;
| ^
a.cc:10:11: note: to match this '{'
10 | int main(){
| ^
|
s891985839
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2
}
|
a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before '}' token
7 | cout << (a+b)*h/2
| ^
| ;
8 |
9 | }
| ~
|
s019477455
|
p03997
|
Java
|
import java.util.*;
// . >
public class A{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int a = in.nextInt(), b = in.nextInt(), c = in.nextInt();
System.out.println((a + b) * c / 2);
}
}
|
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A{
^
1 error
|
s863481137
|
p03997
|
Java
|
import java.util.*;
// . >
public class A{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int a = in.nextInt(), b = in.nextInt(), c = in.nextInt();
System.out.println((a + b) * c / 2);
}
}
|
Main.java:3: error: class A is public, should be declared in a file named A.java
public class A{
^
1 error
|
s691481025
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,H;
cin >> A >> B >> H;
cout << h*(A+B)/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:11: error: 'h' was not declared in this scope
7 | cout << h*(A+B)/2 << endl;
| ^
|
s021136391
|
p03997
|
C++
|
#include<bits/stdc++>h>
using namespace std;
int main(){
int a,b,h;
cin>>a>>b>>h;
cout<<(a+b)*h/2<<endl;
}
|
a.cc:1:23: warning: extra tokens at end of #include directive
1 | #include<bits/stdc++>h>
| ^
a.cc:1:9: fatal error: bits/stdc++>: No such file or directory
1 | #include<bits/stdc++>h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s835466686
|
p03997
|
C
|
a,b,h=int(input.split())
print((a+b)*h/2)
|
main.c:1:1: warning: data definition has no type or storage class
1 | a,b,h=int(input.split())
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
1 | a,b,h=int(input.split())
| ^
main.c:1:5: error: type defaults to 'int' in declaration of 'h' [-Wimplicit-int]
1 | a,b,h=int(input.split())
| ^
main.c:1:7: error: expected expression before 'int'
1 | a,b,h=int(input.split())
| ^~~
|
s060475449
|
p03997
|
C++
|
#include <bits/stdc++.h>
#define rep(i,N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(void){
int a, b, h;
cin >> a >> b >> h;
ans = (a + b) * h / 2;
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:11:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
11 | ans = (a + b) * h / 2;
| ^~~
| abs
|
s672688974
|
p03997
|
C++
|
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; //処理早くするためのおまじない
int main(){
string Sa,Sb,Sc;
cin>>Sa>>Sb>>Sc;
string next;
next.push_back(a[0]);
while(true)
{
if(next=="a")
{
if(Sa.empty())
{
cout<<"A"<<endl;
break;
}
next=*Sa.begin();
Sa.erase(Sa.begin());
}
if(next=="b")
{
if(Sb.empty())
{
cout<<"B"<<endl;
break;
}
next=*Sb.begin();
Sb.erase(Sb.begin());
}
if(next=="c")
{
if(Sa.empty())
{
cout<<"C"<<endl;
break;
}
next=*Sc.begin();
Sc.erase(Sc.begin());
}
}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int main()
{
string A, B, C;
cin >> A >> B >> C;
string next;
next.push_back( A[ 0 ] );
int a{}, b{}, c{};
while( true )
{
if( next == "a" )
{
if( A.empty() )
{
cout << "A" << endl;
break;
}
next = *A.begin();
A.erase( A.begin() );
a++;
}
if( next == "b" )
{
if( B.empty() )
{
cout << "B" << endl;
break;
}
next = *B.begin();
B.erase( B.begin() );
b++;
}
if( next == "c" )
{
if( C.empty() )
{
cout << "C" << endl;
break;
}
next = *C.begin();
C.erase( C.begin() );
c++;
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:16: error: 'a' was not declared in this scope; did you mean 'Sa'?
12 | next.push_back(a[0]);
| ^
| Sa
a.cc: At global scope:
a.cc:53:8: error: redefinition of 'struct cww'
53 | struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
| ^~~
a.cc:5:8: note: previous definition of 'struct cww'
5 | struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; //処理早くするためのおまじない
| ^~~
a.cc:53:59: error: conflicting declaration 'int star'
53 | struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
| ^~~~
a.cc:5:59: note: previous declaration as 'cww star'
5 | struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; //処理早くするためのおまじない
| ^~~~
a.cc:54:5: error: redefinition of 'int main()'
54 | int main()
| ^~~~
a.cc:6:5: note: 'int main()' previously defined here
6 | int main(){
| ^~~~
|
s026903199
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c; cin >> a >> b >> c; cout << (a+b)*(h/2) << endl;
}
|
a.cc: In function 'int main()':
a.cc:5:53: error: 'h' was not declared in this scope
5 | int a, b, c; cin >> a >> b >> c; cout << (a+b)*(h/2) << endl;
| ^
|
s259702223
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, h;
cin >> a >> b >> h;
cout << b*h-(b-a)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
8 | int main() {
| ^~
a.cc:8:9: note: remove parentheses to default-initialize a variable
8 | int main() {
| ^~
| --
a.cc:8:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:8:12: error: a function-definition is not allowed here before '{' token
8 | int main() {
| ^
a.cc:13:2: error: expected '}' at end of input
13 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s821967862
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, h;
cin >> a >> b >> h;
cout << b*h-(b-a)*h/2 << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
8 | int main() {
| ^~
a.cc:8:9: note: remove parentheses to default-initialize a variable
8 | int main() {
| ^~
| --
a.cc:8:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:8:12: error: a function-definition is not allowed here before '{' token
8 | int main() {
| ^
|
s844541084
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> P;
typedef string str;
typedef vector<P> vp;
typedef vector<string> vs;
typedef vector<bool> vb;
const ll mod=1e9+7;
const ll inf=1e16;
#define rep(i,m,n) for(ll i=m;i<n;i++)
#define repr(i,m,n) for(ll i=m-1;i>=n;i--)
#define fi first
#define se second
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define eb(x) emplace_back(x)
#define pb(x) pop_back(x)
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define sum(x) accumulate(all(x),0)
#define pc(x) __builtin_popcount(x)
#define gll greater<ll>()
void solve(){
ll a,b,h;
cin >> (a+b)*h/2 << endl;
}
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
solve();
}
|
a.cc: In function 'void solve()':
a.cc:33:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'll' {aka 'long long int'})
33 | cin >> (a+b)*h/2 << endl;
| ~~~ ^~ ~~~~~~~~~
| | |
| | ll {aka long long int}
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'long unsigned int&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'long long unsigned int&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'float&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'double&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: cannot bind non-const lvalue reference of type 'long double&' to a value of type 'll' {aka 'long long int'}
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: invalid conversion from 'll' {aka 'long long int'} to 'void*' [-fpermissive]
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
| |
| ll {aka long long int}
a.cc:33:17: error: cannot bind rvalue '(void*)(((a + b) * h) / 2)' to 'void*&'
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: invalid conversion from 'll' {aka 'long long int'} to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive]
33 | cin >> (a+b)*h/2 << endl;
| ~~~~~~~^~
| |
| ll {aka long long int}
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' (near match)
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:7: note: conversion of argument 1 would be ill-formed:
a.cc:33:17: error: invalid conversion from 'll' {aka 'long long int'} to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)
|
s368720606
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin>>a>>b>>h;
cout<<(a+b)*h/2<<endl;
return
}
|
a.cc: In function 'int main()':
a.cc:13:2: error: expected primary-expression before '}' token
13 | }
| ^
a.cc:12:9: error: expected ';' before '}' token
12 | return
| ^
| ;
13 | }
| ~
|
s774407303
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main()
{
int a,b,h,area;
cin>>a>>b>>h;
area=0.5*(a+b)*h;
cout<<area<<endl;
retrurn 0;
}
|
a.cc: In function 'int main()':
a.cc:9:3: error: 'retrurn' was not declared in this scope
9 | retrurn 0;
| ^~~~~~~
|
s388465888
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int a,b,h,sum;//KはくまでX円でNはくする
int main(){
cin>>a>>b>>h;
sum= (a+b)*h/2;
cout<<sum<<endl;
return o;
}
|
a.cc: In function 'int main()':
a.cc:11:16: error: 'o' was not declared in this scope
11 | return o;
| ^
|
s070377327
|
p03997
|
C++
|
#incldue<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin>>a>>b>>h;
cout<<(a+b)*h/2;
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
1 | #incldue<bits/stdc++.h>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>h;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #incldue<bits/stdc++.h>
a.cc:6:3: error: 'cout' was not declared in this scope
6 | cout<<(a+b)*h/2;
| ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s587921020
|
p03997
|
C
|
#include <stdio.h>
int main(void){
int a, b, h;
scanf("%d\n %d\n %d\n", &a, &b, &h);
if (1<=a<=100 && 1<=b<=100 && 1<=h<=100){
printf("%d\n", (a+b)*h/2);
}else {
printf("%s\n", "Invalid!")
}
}
|
main.c: In function 'main':
main.c:9:31: error: expected ';' before '}' token
9 | printf("%s\n", "Invalid!")
| ^
| ;
10 | }
| ~
|
s521232243
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b ,v;
cin >> a >> b >> c;
cout << ((a+b)*v) / 2;
}
|
a.cc: In function 'int main()':
a.cc:5:18: error: 'c' was not declared in this scope
5 | cin >> a >> b >> c;
| ^
|
s737901448
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1e5+5,M=1e6+5,inf=0x3f3f3f3f,mod=1e9+7;
#define mst(a) memset(a,0,sizeof a)
#define lx x<<1
#define rx x<<1|1
#define reg register
#define PII pair<int,int>
#define fi first
#define se second
int main(){
int a,b,h;
cin>>a>>b>>h;
cout<<(a+b)*h/2<<end;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:24: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
15 | cout<<(a+b)*h/2<<end;
| ~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
|
s791901100
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main(){
int n,k,x,y;
cin >> a >> b >>h;
cout << (a+b)*h/2 <<endl;
}
|
a.cc: In function 'int main()':
a.cc:5:10: error: 'a' was not declared in this scope
5 | cin >> a >> b >>h;
| ^
a.cc:5:15: error: 'b' was not declared in this scope
5 | cin >> a >> b >>h;
| ^
a.cc:5:19: error: 'h' was not declared in this scope
5 | cin >> a >> b >>h;
| ^
|
s228824548
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main()
{
float a,b
int h;
int area,area1;
cin>>a;
cin>>b;
cin>>h;
area1=(int)(a+b)/2;
area=area1*h;
cout<<area;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'int'
6 | int h;
| ^~~
a.cc:9:8: error: 'b' was not declared in this scope
9 | cin>>b;
| ^
a.cc:10:8: error: 'h' was not declared in this scope
10 | cin>>h;
| ^
|
s315614816
|
p03997
|
C
|
fasdfa
|
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
1 | fasdfa
| ^~~~~~
|
s149535106
|
p03997
|
C
|
include<stdio.h>
int main(void)
{
int a; //上底
int b; //下底
int h; //高さ
int ans; //答えを格納する変数
printf("a:");
scanf("%d",&a);
printf("b:");
scanf("%d",&b);
printf("h:");
scanf("%d",&h);
ans=(a+b)*h/2;
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s770817603
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, h,
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:7: error: expected initializer before '>>' token
6 | cin >> a >> b >> h;
| ^~
|
s735751186
|
p03997
|
C
|
int a,b,h
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
print("%d",(a+b)*h/2;
|
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
2 | scanf("%d",&a);
| ^~~~~
main.c:3:7: error: expected declaration specifiers or '...' before string constant
3 | scanf("%d",&b);
| ^~~~
main.c:3:12: error: expected declaration specifiers or '...' before '&' token
3 | scanf("%d",&b);
| ^
main.c:4:7: error: expected declaration specifiers or '...' before string constant
4 | scanf("%d",&h);
| ^~~~
main.c:4:12: error: expected declaration specifiers or '...' before '&' token
4 | scanf("%d",&h);
| ^
main.c:5:7: error: expected declaration specifiers or '...' before string constant
5 | print("%d",(a+b)*h/2;
| ^~~~
main.c:5:12: error: expected declaration specifiers or '...' before '(' token
5 | print("%d",(a+b)*h/2;
| ^
main.c:5:12: error: expected declaration specifiers or '...' at end of input
|
s704337522
|
p03997
|
C
|
include <stdio.h>
int main(void)
{
int a,b,h;
printf("a:") scanf("%d",&a);
printf("b:") scanf("%d",&b);
printf("h:") scanf("%d",&h);
printf("(a+b)*h/2");
return 0;
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s253507736
|
p03997
|
C
|
include<stdio.h>
int main(void)
{
(a+b)*h/2
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s338051432
|
p03997
|
C++
|
#include bits/stdc++.h
int main()
{
int a,b,h;
int areah
cin>>a;
cin>>b;
cin>>h;
area=0.5*h*(b+a);
cout<<area<<endl;
return 0;
}
|
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
1 | #include bits/stdc++.h
| ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
6 | cin>>a;
| ^~~
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin>>b;
| ^~~
a.cc:9:3: error: 'area' was not declared in this scope
9 | area=0.5*h*(b+a);
| ^~~~
a.cc:10:3: error: 'cout' was not declared in this scope
10 | cout<<area<<endl;
| ^~~~
a.cc:10:15: error: 'endl' was not declared in this scope
10 | cout<<area<<endl;
| ^~~~
|
s909185343
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(void){
int a,b,h,d;
cin >> a >> b >> h;
d = (a+b)*h/2
cout << d << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:18: error: expected ';' before 'cout'
6 | d = (a+b)*h/2
| ^
| ;
7 | cout << d << endl;
| ~~~~
|
s974485918
|
p03997
|
C++
|
#include <bits/dtsc++.h>
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2 << endl;
}
|
a.cc:1:10: fatal error: bits/dtsc++.h: No such file or directory
1 | #include <bits/dtsc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s726591930
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(void){
// Your code here!
int a, b, h;
cin >> a >> b >> h;
int ans = { ( a + b ) * h }/ 2;
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:9:31: error: expected ',' or ';' before '/' token
9 | int ans = { ( a + b ) * h }/ 2;
| ^
|
s846408642
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(void){
// Your code here!
int a, b, H;
cin >> a >> b >> H;
int n = a + b;
int o = n * h;
int ans = o / 2;
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:11:17: error: 'h' was not declared in this scope
11 | int o = n * h;
| ^
|
s039837949
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(void){
// Your code here!
int a, h, b;
cin >> a >> h >> b;
int ans a + b * h / 2;
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:9:12: error: expected initializer before 'a'
9 | int ans a + b * h / 2;
| ^
a.cc:11:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
11 | cout << ans << endl;
| ^~~
| abs
|
s646676060
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(void){
// Your code here!
int a, b, H;
cin >> a >> b >> H;
int ans = ((a + b) * h) / 2);
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:9:26: error: 'h' was not declared in this scope
9 | int ans = ((a + b) * h) / 2);
| ^
|
s661741355
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
string a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:16: error: no match for 'operator*' (operand types are 'std::__cxx11::basic_string<char>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
7 | cout << (a+b)*h/2 << endl;
| ~~~~~^~
| | |
| | basic_string<[...]>
| basic_string<[...]>
In file included from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/complex:400:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator*(const complex<_Tp>&, const complex<_Tp>&)'
400 | operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:400:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::complex<_Tp>'
7 | cout << (a+b)*h/2 << endl;
| ^
/usr/include/c++/14/complex:409:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator*(const complex<_Tp>&, const _Tp&)'
409 | operator*(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:409:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::complex<_Tp>'
7 | cout << (a+b)*h/2 << endl;
| ^
/usr/include/c++/14/complex:418:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator*(const _Tp&, const complex<_Tp>&)'
418 | operator*(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:418:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::complex<_Tp>'
7 | cout << (a+b)*h/2 << endl;
| ^
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
7 | cout << (a+b)*h/2 << endl;
| ^
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
7 | cout << (a+b)*h/2 << endl;
| ^
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
7 | cout << (a+b)*h/2 << endl;
| ^
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
7 | cout << (a+b)*h/2 << endl;
| ^
/usr/include/c++/14/bits/valarray_after.h:407:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
407 | _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:407:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
7 | cout << (a+b)*h/2 << endl;
| ^
/usr/include/c++/14/valarray:1198:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__multiplies, _Tp>::result_type> std::operator*(const valarray<_Tp>&, const valarray<_Tp>&)'
1198 | _DEFINE_BINARY_OPERATOR(*, __multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1198:1: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
7 | cout << (a+b)*h/2 << endl;
| ^
/usr/include/c++/14/valarray:1198:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__multiplies, _Tp>::result_type> std::operator*(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1198 | _DEFINE_BINARY_OPERATOR(*, __multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1198:1: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::__cxx11::basic_string<char>' is not derived from 'const std::valarray<_Tp>'
7 | cout << (a+b)*h/2 << endl;
| ^
/usr/include/c++/14/valarray:1198:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__multiplies, _Tp>::result_type> std::operator*(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1198 | _DEFINE_BINARY_OPERATOR(*, __multiplies)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1198:1: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::valarray<_Tp>'
7 | cout << (a+b)*h/2 << endl;
| ^
|
s387340290
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, h;
cin >> a >> b >> c;
int ans = (a * b) * h / 2;
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
6 | cin >> a >> b >> c;
| ^
|
s344025784
|
p03997
|
C++
|
a = int(input())
b = int(input())
h = int(input())
S = (a+b) * h / 2
print( int(S))
|
a.cc:1:1: error: 'a' does not name a type
1 | a = int(input())
| ^
|
s220618434
|
p03997
|
C++
|
#include <bits/stdc++.h>
#define INF 2e9
#define MOD 1000000007
#define MOD9 998244353
#define intMAX 51000;
#define PI 3.14159265359
using namespace std;
typedef long long llong;
// typedef long double ldouble;
using Graph = vector<vector<int>>;
// int ctoi(const char c){
// if('0' <= c && c <= '9') return (c-'0');
// return -1;
// }
// int gcd(int a, int b){
// int ma = max(a,b);
// int mi = min(a,b);
// if(mi == 0) return ma;
// return gcd(mi, ma%mi);
// }
// llong POW(llong a, llong b){
// if(b == 0) return 1;
// else{
// if(b%2 == 0) return POW(a * a % MOD, b / 2) % MOD;
// else return a * POW(a * a % MOD, b / 2) % MOD;
// }
// }
int main(){
int a, b, c;
cin >> a >> b >> c;
cout << (a+b) * h / 2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:37:19: error: 'h' was not declared in this scope
37 | cout << (a+b) * h / 2 << endl;
| ^
|
s121073789
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(void){
// Your code here!
int a, b, h;
cin >> a >> b >> h;
int ans =( a + b ) * h; /2
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:10:29: error: expected primary-expression before '/' token
10 | int ans =( a + b ) * h; /2
| ^
|
s877865507
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main() {
int a, b, h, ret;
cin >> a;
cin >> b;
cin >> h;
ret = (a + b) * h / 2
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:24: error: expected ';' before 'return'
9 | ret = (a + b) * h / 2
| ^
| ;
10 | return 0;
| ~~~~~~
|
s121622068
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a;
int b;
int h;
cin >> a >> b >>h;
cout<<(a+b)*h/2;
|
a.cc: In function 'int main()':
a.cc:8:19: error: expected '}' at end of input
8 | cout<<(a+b)*h/2;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s036902074
|
p03997
|
Java
|
import java.util.Scanner;
public class Main {
static public void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int a;
int b;
int h;
int s;
a = scan.nextInt();
b = scan.nextInt();
h = scan.nextInt();
s = (a+b) / h;
System.out.println(s);
}
|
Main.java:21: error: reached end of file while parsing
}
^
1 error
|
s744333629
|
p03997
|
Java
|
import java.util.Scanner;
public class Main {
static public void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int a;
int b;
int h;
int s;
a = scan.nextInt();
b = scan.nextInt();
h = scan.nextInt);
s = (a+b) / h;
System.out.println(s);
}
|
Main.java:15: error: ';' expected
h = scan.nextInt);
^
Main.java:21: error: reached end of file while parsing
}
^
2 errors
|
s155685025
|
p03997
|
Java
|
import java.util.Scanner;
public class Main {
static public void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int a;
int b;
int h;
int s;
a = scan.nextLine();
b = scan.nextLine();
h = scan.nextLine();
s = (a+b) / h;
System.out.println(s);
}
}
|
Main.java:13: error: incompatible types: String cannot be converted to int
a = scan.nextLine();
^
Main.java:14: error: incompatible types: String cannot be converted to int
b = scan.nextLine();
^
Main.java:15: error: incompatible types: String cannot be converted to int
h = scan.nextLine();
^
3 errors
|
s900985636
|
p03997
|
Java
|
import java.util.Scanner;
public class Main {
static public void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int a;
int b;
int h;
int s;
a = scan.nextLine();
b = scan.nextLine();
h = scan.nextLine();
s = (a+b) / h;
System.out.println(s);
}
|
Main.java:21: error: reached end of file while parsing
}
^
1 error
|
s090749518
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
/* code */
int a,b,h,answer;
std::cin >> a >> b >> h;
answer = (a+b)/2*h
cout << answer << '\n';
return 0;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:9:21: error: expected ';' before 'cout'
9 | answer = (a+b)/2*h
| ^
| ;
10 | cout << answer << '\n';
| ~~~~
|
s327610488
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
/* code */
int a,b,h,answer;
std::cin >> a >> b >> h;
answer = (a+b)/2*h
std::cout << answer << '\n';
return 0;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:9:21: error: expected ';' before 'std'
9 | answer = (a+b)/2*h
| ^
| ;
10 | std::cout << answer << '\n';
| ~~~
|
s437932801
|
p03997
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner();
// 整数の入力
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
//出力
System.out.println((a + b) * h / 2);
}
}
|
Main.java:4: error: no suitable constructor found for Scanner(no arguments)
Scanner sc = new Scanner();
^
constructor Scanner.Scanner(Readable,Pattern) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(Readable) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(InputStream) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(InputStream,String) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(InputStream,Charset) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(File) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(File,String) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(File,Charset) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(Path) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(Path,String) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(Path,Charset) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(String) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(ReadableByteChannel) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
(actual and formal argument lists differ in length)
constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
(actual and formal argument lists differ in length)
1 error
|
s266856525
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, h;
cin >> a;
cin >> b;
cin >> c;
cout << (a+b)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:8:10: error: 'c' was not declared in this scope
8 | cin >> c;
| ^
|
s049425069
|
p03997
|
C
|
#include<stdio.h>
int main(void)
{
int a,b,h;
printf("%d"(a + b) * h / 2);
return 0;
|
main.c: In function 'main':
main.c:7:10: error: called object is not a function or function pointer
7 | printf("%d"(a + b) * h / 2);
| ^~~~
main.c:8:3: error: expected declaration or statement at end of input
8 | return 0;
| ^~~~~~
|
s411847151
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout << ( a+b )*h/2 << endl;
}
}
|
a.cc:13:1: error: expected declaration before '}' token
13 | }
| ^
|
s706193104
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout >> ( a+b ) *h /2 >> endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
9 | cout >> ( a+b ) *h /2 >> endl;
| ~~~~ ^~ ~~~~~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:9:9: note: candidate: 'operator>>(int, int)' (built-in)
9 | cout >> ( a+b ) *h /2 >> endl;
| ~~~~~^~~~~~~~~~~~~~~~
a.cc:9:9: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:4: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:9:24: required from here
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:9:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b ) *h /2 >> endl;
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _Cha
|
s445922985
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout >> ( a+b )*h/2 >> endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
9 | cout >> ( a+b )*h/2 >> endl;
| ~~~~ ^~ ~~~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:9:9: note: candidate: 'operator>>(int, int)' (built-in)
9 | cout >> ( a+b )*h/2 >> endl;
| ~~~~~^~~~~~~~~~~~~~
a.cc:9:9: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:4: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> ( a+b )*h/2 >> endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:9:22: required from here
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:9:22: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> ( a+b )*h/2 >> endl;
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>
|
s901525316
|
p03997
|
C++
|
//#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define rep(i, n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) \
{ \
cout << x << ' '; \
} \
cout << endl;
template <class T>
bool chmax(T &a, const T &b)
{
if (a < b)
{
a = b;
return 1;
}
return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
if (b < a)
{
a = b;
return 1;
}
return 0;
}
//cout<<fixed<<setprecision(15);有効数字15桁
//-std=c++14
//-std=gnu++17
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
int a,b,c,k;
cin>>a>>b>>c;
cout<<(a+b)*h/2<<"\n";
}
|
a.cc: In function 'int main()':
a.cc:55:17: error: 'h' was not declared in this scope
55 | cout<<(a+b)*h/2<<"\n";
| ^
|
s223858221
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, h;
cin >> a >> b >> h;
cout << (a+b)*h/2
}
|
a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before '}' token
7 | cout << (a+b)*h/2
| ^
| ;
8 | }
| ~
|
s805420342
|
p03997
|
C
|
#include <stdio.h>
double Area(int a, int b,
int h)
{
return ((a+ b) / 2) * h;
}
/
int main()
{
int a=3 , b= 4,
h=2;
double area = Area(base1, base2,
height);
printf("Area is: %.%d", area);
return 0;
}
|
main.c:13:1: error: expected identifier or '(' before '/' token
13 | /
| ^
|
s520042631
|
p03997
|
C
|
#include<stdio.h>
double Area(int a, int b, int h)
{
return ((a+b) / 2) * h;
}
int main()
{
int a=3, b= 4, h = 6;
double area = Area(a,b,h);
cout << "Area is: " << area;
return 0;
}
|
main.c: In function 'main':
main.c:15:5: error: 'cout' undeclared (first use in this function)
15 | cout << "Area is: " << area;
| ^~~~
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
|
s035539394
|
p03997
|
C
|
#include<stdio.h>
int main()
{
int a,b,h,x,area;
scanf('%d%d%d"&a,&b,&h);
x=(a+b)/2;
area=x*h;
printf("%d",area);
return 0;
}
|
main.c: In function 'main':
main.c:5:7: warning: missing terminating ' character
5 | scanf('%d%d%d"&a,&b,&h);
| ^
main.c:5:7: error: missing terminating ' character
5 | scanf('%d%d%d"&a,&b,&h);
| ^~~~~~~~~~~~~~~~~~
main.c:6:10: error: expected ')' before ';' token
6 | x=(a+b)/2;
| ^
| )
main.c:5:6: note: to match this '('
5 | scanf('%d%d%d"&a,&b,&h);
| ^
main.c:6:2: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
6 | x=(a+b)/2;
| ~^~~~~~~~
| |
| int
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:9:10: error: expected ';' before '}' token
9 | return 0;
| ^
| ;
10 | }
| ~
|
s915386553
|
p03997
|
C
|
#include<stdio.h>
int main()
{
int a,b,h,area;
scanf("%d %d %d",&a,&b,&h);
area= ((a+b)×h/2);
Printf("area is=%d\n",area);
return 0;
}
|
main.c: In function 'main':
main.c:6:16: error: stray '\303' in program
6 | area= ((a+b)<U+00D7>h/2);
| ^~~~~~~~
main.c:6:16: error: expected ')' before 'h'
6 | area= ((a+b)×h/2);
| ~ ^~
| )
main.c:7:4: error: implicit declaration of function 'Printf'; did you mean 'printf'? [-Wimplicit-function-declaration]
7 | Printf("area is=%d\n",area);
| ^~~~~~
| printf
|
s800555594
|
p03997
|
C
|
#include<stdio.h>
int main()
{
int a,b,c,d;
scanf("%d%d%d",&a,&b,&c);
d=((a+b)*h)/2;
printf("%d",d);
return 0;
}
|
main.c: In function 'main':
main.c:6:14: error: 'h' undeclared (first use in this function)
6 | d=((a+b)*h)/2;
| ^
main.c:6:14: note: each undeclared identifier is reported only once for each function it appears in
|
s758909933
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a;
cin>>b;
cin>>c;
cout<<(a+b)*c/2
}
|
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before '}' token
9 | cout<<(a+b)*c/2
| ^
| ;
10 | }
| ~
|
s194112139
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main() {
int a, b, h;
cin >> a;
cin >> b;
cin >> h;
int ans;
ans = (a + b) * h / 2;
cout << ans << endl:
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before ':' token
12 | cout << ans << endl:
| ^
| ;
|
s679647251
|
p03997
|
Java
|
import java.io.*;
public class Daikei {
public static void main(String[] args) {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int h = Integer.parseInt(reader.readLine());
System.out.println((a + b) * h / 2);
} catch(IOException e) {
System.out.println(e);
}
}
}
|
Main.java:3: error: class Daikei is public, should be declared in a file named Daikei.java
public class Daikei {
^
1 error
|
s167167444
|
p03997
|
Java
|
public class Main {
public static void main(String[] args) {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int h = Integer.parseInt(reader.readLine());
System.out.println((a + b) * h / 2);
} catch(IOException e) {
System.out.println(e);
}
}
}
|
Main.java:3: error: cannot find symbol
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:3: error: cannot find symbol
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:3: error: cannot find symbol
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
Main.java:9: error: cannot find symbol
} catch(IOException e) {
^
symbol: class IOException
location: class Main
4 errors
|
s009653994
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,j; cin >> a >> b >> h;
cout << (a+b)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:5:31: error: 'h' was not declared in this scope
5 | int a,b,j; cin >> a >> b >> h;
| ^
|
s382876253
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long a, b, c;
cin >> a >> b >> c;
cout << (a + b)*h / 2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:10:25: error: 'h' was not declared in this scope
10 | cout << (a + b)*h / 2 << endl;
| ^
|
s386611772
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin >> a >> b > h;
cout << (a+b)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:17: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
6 | cin >> a >> b > h;
| ~~~~~~~~~~~~~ ^ ~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:6:17: note: candidate: 'operator>(int, int)' (built-in)
6 | cin >> a >> b > h;
| ~~~~~~~~~~~~~~^~~
a.cc:6:17: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1329 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1497 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1673 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
6 | cin >> a >> b > h;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
6 | cin >> a >> b > h;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | cin >> a >> b > h;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:6:19: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
6 | cin >> a >> b > h;
| ^
/usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>
|
s160584555
|
p03997
|
C++
|
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <regex>
#define REP(i,n) for(int i = 0; i < n; i++)
#define FOR(i,j,n) for(int i = j; i < n; i++)
#define RFOR(i,j,n) for(int i = j-1; i >= n; i--)
#define PREC(n) fixed << setprecision(n)
#define print_array(v) REP(__k, v.size()) { cout << v[__k]; if(__k != v.size()-1) cout << " "; else cout << endl; }
#define YesorNo(a) printf(a?"Yes\n":"No\n")
#define _LIBCPP_DEBUG 0
using namespace std;
int64_t MOD = 1000000007;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, h;
cin >> a >> b >> hr;
int ans = (a + b) * h / 2;
cout << ans << endl;
return 0;
}
//templete by private_yusuke
|
a.cc: In function 'int main()':
a.cc:64:20: error: 'hr' was not declared in this scope; did you mean 'h'?
64 | cin >> a >> b >> hr;
| ^~
| h
|
s196966421
|
p03997
|
C++
|
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,h;
cin >> a >> b >> h;
cout (a+b)*h/2;
}
|
a.cc: In function 'int main()':
a.cc:8:7: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
8 | cout (a+b)*h/2;
| ~~~~~^~~~~
|
s382584880
|
p03997
|
C++
|
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,h;
cin >> a >> b >> h;
cout (a+b)*h/2
}
|
a.cc: In function 'int main()':
a.cc:8:7: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
8 | cout (a+b)*h/2
| ~~~~~^~~~~
|
s491979326
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, h;
cin >> a >> b >> c;
cout << (a + b) * h / 2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
6 | cin >> a >> b >> c;
| ^
|
s465242565
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int a, b, h; cin >> a >> b >> h;
cout << (a+b)*h)/2;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:20: error: expected ';' before ')' token
12 | cout << (a+b)*h)/2;
| ^
| ;
|
s521776680
|
p03997
|
C++
|
include<bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(0);
int a,b,h;
cin>>a>>b>>h;
int d= (a+b)*h;
cout<<d/2;
return 0;
}
|
a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
4 | cin.tie(0);
| ^~~
a.cc:5:5: error: 'ios' has not been declared
5 | ios::sync_with_stdio(0);
| ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
9 | cout<<d/2;
| ^~~~
|
s218726239
|
p03997
|
C
|
#include<iostream>
using namespace std;
int main()
{
double a,b,h,area;
cin>>a;
cin>>b;
cin>>h;
area=((a+b)*h)/2.0;
cout<<area<<"\n";
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s017861557
|
p03997
|
C++
|
#include<iostream>
int main(){
int a,b,h;
cin>>a>>b>>h;
cout<<(a+b)*h/2<<endl;
}
|
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>>a>>b>>h;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | cout<<(a+b)*h/2<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:5:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
5 | cout<<(a+b)*h/2<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s082096480
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
//型に気を付けよう
int main() {
int a,b,h;
const int p=2;
cin>>a>>b>>h;
cout<<((a+b)*h)/p
}
|
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before '}' token
9 | cout<<((a+b)*h)/p
| ^
| ;
10 |
11 | }
| ~
|
s309645926
|
p03997
|
C++
|
3
4
2
|
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s776603026
|
p03997
|
C++
|
4
4
4
|
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4
| ^
|
s526914172
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int tixing(int a,int b,int h)
{
int ans=(a+b)*h/2;
return;
}
int main()
{
int a,b,h,ans;
cin>>a>>b>>h;
tixing(a,b,h);
cout<<ans;
return 0;
}
|
a.cc: In function 'int tixing(int, int, int)':
a.cc:6:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
6 | return;
| ^~~~~~
|
s471829764
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int tixing(int a,int b,int h)
{
int ans=(a+b)*h/2;
cout<<ans;
return;
}
int main()
{
int a,b,h,ans;
cin>>a>>b>>h;
tixing(a,b,h);
return 0;
}
|
a.cc: In function 'int tixing(int, int, int)':
a.cc:7:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
7 | return;
| ^~~~~~
|
s372702557
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
cout << (a+b)*h/2 << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:17: error: 'h' was not declared in this scope
8 | cout << (a+b)*h/2 << endl;
| ^
|
s553406372
|
p03997
|
C++
|
int a;
int b;
int h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
|
a.cc:4:1: error: 'cin' does not name a type
4 | cin >> a >> b >> h;
| ^~~
a.cc:6:1: error: 'cout' does not name a type
6 | cout << (a + b) * h / 2 << endl;
| ^~~~
|
s091288034
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,h,area;
area=(a+b)*h/2
cout<<area<<endl;
}
|
a.cc: In function 'int main()':
a.cc:6:21: error: expected ';' before 'cout'
6 | area=(a+b)*h/2
| ^
| ;
7 | cout<<area<<endl;
| ~~~~
|
s088785903
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,h,area;
area=(a+b)/2 *h
cout<<area<<endl;
}
|
a.cc: In function 'int main()':
a.cc:6:18: error: expected ';' before 'cout'
6 | area=(a+b)/2 *h
| ^
| ;
7 | cout<<area<<endl;
| ~~~~
|
s312726940
|
p03997
|
C++
|
/*Function Template*/
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> pint;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define Rep(i, n) for(ll i = 1; i < (n); i++)
#define ALL(a) (a).begin(),(a).end()
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define PI 3.14159265358979323846
ll fac[MAX], finv[MAX], inv[MAX];
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;
}
bool palindrome(string s){
bool flag=true;
rep(i,s.size()) if(s[i]!=s[s.size()-1-i]) flag=false;
return flag;
}
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (ll i = 2; i < MAX; i++){
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
ll Len(ll n) {
ll s=0;
while(n!=0) s++, n/=10;
return s;
}
ll Sint(ll n) {
ll m=0,s=0,a=n;
while(a!=0) s++, a/=10;
for(ll i=s-1;i>=0;i--) m+=n/((ll)pow(10,i))-(n/((ll)pow(10,i+1)))*10;
return m;
}
ll Svec(vector<ll> v){
ll n=0;
for(ll i=0;i<v.size();i++) n+=v[i];
return n;
}
ll GCD(ll a,ll b) {
return b ? GCD(b,a%b) : a;
}
ll LCM(ll a,ll b){
return a/GCD(a,b)*b;
}
ll Factorial(ll n){
ll m=1;
while(n>=1) m*=n,n--;
return m;
}
void runlength(string s,vector<pair<char,ll>> &p){
ll x=1;
if(s.size()==1){
p.push_back(pair<char,ll>(s[0],1));
}
for(ll i=0;i<s.size()-1;i++){
if(s[i]==s[i+1]){
x++;
if(i==s.size()-2){
p.push_back(pair<char,ll>(s[i],x));
}
}else{
p.push_back(pair<char,ll>(s[i],x));
x=1;
if(i==s.size()-2){
p.push_back(pair<char,ll>(s[s.size()-1],x));
}
}
}
}
ll COM(ll n,ll k){
if (n < k) return 0;
if (n < 0 || k < 0) return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
ll modpow(ll a, ll n, ll mod) {
ll res = 1;
while (n > 0) {
if (n & 1) res = res * a % mod;
a = a * a % mod;
n >>= 1;
}
return res;
}
string Toupper(string s){
string ans="";
rep(i,s.size()){
if('a'<=s[i] && s[i]<='z') ans+=(char)s[i]-32;
else ans+=s[i];
}
return ans;
}
string Tolower(string s){
string ans="";
rep(i,s.size()){
if('A'<=s[i] && s[i]<='Z') ans+=(char)s[i]+32;
else ans+=s[i];
}
return ans;
}
const int MAX_N=100010;
vector<bool> sieve_of_eratosthenes(){
vector<bool> isPrime(MAX_N+1,true);
for(int i=2;i<=MAX_N;i++){
if(isPrime[i]){
for(int j=2*i;j<=MAX_N;j+=i){
isPrime[j]=false;
}
}
}
return isPrime;
}
vector<pint> prime_factorize(ll n){
vector<pint> ans;
for(ll p=2;p<=sqrt(n);p++){
if(n%p!=0) continue;
ll cnt=0;
while(n%p==0){
n/=p;
cnt++;
}
ans.push_back(make_pair(p,cnt));
}
if(n!=1) ans.push_back(make_pair(n,1));
return ans;
}
/*bool cmp(pint a, pint b) { return a.second < b.second; }*/
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
int main() {
IOS;
ll a,b,h;
cin>>a>>b>>h;
vector<ll> v(n);
cout<<(a+b)*h/2<<endl;
}
|
a.cc: In function 'int main()':
a.cc:177:16: error: 'n' was not declared in this scope
177 | vector<ll> v(n);
| ^
|
s599915575
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,h
cin a >> b >> h;
cout << (a+b)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
7 | cin a >> b >> h;
| ^~~
a.cc:9:17: error: 'h' was not declared in this scope
9 | cout << (a+b)*h/2 << endl;
| ^
|
s782272750
|
p03997
|
Java
|
var a=4;
var b=4;
var h=4;
println((a+b)*h/2);
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
var a=4;
^
(use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
println((a+b)*h/2);
^
2 errors
|
s018533870
|
p03997
|
Java
|
int a=4;
int b=4;
int h=4;
console.log((a+b)*h/2);
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int a=4;
^
(use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
console.log((a+b)*h/2);
^
2 errors
|
s280123043
|
p03997
|
Java
|
int answer = (a+b)*h/2;
console.log(answer);
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int answer = (a+b)*h/2;
^
(use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
console.log(answer);
^
2 errors
|
s498591049
|
p03997
|
C++
|
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.Random;
import java.util.Scanner;
class UnionFind{
int Parent[];
UnionFind(int n){//Initialize by -1
Parent=new int[n];
Arrays.fill(Parent, -1);
}
int root(int A) {//In which tree is A?
if(Parent[A]<0)return A;
return Parent[A]=root(Parent[A]);
}
int size(int A) {//size of tree which is include A
return -Parent[root(A)];
}
boolean connect(int A,int B) {//Connect A and B
A=root(A);
B=root(B);
if(A==B) return false;
if(size(A)<size(B)) {int C=0;C=B;B=A;A=C;}//SWAP
Parent[A]+=Parent[B];
Parent[B]=A;
return true;
}
}
public class Main {
static FastScanner scan=new FastScanner();
static Scanner scanner=new Scanner(System.in);
static Random rand=new Random();
static long mod=1000000007;
static double eps=0.0000000001;
static int big=Integer.MAX_VALUE;
static long modlcm(long a,long b) {return a*b*modint(gcd(a,b),mod);}
static long gcd (long a, long b) {return b>0?gcd(b,a%b):a;}
static long lcm (long a, long b) {return a*b/gcd(a,b);}
static int max(int a,int b) {return a>b?a:b;}
static int min(int a,int b) {return a<b?a:b;}
static long lmax(long a,long b) {return Math.max(a, b);}
static long lmin(long a,long b) {return Math.min(a, b);}
static long factorial(int i) {return i==1?1:i*factorial(i-1);}
public static void main(String[] args) {
int a=scan.nextInt();
int k=scan.nextInt();
int x=scan.nextInt();
System.out.println((a+k)*x/2);
}
static int lower_bound(int a[],int key) {
int right=a.length;
int left=0;
while(right-left>1) {
int mid=(right+left)/2;
if(a[mid]<key) {
left=mid;
}
else {
right=mid;
}
}
return left;
}
static int upper_bound(int a[],int key) {
int right=a.length;
int left=0;
while(right-left>1) {
int mid=(right+left)/2;
if(a[mid]<=key) {
left=mid;
}
else {
right=mid;
}
}
return left;
}
static boolean isPrime (long n) {
if (n==2) return true;
if (n<2 || n%2==0) return false;
double d = Math.sqrt(n);
for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
return true;
}
static int upper_division(int a,int b) {
if(a%b==0) {
return a/b;
}
else {
return a/b+1;
}
}
static long lupper_division(long a,long b) {
if(a%b==0) {
return a/b;
}
else {
return a/b+1;
}
}
static int[] setArray(int a) {
int b[]=new int[a];
for(int i=0;i<a;i++) {
b[i]=scan.nextInt();
}
return b;
}
static long[] lsetArray(int a) {
long b[]=new long[a];
for(int i=0;i<a;i++) {
b[i]=scan.nextLong();
}
return b;
}
static String reverce(String str) {
String strr="";
for(int i=str.length()-1;i>=0;i--) {
strr+=str.charAt(i);
}
return strr;
}
public static void printArray(int[] que) {
for(int i=0;i<que.length-1;i++) {
System.out.print(que[i]+" ");
}
System.out.println(que[que.length-1]);
}
public static int[][] doublesort(int[][]a) {
Arrays.sort(a,(x,y)->Integer.compare(x[0],y[0]));
return a;
}
public static long[][] ldoublesort(long[][]a) {
Arrays.sort(a,(x,y)->Long.compare(x[0],y[0]));
return a;
}
static long modpow(long x,long n,long mo) {
long sum=1;
while(n>0) {
if((n&1)==1) {
sum=sum*x%mo;
}
x=x*x%mo;
n>>=1;
}
return sum;
}
public static char[] revch(char ch[]) {
char ret[]=new char[ch.length];
for(int i=ch.length-1,j=0;i>=0;i--,j++) {
ret[j]=ch[i];
}
return ret;
}
public static int[] revint(int ch[]) {
int ret[]=new int[ch.length];
for(int i=ch.length-1,j=0;i>=0;i--,j++) {
ret[j]=ch[i];
}
return ret;
}
public static void warshall_floyd(int v[][],int n) {
for(int k=0;k<n;k++)
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
v[i][j]=min(v[i][j],v[i][k]+v[k][j]);
}
public static long modint(long a,long m) {
long b=m,u=1,v=0;
while(b!=0) {
long t=a/b;
a-=t*b;
long x=a;
a=b;
b=x;
u-=t*v;
x=u;
u=v;
v=x;
}
u%=m;
if(u<0)u+=m;
return u;
}
}
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
}else{
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
public String next() {
if (!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while(isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext()) throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while(true){
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
}else if(b == -1 || !isPrintableChar(b)){
return minus ? -n : n;
}else{
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
return (int) nl;
}
public double nextDouble() { return Double.parseDouble(next());}
public char nextchar() {
try { return (char)System.in.read(); } catch(Exception e) {
throw new RuntimeException(e);
}
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.InputStream;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.util.Arrays;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.util.NoSuchElementException;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
5 | import java.util.Random;
| ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
6 | import java.util.Scanner;
| ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:21:9: error: 'boolean' does not name a type; did you mean 'bool'?
21 | boolean connect(int A,int B) {//Connect A and B
| ^~~~~~~
| bool
a.cc:9:13: error: flexible array member 'UnionFind::Parent' in an otherwise empty 'class UnionFind'
9 | int Parent[];
| ^~~~~~
a.cc:30:2: error: expected ';' after class definition
30 | }
| ^
| ;
a.cc: In constructor 'UnionFind::UnionFind(int)':
a.cc:11:17: error: invalid use of array with unspecified bounds
11 | Parent=new int[n];
| ^~~~~~
a.cc:12:17: error: 'Arrays' was not declared in this scope
12 | Arrays.fill(Parent, -1);
| ^~~~~~
a.cc: At global scope:
a.cc:32:1: error: expected unqualified-id before 'public'
32 | public class Main {
| ^~~~~~
a.cc:191:16: error: expected ':' before 'final'
191 | private final InputStream in = System.in;
| ^~~~~~
| :
a.cc:191:17: error: 'final' does not name a type
191 | private final InputStream in = System.in;
| ^~~~~
a.cc:192:16: error: expected ':' before 'final'
192 | private final byte[] buffer = new byte[1024];
| ^~~~~~
| :
a.cc:192:17: error: 'final' does not name a type
192 | private final byte[] buffer = new byte[1024];
| ^~~~~
a.cc:193:16: error: expected ':' before 'int'
193 | private int ptr = 0;
| ^~~~
| :
a.cc:194:16: error: expected ':' before 'int'
194 | private int buflen = 0;
| ^~~~
| :
a.cc:195:16: error: expected ':' before 'boolean'
195 | private boolean hasNextByte() {
| ^~~~~~~~
| :
a.cc:195:17: error: 'boolean' does not name a type; did you mean 'bool'?
195 | private boolean hasNextByte() {
| ^~~~~~~
| bool
a.cc:211:16: error: expected ':' before 'int'
211 | private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
| ^~~~
| :
a.cc:212:16: error: expected ':' before 'static'
212 | private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
| ^~~~~~~
| :
a.cc:212:24: error: 'boolean' does not name a type; did you mean 'bool'?
212 | private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
| ^~~~~~~
| bool
a.cc:213:15: error: expected ':' before 'boolean'
213 | public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
| ^~~~~~~~
| :
a.cc:213:16: error: 'boolean' does not name a type; did you mean 'bool'?
213 | public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
| ^~~~~~~
| bool
a.cc:214:15: error: expected ':' before 'String'
214 | public String next() {
| ^~~~~~~
| :
a.cc:214:16: error: 'String' does not name a type
214 | public String next() {
| ^~~~~~
a.cc:224:15: error: expected ':' before 'long'
224 | public long nextLong() {
| ^~~~~
| :
a.cc:248:15: error: expected ':' before 'int'
248 | public int nextInt() {
| ^~~~
| :
a.cc:253:15: error: expected ':' before 'double'
253 | public double nextDouble() { return Double.parseDouble(next());}
| ^~~~~~~
| :
a.cc:254:15: error: expected ':' before 'char'
254 | public char nextchar() {
| ^~~~~
| :
a.cc:259:2: error: expected ';' after class definition
259 | }
| ^
| ;
a.cc: In member function 'int FastScanner::readByte()':
a.cc:211:38: error: 'hasNextByte' was not declared in this scope
211 | private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
| ^~~~~~~~~~~
a.cc:211:60: error: 'buffer' was not declared in this scope; did you mean 'buflen'?
211 | private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
| ^~~~~~
| buflen
a.cc: In member function 'long int FastScanner::nextLong()':
a.cc:225:22: error: 'hasNext' was not declared in this scope
225 | if (!hasNext()) throw new NoSuchElementException();
| ^~~~~~~
a.cc:225:43: error: expected type-specifier before 'NoSuchElementException'
225 | if (!hasNext()) throw new NoSuchElementException();
| ^~~~~~~~~~~~~~~~~~~~~~
a.cc:227:17: error: 'boolean' was not declared in this scope; did you mean 'bool'?
227 | boolean minus = false;
| ^~~~~~~
| bool
a.cc:230:25: error: 'minus' was not declared in this scope
230 | minus = true;
| ^~~~~
a.cc:234:35: error: expected type-specifier before 'NumberFormatException'
234 | throw new NumberFormatException();
| ^~~~~~~~~~~~~~~~~~~~~
a.cc:240:46: error: 'isPrintableChar' was not declared in this scope
240 | }else if(b == -1 || !isPrintableChar(b)){
| ^~~~~~~~~~~~~~~
a.cc:241:40: error: 'minus' was not declared in this scope
241 | return minus ? -n : n;
| ^~~~~
a.cc:243:43: error: expected type-specifier before 'NumberFormatException'
243 | throw new NumberFormatException();
| ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'int FastScanner::nextInt()':
a.cc:250:26: error: 'Integer' was not declared in this scope
250 | if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
| ^~~~~~~
a.cc:250:81: error: expected type-specifier before 'NumberFormatException'
250 | if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
| ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'double FastScanner::nextDouble()':
a.cc:253:45: error: 'Double' was not declared in this scope; did you mean 'double'?
253 | public double nextDouble() { return Double.parseDouble(next());}
| ^~~~~~
| double
a.cc:253:64: error: 'next' was not declared in this scope; did you mean 'nextInt'?
253 | public double nextDouble() { return Double.parseDouble(next());}
| ^~~~
| nextInt
a.cc: In member function 'char FastScanner::nextchar()':
a.cc:255:36: error: 'System' was not declared in this scope
255 | try { return (char)System.in.read(); } catch(Exception e) {
| ^~~~~~
a.cc:255:62: error: 'Exception' does not name a type
255 | try { return (char)System.in.read(); } catch(Exception e) {
| ^~~~~~~~~
a.cc:256:35: error: expected type-specifier before 'RuntimeException'
256 | throw new RuntimeException(e);
| ^~~~~~~~~~~~~~~~
|
s113394021
|
p03997
|
C++
|
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.Random;
import java.util.Scanner;
class UnionFind{
int Parent[];
UnionFind(int n){//Initialize by -1
Parent=new int[n];
Arrays.fill(Parent, -1);
}
int root(int A) {//In which tree is A?
if(Parent[A]<0)return A;
return Parent[A]=root(Parent[A]);
}
int size(int A) {//size of tree which is include A
return -Parent[root(A)];
}
boolean connect(int A,int B) {//Connect A and B
A=root(A);
B=root(B);
if(A==B) return false;
if(size(A)<size(B)) {int C=0;C=B;B=A;A=C;}//SWAP
Parent[A]+=Parent[B];
Parent[B]=A;
return true;
}
}
public class Main {
static FastScanner scan=new FastScanner();
static Scanner scanner=new Scanner(System.in);
static Random rand=new Random();
static long mod=1000000007;
static double eps=0.0000000001;
static int big=Integer.MAX_VALUE;
static long modlcm(long a,long b) {return a*b*modint(gcd(a,b),mod);}
static long gcd (long a, long b) {return b>0?gcd(b,a%b):a;}
static long lcm (long a, long b) {return a*b/gcd(a,b);}
static int max(int a,int b) {return a>b?a:b;}
static int min(int a,int b) {return a<b?a:b;}
static long lmax(long a,long b) {return Math.max(a, b);}
static long lmin(long a,long b) {return Math.min(a, b);}
static long factorial(int i) {return i==1?1:i*factorial(i-1);}
public static void main(String[] args) {
int a=scan.nextInt();
int b=scan.nextInt();
int h=scan.nextInt();
System.out.println((a+b)*h/2);
}
static int lower_bound(int a[],int key) {
int right=a.length;
int left=0;
while(right-left>1) {
int mid=(right+left)/2;
if(a[mid]<key) {
left=mid;
}
else {
right=mid;
}
}
return left;
}
static int upper_bound(int a[],int key) {
int right=a.length;
int left=0;
while(right-left>1) {
int mid=(right+left)/2;
if(a[mid]<=key) {
left=mid;
}
else {
right=mid;
}
}
return left;
}
static boolean isPrime (long n) {
if (n==2) return true;
if (n<2 || n%2==0) return false;
double d = Math.sqrt(n);
for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
return true;
}
static int upper_division(int a,int b) {
if(a%b==0) {
return a/b;
}
else {
return a/b+1;
}
}
static long lupper_division(long a,long b) {
if(a%b==0) {
return a/b;
}
else {
return a/b+1;
}
}
static int[] setArray(int a) {
int b[]=new int[a];
for(int i=0;i<a;i++) {
b[i]=scan.nextInt();
}
return b;
}
static long[] lsetArray(int a) {
long b[]=new long[a];
for(int i=0;i<a;i++) {
b[i]=scan.nextLong();
}
return b;
}
static String reverce(String str) {
String strr="";
for(int i=str.length()-1;i>=0;i--) {
strr+=str.charAt(i);
}
return strr;
}
public static void printArray(int[] que) {
for(int i=0;i<que.length-1;i++) {
System.out.print(que[i]+" ");
}
System.out.println(que[que.length-1]);
}
public static int[][] doublesort(int[][]a) {
Arrays.sort(a,(x,y)->Integer.compare(x[0],y[0]));
return a;
}
public static long[][] ldoublesort(long[][]a) {
Arrays.sort(a,(x,y)->Long.compare(x[0],y[0]));
return a;
}
static long modpow(long x,long n,long mo) {
long sum=1;
while(n>0) {
if((n&1)==1) {
sum=sum*x%mo;
}
x=x*x%mo;
n>>=1;
}
return sum;
}
public static char[] revch(char ch[]) {
char ret[]=new char[ch.length];
for(int i=ch.length-1,j=0;i>=0;i--,j++) {
ret[j]=ch[i];
}
return ret;
}
public static int[] revint(int ch[]) {
int ret[]=new int[ch.length];
for(int i=ch.length-1,j=0;i>=0;i--,j++) {
ret[j]=ch[i];
}
return ret;
}
public static void warshall_floyd(int v[][],int n) {
for(int k=0;k<n;k++)
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
v[i][j]=min(v[i][j],v[i][k]+v[k][j]);
}
public static long modint(long a,long m) {
long b=m,u=1,v=0;
while(b!=0) {
long t=a/b;
a-=t*b;
long x=a;
a=b;
b=x;
u-=t*v;
x=u;
u=v;
v=x;
}
u%=m;
if(u<0)u+=m;
return u;
}
}
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
}else{
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
public String next() {
if (!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while(isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext()) throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while(true){
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
}else if(b == -1 || !isPrintableChar(b)){
return minus ? -n : n;
}else{
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
return (int) nl;
}
public double nextDouble() { return Double.parseDouble(next());}
public char nextchar() {
try { return (char)System.in.read(); } catch(Exception e) {
throw new RuntimeException(e);
}
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.InputStream;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.util.Arrays;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.util.NoSuchElementException;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
5 | import java.util.Random;
| ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
6 | import java.util.Scanner;
| ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:21:9: error: 'boolean' does not name a type; did you mean 'bool'?
21 | boolean connect(int A,int B) {//Connect A and B
| ^~~~~~~
| bool
a.cc:9:13: error: flexible array member 'UnionFind::Parent' in an otherwise empty 'class UnionFind'
9 | int Parent[];
| ^~~~~~
a.cc:30:2: error: expected ';' after class definition
30 | }
| ^
| ;
a.cc: In constructor 'UnionFind::UnionFind(int)':
a.cc:11:17: error: invalid use of array with unspecified bounds
11 | Parent=new int[n];
| ^~~~~~
a.cc:12:17: error: 'Arrays' was not declared in this scope
12 | Arrays.fill(Parent, -1);
| ^~~~~~
a.cc: At global scope:
a.cc:32:1: error: expected unqualified-id before 'public'
32 | public class Main {
| ^~~~~~
a.cc:190:16: error: expected ':' before 'final'
190 | private final InputStream in = System.in;
| ^~~~~~
| :
a.cc:190:17: error: 'final' does not name a type
190 | private final InputStream in = System.in;
| ^~~~~
a.cc:191:16: error: expected ':' before 'final'
191 | private final byte[] buffer = new byte[1024];
| ^~~~~~
| :
a.cc:191:17: error: 'final' does not name a type
191 | private final byte[] buffer = new byte[1024];
| ^~~~~
a.cc:192:16: error: expected ':' before 'int'
192 | private int ptr = 0;
| ^~~~
| :
a.cc:193:16: error: expected ':' before 'int'
193 | private int buflen = 0;
| ^~~~
| :
a.cc:194:16: error: expected ':' before 'boolean'
194 | private boolean hasNextByte() {
| ^~~~~~~~
| :
a.cc:194:17: error: 'boolean' does not name a type; did you mean 'bool'?
194 | private boolean hasNextByte() {
| ^~~~~~~
| bool
a.cc:210:16: error: expected ':' before 'int'
210 | private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
| ^~~~
| :
a.cc:211:16: error: expected ':' before 'static'
211 | private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
| ^~~~~~~
| :
a.cc:211:24: error: 'boolean' does not name a type; did you mean 'bool'?
211 | private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
| ^~~~~~~
| bool
a.cc:212:15: error: expected ':' before 'boolean'
212 | public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
| ^~~~~~~~
| :
a.cc:212:16: error: 'boolean' does not name a type; did you mean 'bool'?
212 | public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
| ^~~~~~~
| bool
a.cc:213:15: error: expected ':' before 'String'
213 | public String next() {
| ^~~~~~~
| :
a.cc:213:16: error: 'String' does not name a type
213 | public String next() {
| ^~~~~~
a.cc:223:15: error: expected ':' before 'long'
223 | public long nextLong() {
| ^~~~~
| :
a.cc:247:15: error: expected ':' before 'int'
247 | public int nextInt() {
| ^~~~
| :
a.cc:252:15: error: expected ':' before 'double'
252 | public double nextDouble() { return Double.parseDouble(next());}
| ^~~~~~~
| :
a.cc:253:15: error: expected ':' before 'char'
253 | public char nextchar() {
| ^~~~~
| :
a.cc:258:2: error: expected ';' after class definition
258 | }
| ^
| ;
a.cc: In member function 'int FastScanner::readByte()':
a.cc:210:38: error: 'hasNextByte' was not declared in this scope
210 | private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
| ^~~~~~~~~~~
a.cc:210:60: error: 'buffer' was not declared in this scope; did you mean 'buflen'?
210 | private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
| ^~~~~~
| buflen
a.cc: In member function 'long int FastScanner::nextLong()':
a.cc:224:22: error: 'hasNext' was not declared in this scope
224 | if (!hasNext()) throw new NoSuchElementException();
| ^~~~~~~
a.cc:224:43: error: expected type-specifier before 'NoSuchElementException'
224 | if (!hasNext()) throw new NoSuchElementException();
| ^~~~~~~~~~~~~~~~~~~~~~
a.cc:226:17: error: 'boolean' was not declared in this scope; did you mean 'bool'?
226 | boolean minus = false;
| ^~~~~~~
| bool
a.cc:229:25: error: 'minus' was not declared in this scope
229 | minus = true;
| ^~~~~
a.cc:233:35: error: expected type-specifier before 'NumberFormatException'
233 | throw new NumberFormatException();
| ^~~~~~~~~~~~~~~~~~~~~
a.cc:239:46: error: 'isPrintableChar' was not declared in this scope
239 | }else if(b == -1 || !isPrintableChar(b)){
| ^~~~~~~~~~~~~~~
a.cc:240:40: error: 'minus' was not declared in this scope
240 | return minus ? -n : n;
| ^~~~~
a.cc:242:43: error: expected type-specifier before 'NumberFormatException'
242 | throw new NumberFormatException();
| ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'int FastScanner::nextInt()':
a.cc:249:26: error: 'Integer' was not declared in this scope
249 | if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
| ^~~~~~~
a.cc:249:81: error: expected type-specifier before 'NumberFormatException'
249 | if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
| ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'double FastScanner::nextDouble()':
a.cc:252:45: error: 'Double' was not declared in this scope; did you mean 'double'?
252 | public double nextDouble() { return Double.parseDouble(next());}
| ^~~~~~
| double
a.cc:252:64: error: 'next' was not declared in this scope; did you mean 'nextInt'?
252 | public double nextDouble() { return Double.parseDouble(next());}
| ^~~~
| nextInt
a.cc: In member function 'char FastScanner::nextchar()':
a.cc:254:36: error: 'System' was not declared in this scope
254 | try { return (char)System.in.read(); } catch(Exception e) {
| ^~~~~~
a.cc:254:62: error: 'Exception' does not name a type
254 | try { return (char)System.in.read(); } catch(Exception e) {
| ^~~~~~~~~
a.cc:255:35: error: expected type-specifier before 'RuntimeException'
255 | throw new RuntimeException(e);
| ^~~~~~~~~~~~~~~~
|
s474229586
|
p03997
|
C++
|
#include <bits/stc.++h>
using namespace std;
int main()
{
int a,b,h;
scanf("%d%d%d",&a,&b,&h);
int ans=((a+b)*h)/2;
printf("%d",ans);
}
|
a.cc:1:10: fatal error: bits/stc.++h: No such file or directory
1 | #include <bits/stc.++h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s303101931
|
p03997
|
C++
|
#include <bits/stc.++h>
int main()
{
int a,b,h;
scanf("%d%d%d",&a,&b,&h);
int ans=((a+b)*h)/2;
printf("%d",ans);
}
|
a.cc:1:10: fatal error: bits/stc.++h: No such file or directory
1 | #include <bits/stc.++h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s282835818
|
p03997
|
C
|
(a+b)*h/2
|
main.c:1:3: error: expected ')' before '+' token
1 | (a+b)*h/2
| ^
| )
|
s249099764
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(void){
int a,b,h;
cin >> a>>b>>h;
cout << (a+b)*c/2;
}
|
a.cc: In function 'int main()':
a.cc:9:15: error: 'c' was not declared in this scope
9 | cout << (a+b)*c/2;
| ^
|
s937313784
|
p03997
|
C++
|
#include <bits / stdc ++. h>
using namespace std;
struct cww {cww () {ios :: sync_with_stdio ( false ); cin.tie ( 0 );}} star;
int main ()
{
string A, B, C;
cin >> A >> B >> C;
string next;
next.push_back (A [ 0 ]);
int a {}, b {}, c {};
while ( true )
{
if (next == "a" )
{
if (A.empty ())
{
cout << "A" << endl;
break ;
}
next = * A.begin ();
A.erase (A.begin ());
a ++;
}
if (next == "b" )
{
if (B.empty ())
{
cout << "B" << endl;
break ;
}
next = * B.begin ();
B.erase (B.begin ());
b ++;
}
if (next == "c" )
{
if (C.empty ())
{
cout << "C" << endl;
break ;
}
next = * C.begin ();
C.erase (C.begin ());
c ++;
}
}
return 0 ;
}
|
a.cc:1:10: fatal error: bits / stdc ++. h: No such file or directory
1 | #include <bits / stdc ++. h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s737136164
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
int a,b,h; com>>a>>b>>h;
cout<<(a+b)*h/2<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:20: error: 'com' was not declared in this scope; did you mean 'cos'?
7 | int a,b,h; com>>a>>b>>h;
| ^~~
| cos
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.