criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
  cin>>a>>b>>c;
  cout<<min(a+b,b+c,c+a)<<endl;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:6:12:   required from here
    6 |   cout<<min(a+b,b+c,c+a)<<endl;
      |         ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int P,Q,R;
  cin >> P >> Q >> R;
  int answer;
  answer = min(P+Q,Q+R,R+P);
  cout << answer << endl;
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:15:   required from here
    8 |   answer = min(P+Q,Q+R,R+P);
      |            ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int P,Q,R;
  cin >> P >> Q >> R;
  int answer;
  answer = min(P+Q,Q+R,R+P);
  cout << answer << endl;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:15:   required from here
    8 |   answer = min(P+Q,Q+R,R+P);
      |            ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C< D, E;
  cin >> A >> B >> C;
  D = A + B + C;
  E = max(max(A, B), C);
  cout << D - E << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: expected initializer before '<' token
    4 |   int A, B, C< D, E;
      |              ^
a.cc:5:20: error: 'C' was not declared in this scope
    5 |   cin >> A >> B >> C;
      |                    ^
a.cc:6:3: error: 'D' was not declared in this scope
    6 |   D = A + B + C;
      |   ^
a.cc:7:3: error: 'E' was not declared in this scope
    7 |   E = max(max(A, B), C);
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define LL long long

int main(){
	// sengen
	int p,q,r;
	// nyuryoku
	cin >> p >> q >> r;
	// keisan
	cout << min(p+q,q+r,r+p) << endl;
	// syutsuryoku
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:11:13:   required from here
   11 |         cout << min(p+q,q+r,r+p) << endl;
      |                 ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <math.h>
 
using namespace std;

int mod=1e9+7
int main(){
    int N,M;
    cin >> N >> M;
    int s[N+1];
    for(int i=0;i<=N;i++){
        s[i]=0;
    }
    for(int i=0;i<M;i++){
        int a; cin >> a;
        s[a]=1;
    }
 
    int dp[N+1];
    dp[0]=1;
    for(int i=1;i<N+1;i++){
        dp[i]=0;
    }
    for(int i=0;i<N-1;i++){
        if(s[i]==0){
            dp[i+1]+=dp[i];
            dp[i+2]+=dp[i];
            dp[i+1]%=mod;
            dp[i+2]%=mod;
        }
    }
    if(s[N-1]==0){
            dp[N]+=dp[N-1];
            dp[N]%=mod;
        }
    cout << dp[N]<<endl;
  //cout << dp[2] << endl;
 
}

Compiler output:
a.cc:7:1: error: expected ',' or ';' before 'int'
    7 | int main(){
      | ^~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
using namespace std;
using ll=long long;
using P =pair<int,int>;


int main(){
int p,q,r;
cin>>p>>q>>r;
if(p>q){
if(p<r){
cout<<p+q;
return 0;
}else{
cout<<r+q;
return 0;
}

}else{
if(q<r){
cout<<p+q;
return 0;
}else{
  cout<<p+r;
return 0;  
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
#define VB vector<bool>
#define VP vector<pair<ll,ll>>
#define VVL vector<vector<ll>>
#define VVP vector<vector<pair<ll,ll>>>
#define PL pair<ll,ll>
#define ALL(v) (v).begin(), (v).end()
ll d1[4] = {1, -1, 0, 0};
ll d2[4] = {0, 0, 1, -1};

int main(){
  ll a, b, c;
  cin >> a >> b >> c;
  ll mx = ({a, b, c});
  ll sum = a+b+c;
  cout <<sum - mx << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: expected ';' before '}' token
   19 |   ll mx = ({a, b, c});
      |                    ^
      |                    ;
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int p, q, r; cin >> p >> q >> r;
  
  int ans = p + q + r - max(p, q, r);
  cout << ans << endl;
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:28:   required from here
    7 |   int ans = p + q + r - max(p, q, r);
      |                         ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long int ll;
typedef pair<int, int> ii;

struct fastio {
    fastio() {
        ios::sync_with_stdio(false);
        cout << setprecision(10) << fixed;
        cin.tie(0);
    }
};

fastio _fast_io;

int main() {
    cin >> p >> q >> r;
    int m = max(max(p, q), r);
    cout << p + q + r - m << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: 'p' was not declared in this scope
   18 |     cin >> p >> q >> r;
      |            ^
a.cc:18:17: error: 'q' was not declared in this scope
   18 |     cin >> p >> q >> r;
      |                 ^
a.cc:18:22: error: 'r' was not declared in this scope
   18 |     cin >> p >> q >> r;
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int P,Q,R;
  cin >> P >> Q >> R;
  cout << (P + Q + R - max(P,Q,R));
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:27:   required from here
    7 |   cout << (P + Q + R - max(P,Q,R));
      |                        ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){ int a, b, c;
    cin >> a >> b >> c;
    cout << min(a+b, b+c, a+c);
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:5:16:   required from here
    5 |     cout << min(a+b, b+c, a+c);
      |             ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int a, b, c;
    cin >> a >> b >> c;
    cout << min(a+b, b+c, a+c);
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:16:   required from here
    8 |     cout << min(a+b, b+c, a+c);
      |             ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream> 
using namespace std;

int main(){
  int a,b,c;
  cin>>a>>b>>c;
  cout << min({a+b,a+c,b+c}) <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    7 |   cout << min({a+b,a+c,b+c}) <<endl;
      |           ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int A,B,C;
  cin >> A >> B >> C;
  cout << min(min(A,B),C)) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected ';' before ')' token
    7 |   cout << min(min(A,B),C)) << endl;
      |                          ^
      |                          ;
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int A,B,C;
  cin >> A >> B >> C;
  cout << min(min(A,B),C)) < endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected ';' before ')' token
    7 |   cout << min(min(A,B),C)) < endl;
      |                          ^
      |                          ;
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int p = nextInt();
    int q = nextInt();
    int r = nextInt();
    System.out.println(Math.min(p+q, Math.min(q+r, r+p)));
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
    int p = nextInt();
            ^
  symbol:   method nextInt()
  location: class Main
Main.java:7: error: cannot find symbol
    int q = nextInt();
            ^
  symbol:   method nextInt()
  location: class Main
Main.java:8: error: cannot find symbol
    int r = nextInt();
            ^
  symbol:   method nextInt()
  location: class Main
3 errors
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  cout<<min({a+b,a+c,b+c})<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    6 |   cout<<min({a+b,a+c,b+c})<<endl;
      |         ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<string> vs;
typedef vector<char> vc;
typedef queue<ll> ql;
typedef deque<ll> dql;
typedef priority_queue<ll/*, vl, greater<ll>*/> pql; //降順(/*昇順*/)
typedef set<ll> sl;
typedef pair<ll, ll> pl;
typedef vector<vl> vvl;
typedef vector<pl> vpl;
#define rep(i, n) for(ll i = 0; i < ll(n); i++)
#define rep2(i, n) for(ll i = 1; i <= ll(n); i++)
//#define rep(i, k, n) for(ll i = k-1; i < ll(n); i++)
//#define rep2(i, k, n) for(ll i = k; i <= ll(n); i++)
#define all(v) (v).begin(), (v).end()
bool chmin(ll &a, ll b) {if(b < a) {a = b; return 1;} return 0;}
bool chmax(ll &a, ll b) {if(b > a) {a = b; return 1;} return 0;}
const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;
//const ll MOD = 998244353;
const ll MAX = 1e9;
const char newl = '\n';

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  ll p(3);
  rep(i, 3) cin >> p[i];
  sort(all(p));
  cout << p[0] + p[1] << newl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:21: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   33 |   rep(i, 3) cin >> p[i];
      |                     ^
a.cc:19:20: error: request for member 'begin' in 'p', which is of non-class type 'll' {aka 'long long int'}
   19 | #define all(v) (v).begin(), (v).end()
      |                    ^~~~~
a.cc:34:8: note: in expansion of macro 'all'
   34 |   sort(all(p));
      |        ^~~
a.cc:19:33: error: request for member 'end' in 'p', which is of non-class type 'll' {aka 'long long int'}
   19 | #define all(v) (v).begin(), (v).end()
      |                                 ^~~
a.cc:34:8: note: in expansion of macro 'all'
   34 |   sort(all(p));
      |        ^~~
a.cc:35:12: error: invalid types 'll {aka long long int}[int]' for array subscript
   35 |   cout << p[0] + p[1] << newl;
      |            ^
a.cc:35:19: error: invalid types 'll {aka long long int}[int]' for array subscript
   35 |   cout << p[0] + p[1] << newl;
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  
  int a,b,c;
  cin >> a >> b >> c;
  
  cout << a+b+c - {max(a,b) && max(b,c)} << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected primary-expression before '{' token
    9 |   cout << a+b+c - {max(a,b) && max(b,c)} << endl;
      |                   ^
a.cc:9:42: error: expected primary-expression before '<<' token
    9 |   cout << a+b+c - {max(a,b) && max(b,c)} << endl;
      |                                          ^~
Language: C++

#include<iostream>
#include<math.h>
using namespace std;
 
int P;
int Q;
int R;
 
int smallest;
int second;
 
int main(){
  cin >> P >> Q >> R;
  cout << P + Q + R - max({P, Q, R});
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   14 |   cout << P + Q + R - max({P, Q, R});
      |                       ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iostream>
#include<math.h>
using namespace std;
 
int P;
int Q;
int R;
 
int smallest;
int second;
 
int main(){
  cin >> P >> Q >> R;
  cout << P + Q + R - {max({P, Q, R});
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: expected primary-expression before '{' token
   14 |   cout << P + Q + R - {max({P, Q, R});
      |                       ^
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:12:11: note: to match this '{'
   12 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<math>
using namespace std;
 
int P;
int Q;
int R;
 
int smallest;
int second;
 
int main(){
  cin >> P >> Q >> R;
  cout << P + Q + R -(max({P, Q, R}));
}

Compiler output:
a.cc:2:9: fatal error: math: No such file or directory
    2 | #include<math>
      |         ^~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
 
int P;
int Q;
int R;
 
int smallest;
int second;
 
int main(){
  cin >> P >> Q >> R;
  cout << P + Q + R -(max({P, Q, R}));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   13 |   cout << P + Q + R -(max({P, Q, R}));
      |                       ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: Java

/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fucking interest
*******************************
Higher, higher, even higher, to the point you won’t even be able to see me
https://www.a2oj.com/Ladder16.html
*******************************
NEVER DO 300IQ CONTESTS EVER
300IQ AS WRITER = EXTRA NONO
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class D
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         char[][] grid = new char[N][M];
         for(int i=0; i < N; i++)
            grid[i] = infile.readLine().toCharArray();
         TreeSet<Integer>[] vert = new TreeSet[M];
         TreeSet<Integer>[] hort = new TreeSet[N];
         for(int r=0; r < N; r++)
         {
            hort[r] = new TreeSet<Integer>();
            for(int c=0; c < M; c++)
               if(grid[r][c] == '#')
                  hort[r].add(c);
         }
         for(int c=0; c < M; c++)
         {
            vert[c] = new TreeSet<Integer>();
            for(int r=0; r < N; r++)
               if(grid[r][c] == '#')
                  vert[c].add(r);
         }
         int res = 1;
         for(int r=0; r < N; r++)
            for(int c=0; c < M; c++)
               if(grid[r][c] == '.')
               {
                  int col = N;
                  if(vert[c].size() >= 1)
                  {
                     int high = N;
                     if(vert[c].last() > r)
                        high = vert[c].ceiling(r);
                     int low = -1;
                     if(vert[c].first() < r)
                        low = vert[c].floor(r);
                     col = high-low-1;
                  }
                  int row = M;
                  if(hort[r].size() >= 1)
                  {
                     int high = M;
                     if(hort[r].last() > c)
                        high = hort[r].ceiling(c);
                     int low = -1;
                     if(hort[r].first() < c)
                        low = hort[r].floor(c);
                     row = high-low-1;
                  }
                  res = Math.max(res, col+row-1);
               }
         System.out.println(res);
      }
   }

Compiler output:
Main.java:21: error: class D is public, should be declared in a file named D.java
   public class D
          ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
	vector<int>a(n);
	for (int i = 0; i < 3; i++)cin >> a.at(i);
	sort(a.begin(), a.end());
	cout << a.at(0)+a.at(1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: 'n' was not declared in this scope
    6 |         vector<int>a(n);
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int p,q,r;cin>>p>>q>>r;
  cout << p+q+r-max(p, max(q, r) << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:34: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |   cout << p+q+r-max(p, max(q, r) << endl;
      |                        ~~~~~~~~~~^~~~~~~
Language: C

#include<stdio.h>
int main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}


Compiler output:
main.c: In function 'main':
main.c:2:129: error: expected ')' before 'ans'
    2 | int main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      |                                                                                                                          ~      ^~~
      |                                                                                                                                 )
Language: C

int main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}


Compiler output:
main.c: In function 'main':
main.c:1:22: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | int main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      |                      ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
main.c:1:22: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | int main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      |                      ^~~~~
main.c:1:22: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:116: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | int main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      |                                                                                                                    ^~~~~~
main.c:1:116: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:116: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:116: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:129: error: expected ')' before 'ans'
    1 | int main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      |                                                                                                                          ~      ^~~
      |                                                                                                                                 )
Language: C

main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      | ^~~~
main.c: In function 'main':
main.c:1:18: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      |                  ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
main.c:1:18: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      |                  ^~~~~
main.c:1:18: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:112: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      |                                                                                                                ^~~~~~
main.c:1:112: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:112: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:112: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:125: error: expected ')' before 'ans'
    1 | main(){int p,q,r;scanf("%d%d%d",&p,&q,&r);int ans=p+q+r;if(p<q&&p<r)ans-=p;else if(q<p&&q<r)ans-=q;else ans-=r;printf("%d\n"ans);return 0;}
      |                                                                                                                      ~      ^~~
      |                                                                                                                             )
Language: C++

#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

int main() {
  int P, Q, R;
  cin >> P >> Q >> R >> enld;

  int tot = A + B + C;
  int del = max({P, Q, R});
  cout << tot - del << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: 'enld' was not declared in this scope
    7 |   cin >> P >> Q >> R >> enld;
      |                         ^~~~
a.cc:9:13: error: 'A' was not declared in this scope
    9 |   int tot = A + B + C;
      |             ^
a.cc:9:17: error: 'B' was not declared in this scope
    9 |   int tot = A + B + C;
      |                 ^
a.cc:9:21: error: 'C' was not declared in this scope
    9 |   int tot = A + B + C;
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int p, q, r;
  cin >> p >> q >> r;
  
  cout << p + q + r - max({p, q, r*}) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:36: error: expected primary-expression before '}' token
    8 |   cout << p + q + r - max({p, q, r*}) << endl;
      |                                    ^
a.cc:8:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |   cout << p + q + r - max({p, q, r*}) << endl;
      |                       ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: Java

package atcorder;

import java.util.Arrays;

import java.util.Scanner;

public class Airplane {

	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		 
		int cntNums[] = new int[3];
		 
		 
		for(int i = 0; i <= 2; i++){
		    
			int inputNums = sc.nextInt();
		    cntNums[i] = inputNums;
		 
		}
		 
		Arrays.sort(cntNums);
		 
		System.out.println(cntNums[0] + cntNums[1]);
	
	}
}
		

Compiler output:
Main.java:7: error: class Airplane is public, should be declared in a file named Airplane.java
public class Airplane {
       ^
1 error
Language: Java

package atcorder;

import java.util.Arrays;

import java.util.Scanner;

public class Airplane {

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		
		
		int getNUM[] = new int[3];
		
		
		for(int i = 0; i <= 2; i++){
            
			int inputNums = sc.nextInt();
	        getNUM[i] = inputNums;
		
		}
		
		Arrays.sort(getNUM);
		
		System.out.println(getNUM[0] + getNUM[1]);
	
	}
}
		

Compiler output:
Main.java:7: error: class Airplane is public, should be declared in a file named Airplane.java
public class Airplane {
       ^
1 error
Language: Java

import java.util.Arrays;

import java.util.Scanner;

public class Airplane {

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		
		
		int getNUM[] = new int[3];
		
		
		for(int i = 0; i <= 2; i++){
            
			int inputNums = sc.nextInt();
	        getNUM[i] = inputNums;
		
		}
		
		Arrays.sort(getNUM);
		
		System.out.println(getNUM[0] + getNUM[1]);
	
	}
}
		

Compiler output:
Main.java:5: error: class Airplane is public, should be declared in a file named Airplane.java
public class Airplane {
       ^
1 error
Language: Java

Scanner sc = new Scanner(System.in);

int cntNums[] = new int[3];


for(int i = 0; i <= 2; i++){
    
	int inputNums = sc.nextInt();
    cntNums[i] = inputNums;

}

Arrays.sort(cntNums);

System.out.println(cntNums[0] + cntNums[1]);
	

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner sc = new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: class, interface, enum, or record expected
int cntNums[] = new int[3];
^
Main.java:6: error: class, interface, enum, or record expected
for(int i = 0; i <= 2; i++){
^
Main.java:6: error: class, interface, enum, or record expected
for(int i = 0; i <= 2; i++){
               ^
Main.java:6: error: class, interface, enum, or record expected
for(int i = 0; i <= 2; i++){
                       ^
Main.java:9: error: class, interface, enum, or record expected
    cntNums[i] = inputNums;
    ^
Main.java:11: error: class, interface, enum, or record expected
}
^
Main.java:15: error: class, interface, enum, or record expected
System.out.println(cntNums[0] + cntNums[1]);
^
8 errors
Language: C++

#include <bits/stdc++.h>  
using namespace std;
u
int main() {
  int p,q,r;
  cin>>p>>q>>r;
  int ans=min(p+q,q+r);
  ans=min(ans,r+p);
  cout<<ans;
}
      

Compiler output:
a.cc:3:1: error: 'u' does not name a type
    3 | u
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;

/* short */
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v), rend(v)

/* REPmacro */
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define REP(i, n) for(int i = 0; i < (n); i++)

/* exchange */
#define chmin(a, b) (a) = min((ll)(a), (ll)(b))
#define chmax(a, b) (a) = max((ll)(a), (ll)(b))

/* output */
#define I(x) cin >> x;
#define D(x) cerr << (x) << " ";
#define BR cerr << "\n";
#define P(x) cout << (x) << endl;
#define FIX cout << fixed << setprecision(10);

/* const */
const int ARRAY = 100005;
const int INF = 1001001001; // 10^9
const ll LINF = 1001001001001001001; // 10^18
const int MOD = 1e9 + 7;

ll N = 0;
ll ret = 0;

int main(void){
  ll A, B, C;
  I(A);
  I(B);
  I(C);
  ret = min(A+B, B+C, C+A);
  P(ret);

}


Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:46:12:   required from here
   46 |   ret = min(A+B, B+C, C+A);
      |         ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> list(3);
  if (int i=0; i<3; i++) {
    int a;
    cin >> a;
    list.at(i) = a;
  }
  sort(list.begin(),list.end());
  cout << list.at(0)+list.at(1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: expected ')' before ';' token
    5 |   if (int i=0; i<3; i++) {
      |      ~            ^
      |                   )
a.cc:5:21: error: 'i' was not declared in this scope
    5 |   if (int i=0; i<3; i++) {
      |                     ^
Language: C++

#include <iostream>
#include <iomanip>
typedef long long ll;
using namespace std;
const  ll INF = 1e9;
const  ll MOD = 1e9 + 7;
#define repi(i,n,init) for(ll i=init;i<(n);i++)

int main()
{
    int a[3];
    repi(i,3,0){
        cin >> a[i];
    }
    int index[3] = {0,1,2};
    int ans = INF;
    do{
        int tmp = a[index[0]] + a[index[1]];
        ans = min(ans,tmp);
    }while(next_permutation(index,index + 3));
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: 'next_permutation' was not declared in this scope
   20 |     }while(next_permutation(index,index + 3));
      |            ^~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int p,q,r;
  cin>>p>>q>>r;
  cout<<min(p+q,q+r,p+r);
  return 0;
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:6:12:   required from here
    6 |   cout<<min(p+q,q+r,p+r);
      |         ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc+;.h>
using namespace std;

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  
  int d=max(a,max(b,c));
  
  cout << a+b+c-d << endl;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc+;.h: No such file or directory
    1 | #include <bits/stdc+;.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java



    AtCoder Beginner Contest 142

    日本語
    xxJOKERxx (Guest)

コンテスト時間: 2019-09-28(土) 21:00 ~ 2019-09-28(土) 22:40 (100分)
AtCoderホームへ戻る

    トップ
    問題
    質問
    提出
    提出結果
    順位表
    バーチャル順位表
    コードテスト
    解説

コードテスト
言語
ソースコード

1

import java.util.*;

2

​

3

public class Main{

4

      public static void main(String[] args) {

5

            Scanner sc = new Scanner(System.in);

6

            int x = sc.nextInt();

7

            int y = sc.nextInt();

8

            int z = sc.nextInt();

9

            if(x > y || x > z){

10

              System.out.println(y + z);

11

            } else if(y > x || y > z){

12

              System.out.println(x + z);

13

            } else {

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
    AtCoder Beginner Contest 142
    ^
Main.java:29: error: class, interface, enum, or record expected
2
^
Main.java:31: error: illegal character: '\u200b'
?
^
Main.java:37: error: illegal start of type
4
^
Main.java:41: error: not a statement
5
^
Main.java:41: error: ';' expected
5
 ^
Main.java:45: error: not a statement
6
^
Main.java:45: error: ';' expected
6
 ^
Main.java:49: error: not a statement
7
^
Main.java:49: error: ';' expected
7
 ^
Main.java:53: error: not a statement
8
^
Main.java:53: error: ';' expected
8
 ^
Main.java:57: error: not a statement
9
^
Main.java:57: error: ';' expected
9
 ^
Main.java:61: error: not a statement
10
^
Main.java:61: error: ';' expected
10
  ^
Main.java:65: error: not a statement
11
^
Main.java:65: error: ';' expected
11
  ^
Main.java:69: error: not a statement
12
^
Main.java:69: error: ';' expected
12
  ^
Main.java:73: error: not a statement
13
^
Main.java:73: error: ';' expected
13
  ^
Main.java:75: error: reached end of file while parsing
            } else {
                    ^
23 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int p, q, r;
  cin >> p >> q >> r;
  int ans = p + q + r - max(p, q, r);
  cin >> ans;
  cout << ans << endl;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:28:   required from here
    7 |   int ans = p + q + r - max(p, q, r);
      |                         ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int p. q, r;
  cin >> p >> q >>r;
  
  int tibi = 0;
  
  tibi = min(p+q, q+r);
  tibi = min(tibi , p+r);
  
  cout << tibi << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '.' token
    5 |   int p. q, r;
      |        ^
a.cc:6:10: error: 'p' was not declared in this scope
    6 |   cin >> p >> q >>r;
      |          ^
a.cc:6:15: error: 'q' was not declared in this scope
    6 |   cin >> p >> q >>r;
      |               ^
a.cc:6:19: error: 'r' was not declared in this scope
    6 |   cin >> p >> q >>r;
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namsespace std;

int main(){
  int p, q, r;
  cin >> p >> q >>r;
  
  int tibi = 0;
  
  tibi = min(p+q, q+r);
  tibi = min(tibi , p+r);
  
  cout << tibi << endl;
  
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namsespace'
    2 | using namsespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> p >> q >>r;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:10: error: 'min' was not declared in this scope; did you mean 'std::min'?
   10 |   tibi = min(p+q, q+r);
      |          ^~~
      |          std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout << tibi << 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:13:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |   cout << tibi << endl;
      |                   ^~~~
      |                   std::endl
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:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namsespace std;

int main(){
  int p. q, r;
  cin >> p >> q >>r;
  
  int tibi = 0;
  
  tibi = min(p+q, q+r);
  tibi = min(tibi , p+r);
  
  cout << tibi << endl;
  
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namsespace'
    2 | using namsespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '.' token
    5 |   int p. q, r;
      |        ^
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> p >> q >>r;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 'p' was not declared in this scope
    6 |   cin >> p >> q >>r;
      |          ^
a.cc:6:15: error: 'q' was not declared in this scope
    6 |   cin >> p >> q >>r;
      |               ^
a.cc:6:19: error: 'r' was not declared in this scope
    6 |   cin >> p >> q >>r;
      |                   ^
a.cc:10:10: error: 'min' was not declared in this scope; did you mean 'std::min'?
   10 |   tibi = min(p+q, q+r);
      |          ^~~
      |          std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout << tibi << 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:13:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |   cout << tibi << endl;
      |                   ^~~~
      |                   std::endl
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:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i< (n); i++)
using namespace std;

int main(){
 int p,q,r;
 cin >> p >> q >> r;
 cout << p+q+r -max(p,q,r) << endl;

 
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:20:   required from here
    8 |  cout << p+q+r -max(p,q,r) << endl;
      |                 ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C

#include <iostream>
#include <algorithm>

using namespace std;

int solve(int p, int q, int r) {
    return min({p+q, p+r, r+q});
}

int main(int argc, char const *argv[])
{
    int p = 0, q = 0, r = 0;


    cin >> p >> q >> r;

    auto ans = solve(p, q, r);

    cout << ans << '\n';

    return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.