submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s369913680 | p01725 | C++ | #include <string>
#include <vector>
#include <iostream>
using namespace std;
string S; int junjo[4];
long long calc(int L,int R){
int K=0;
vector<int>junjo2[4];
for(int i=0;i<4;i++){
junjo2[junjo[i]].push_back(i);
}
for(int i=0;i<4;i++){
if(junjo2[i].size()>=1){
for(int j... | a.cc: In function 'int main()':
a.cc:46:16: error: 's' was not declared in this scope
46 | cin >> s; long long ret = 0;
| ^
|
s597812463 | p01725 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <cctype>
using namespace std;
char op[3];
int64_t expr0(string &S, int &i);
int64_t expr1(string &S, int &i);
int64_t expr2(string &S, int &i);
int64_t factor(string &S, int &i);
int64_t number(string &S, int &i);
int64_t expr0(string &S, int &i){
... | a.cc: In function 'int main()':
a.cc:114:17: error: 'LONG_MIN' was not declared in this scope
114 | int64_t ans=LONG_MIN;
| ^~~~~~~~
a.cc:5:1: note: 'LONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <cctype>
+++ |+#include... |
s691180720 | p01725 | C++ | #include <iostream>
#include <algorithm>
#include <climits>
#define rep(i, a, n) for(int i = ((int) a); i < ((int) n); i++)
#define inf long_min
using namespace std;
typedef long long ll;
string s;
bool op_pri[3][256];
int p;
ll calc(ll n1, char op, ll n2) {
switch(op) {
case '*': return n1 * n2;
case '+': ... | a.cc: In function 'int main()':
a.cc:5:13: error: 'long_min' was not declared in this scope
5 | #define inf long_min
| ^~~~~~~~
a.cc:53:13: note: in expansion of macro 'inf'
53 | ll ans = -inf;
| ^~~
|
s708940172 | p01725 | C++ | #include<bits/stdc++.h>
using namespace std;
using Int =__int128;
int p=0;
Int formula(string& s,int turn);
vector<char> op[3];
Int calc(Int lhs,Int rhs,char op){
if(op=='+') return lhs+rhs;
if(op=='-') return lhs-rhs;
if(op=='*') return lhs*rhs;
throw("what calc");
}
Int num(string& s){
Int res=... | a.cc: In function 'int main()':
a.cc:84:9: error: ambiguous overload for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'Int' {aka '__int128'})
84 | cout<<res<<endl;
| ~~~~^~~~~
| | |
| | Int {aka __int128}
| std::ostream {aka s... |
s624461426 | p01725 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
using namespace std;
typedef long long ll;
const ll MOD = 998244353;
const ll ... | a.cc: In function 'int main()':
a.cc:113:18: error: 'LLONG_MAX' was not declared in this scope
113 | ll ma = -LLONG_MAX;
| ^~~~~~~~~
a.cc:15:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
14 | #include<complex>
+++ |+#... |
s230872099 | p01726 | C++ | #define _CRT_SECURE_NO_WARNINGS
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(ll i=a; i<ll(b); i++)
#define rep(i,b) loop(i,0,b)
#define... | a.cc: In function 'int main()':
a.cc:105:19: error: 'e' was not declared in this scope
105 | rep(i,300010) e[
| ^
a.cc:106:12: error: expected primary-expression before 's'
106 | string s,t;
| ^
a.cc:106:11: error: expected ']' before 's'
106 | string s,t;
... |
s445886171 | p01726 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using... | a.cc: In function 'int main()':
a.cc:48:25: error: narrowing conversion of '1.000000007e+9' from 'double' to 'int' [-Wnarrowing]
48 | int mods[2]={1e9+7,1e9+9};
| ~~~^~
a.cc:48:31: error: narrowing conversion of '1.000000009e+9' from 'double' to 'int' [-Wnarrowing]
48 | ... |
s652391284 | p01726 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef unsigned slong long Hash;
long long mod = 1000000009;
template<class T>
class RollingHash{
public:
T src;
vector<Hash> harr,p;
vector<int> suffixArray;
RollingHash(T src,Hash w=8999):src(src){
p.resize(src.size()+1);
Hash sum = 0;
for(int i = 0 ; i < ... | a.cc:5:24: error: expected initializer before 'long'
5 | typedef unsigned slong long Hash;
| ^~~~
a.cc:12:16: error: 'Hash' was not declared in this scope
12 | vector<Hash> harr,p;
| ^~~~
a.cc:12:20: error: template argument 1 is invalid
12 | v... |
s920517072 | p01726 | C++ | #include <bits/stdc++.h>
using namespace std;
#define reep(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
vector<int> calc_z(string s) {
int n = s.size();
vector<int> z(n, 0);
int l = 0, r = 0;
for(int i = 1; i < s.size(); i++) {
if(i > r) {
l = r = i;
... | a.cc: In function 'int main()':
a.cc:38:9: error: 'nn' was not declared in this scope; did you mean 'yn'?
38 | nn = a.size();
| ^~
| yn
|
s626806505 | p01726 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long LL;
#ifdef BTK
#include<dvector.h>
#define DEBUG if(1)
#else
#define CIN_ONLY if(1)
struct cww{cww(){
CIN_ONLY{
ios::sync_with_stdio(false);cin.tie(0);
}
}}star;
#define DEBUG if(0)
#endif
#define fin "\n"
#define FOR(i,bg,ed) for(int i=(b... | a.cc: In function 'int main()':
a.cc:85:61: error: expected ',' or ';' before 'roll'
85 | H diff = (roll::mod+roll::get(0,i+1)-roll::get(0,i))roll::%mod;
| ^~~~
|
s845436295 | p01726 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using P=pair<ll,ll>;
#define MOD 1000000007ll
#define INF 1000000000ll
#define EPS 1e-10
#define FOR(i,n,m) for(ll i=n;i<(ll)m;i++)
#define REP(i,n) FOR(i,0,n)
#define DUMP(a) REP(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";els... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
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/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Ite... |
s018704861 | p01726 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using P=pair<ll,ll>;
#define MOD 1000000007ll
#define INF 1000000000ll
#define EPS 1e-10
#define FOR(i,n,m) for(ll i=n;i<(ll)m;i++)
#define REP(i,n) FOR(i,0,n)
#define DUMP(a) REP(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";els... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
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/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Ite... |
s888722709 | p01731 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)
#define DEBUG(x) cout<<#x<<": "<<x... | a.cc:22:13: error: 'vi link [1024]' redeclared as different kind of entity
22 | vi link[1024];
| ^
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/c++/14/csignal:42,
from /us... |
s771671519 | p01732 | C++ | #include <map>
#include <queue>
#include <algorithm>
#include <cstdio>
using namespace std;
#define INF 99999999
typedef int Weight;
struct Edge {
int src, dst;
Weight weight;
Edge(int src, int dst, Weight weight) :
src(src), dst(dst), weight(weight) { }
};
bool operator < (const Edge &e, const Edge &f) {
... | a.cc: In function 'int main()':
a.cc:52:19: error: 'strlen' was not declared in this scope
52 | l=strlen(buf);
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <cstdio>
+++ |+#include... |
s113601923 | p01732 | C++ | #include <unordered_map>
#include <queue>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
#define INF 99999999
typedef int Weight;
struct Edge {
int src, dst;
Weight weight;
Edge(int src, int dst, Weight weight) :
src(src), dst(dst), weight(weight) { }
};
bool operator < (const... | a.cc:24:38: error: 'map' has not been declared
24 | unordered_map<int,Weight> &dist, map<int,int> &prev) {
| ^~~
a.cc:24:41: error: expected ',' or '...' before '<' token
24 | unordered_map<int,Weight> &dist, map<int,int> &prev) {
| ... |
s381461906 | p01732 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef l... | a.cc: In function 'int main()':
a.cc:74:33: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std:... |
s203270234 | p01732 | C++ | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#define INF (1e9)
#define se second
#define f first
#define N 505
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
int dijkstra();
int w,h,n,sy,sx,gy,gx,ay,ax,t,c[4][N][N],d[N][N];
int main(){
string s;... | a.cc:70:5: error: redefinition of 'int w'
70 | int w,h,n,sy,sx,gy,gx,ay,ax,t,c[4][N][N],d[N][N];
| ^
a.cc:14:5: note: 'int w' previously declared here
14 | int w,h,n,sy,sx,gy,gx,ay,ax,t,c[4][N][N],d[N][N];
| ^
a.cc:70:7: error: redefinition of 'int h'
70 | int w,h,n,sy,sx,gy,gx,ay,ax,t,c[4]... |
s670636873 | p01732 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <complex>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <assert.h>
#include <array>
#include <cstdio>
#include <cstring>
#include <random>
... | /tmp/ccpLPg4e.o: in function `main':
a.cc:(.text+0x25e): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x2af): relocation truncated to fit: R_X86_64_PC32 against `.bss'
/tmp/ccpLPg4e.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x1042): relocation truncated to fit: R... |
s428304889 | p01733 | C++ | n = gets.to_i
c = Hash.new(0)
n.times do
x, y, w = gets.split.map(&:to_i)
c[[x,y]] = w
end
max = 0
c.each do |k,v|
sum = v + c[[k[0]+1, k[1]]] + c[[k[0], k[1]+1]] + c[[k[0]+1, k[1]+1]]
max = sum if sum > max
end
puts "#{max} / 1" | a.cc:1:1: error: 'n' does not name a type
1 | n = gets.to_i
| ^
|
s764142633 | p01733 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#define f first
#define s second
using namespace std;
int main()
{
int N,x[10000000],y[10000000],w;
vector<pair<pair<int,int>,int> >V;
cin>>N;
for(int i=0;i<N;i++){
cin>>x>>y>>w;
V.push_back(make_pair(make_pair(x,y),w));
}
//sort(V.begin(),V.e... | a.cc: In function 'int main()':
a.cc:14:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [10000000]')
14 | cin>>x>>y>>w;
| ~~~^~~
| | |
| | int [10000000]
| std::istream {aka std::basic_istream<char>}
In ... |
s332454045 | p01733 | C++ | #include <stdio.h>
#include <algorithm>
#include <tuple>
using namespace std;
int n, ret, res, ptr; tuple<int, int, int> d[100000];
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) scanf("%d%d%d", &get<0>(d[i]), &get<1>(d[i]), &get<2>(d[i]));
sort(d, d + n);
for (int i = 0; i < n; i++) {
res = get<2>(d[i... | a.cc: In function 'int main()':
a.cc:25:89: error: no match for 'operator-' (operand types are 'std::tuple<int, int, int>' and 'int')
25 | if (get<0>(d[ptr]) == get<0>(d[i]) + 1 && get<1>(d[ptr]) == get<1>(d[i] - 1)) res += get<2>(d[ptr]);
| ... |
s695304826 | p01733 | C++ | #include<bits/stdc++.h>
using namespace std;tuple<int,int,int>x[1<<17];int n,m,a,b,c,s,h,i,j,k;int dx[2][3]={{1,1,0},{0,-1,-1}},dy[2][3]={{0,1,1},{1,1,0}};main(){cin>>n;for(i=0;i<n;i++){cin>>a>>b>>c;x[i]=make_tuple(a,b,c);}sort(x,x+n);for(i=0;i<n;i++){for(h=0;h<2;h++){for(j=0;j<8;j++){s=0;for(k=0;k<3;k++){if((j/(1<<k))... | a.cc:2:132: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | using namespace std;tuple<int,int,int>x[1<<17];int n,m,a,b,c,s,h,i,j,k;int dx[2][3]={{1,1,0},{0,-1,-1}},dy[2][3]={{0,1,1},{1,1,0}};main(){cin>>n;for(i=0;i<n;i++){cin>>a>>b>>c;x[i]=make_tuple(a,b,c);}sort(x,x+n);for(i=0;i<n;i... |
s988156867 | p01733 | C++ | #include <bits/stdc++.h>
using namespace std;
//#define int long long
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define rept(i,n) rep(i,(n)+1)
#define repst(i,s,n) reps(i,s,(n)+1)
#define reprt(i,n,t) for(int (i)=(n);(i)>=(t);--(i))
#define repr(i,n) reprt(i,n,0)
#define each(itr,... | a.cc:78:67: error: macro "chmax" passed 4 arguments, but takes just 2
78 | chmax(r, t + p[{x[i],y[i]+1}] + p[{x[i]+1,y[i]+1}]);
| ^
a.cc:21:9: note: macro "chmax" defined here
21 | #define chmax(x,y) x=max(x,y)
| ... |
s670384355 | p01733 | C++ | #include <bits/stdc++.h>using namespace std;int main(){int N;cin >> N;map<pair<int, int>, int> mp;for (int i = 0, y, x, w; i < N; i++) cin >> y >> x >> w, mp[{y, x}] += w, mp[{y - 1, x}] += w, mp[{y, x - 1}] += w, mp[{y - 1, x - 1}] += w;int ans = 0;for (const auto& p : mp) ans = max(ans, p.second);cout << ans << " / "... | a.cc:1:31: warning: extra tokens at end of #include directive
1 | #include <bits/stdc++.h>using namespace std;int main(){int N;cin >> N;map<pair<int, int>, int> mp;for (int i = 0, y, x, w; i < N; i++) cin >> y >> x >> w, mp[{y, x}] += w, mp[{y - 1, x}] += w, mp[{y, x - 1}] += w, mp[{y - 1, x - 1}] += w;int ans = 0;... |
s571933089 | p01735 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Downloa... | a.cc: In function 'aa getans(int, const std::vector<Node>&, int, int)':
a.cc:43:43: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
43 | aa ret{ realvalue,1e9,-1e9 };
| ^~~
|
s778980278 | p01735 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Downloa... | a.cc: In function 'aa getans(int, const std::vector<Node>&, int, int)':
a.cc:43:43: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
43 | aa ret{ realvalue,1e9,-1e9 };
| ^~~
|
s198422773 | p01735 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Downloa... | a.cc: In function 'aa getans(int, const std::vector<Node>&, int, int)':
a.cc:43:43: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
43 | aa ret{ realvalue,1e9,-1e9 };
| ^~~
|
s041776251 | p01735 | C++ | #include <map>
#include <queue>
#include <vector>
#include <iostream>
using namespace std;
int n, p[109]; vector<int> G[109];
void calc_evaluation(int pos) {
if (G[pos].size() == 0) return;
p[pos] = -999999999;
for (int i : G[pos]) {
calc_evaluation(i);
p[pos] = max(p[pos], -p[i]);
}
}
map<vector<int>, int> dp1... | a.cc: In function 'void solve(int, int, int)':
a.cc:38:18: error: 'next_permutation' was not declared in this scope
38 | } while (next_permutation(perm.begin(), perm.end()));
| ^~~~~~~~~~~~~~~~
|
s842171072 | p01736 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,... | a.cc: In function 'Matrix operator*(const Matrix&, const Matrix&)':
a.cc:62:32: error: no matching function for call to 'fma(const __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>::value_type&, const __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>... |
s901232712 | p01736 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,... | a.cc: In function 'int rankMat(Matrix)':
a.cc:112:52: error: ambiguous overload for 'operator*' (operand types are 'll' {aka 'long long int'} and '__gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>::value_type' {aka 'Mod'})
112 | A[j][k] = -A[r][k] * A[j][i] + A[j][k];
a.cc:112:52: no... |
s731623500 | p01736 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,... | a.cc: In function 'Matrix operator*(const Matrix&, const Matrix&)':
a.cc:93:32: error: call of overloaded 'fma(const __gnu_cxx::__alloc_traits<std::allocator<Cyclic<2> >, Cyclic<2> >::value_type&, const __gnu_cxx::__alloc_traits<std::allocator<Cyclic<2> >, Cyclic<2> >::value_type&, __gnu_cxx::__alloc_traits<std::alloca... |
s211356279 | p01736 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,... | a.cc: In function 'Matrix operator*(const Matrix&, const Matrix&)':
a.cc:93:32: error: call of overloaded 'fma(const __gnu_cxx::__alloc_traits<std::allocator<Cyclic<2> >, Cyclic<2> >::value_type&, const __gnu_cxx::__alloc_traits<std::allocator<Cyclic<2> >, Cyclic<2> >::value_type&, __gnu_cxx::__alloc_traits<std::alloca... |
s785967341 | p01739 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
new Main().run();
}
void run() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[][] c = new int[n][n];
int[] excess = new in... | Main.java:144: error: ';' expected
for (int i = 0; i 8< n; ++i) {
^
Main.java:144: error: not a statement
for (int i = 0; i 8< n; ++i) {
^
Main.java:144: error: ')' expected
for (int i = 0; i 8< n; ++i) {
^
Main.java:144: error: ';' expected
for (i... |
s984281121 | p01739 | C++ | #include<iostream>
#include<map>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef int ll;
typedef pair<ll,ll> P;
const ll INF = 1e8;
struct edge{ll to,cap,cost,rev;};
ll V,E,tmpE;
vector<edge> g[1100];
ll dist[1100];
ll prevv[1100], preve[1100];
bool use[1100][1100];
void add_edge(ll... | a.cc: In function 'void add_edge(ll, ll, ll, ll)':
a.cc:20:53: warning: narrowing conversion of 'g[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'll' {aka 'int'} [-Wnarrowing]
20 | g[from].push_back((edge){to, cap, cost, g[to].size()});
| ... |
s911924603 | p01739 | C++ | #include<stdio.h>
#include<string.h>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
long long INF=99999999;
namespace MCF {
// required <string.h> <vector> <queue> <algorithm>
#define MAXN 1100
#define MAXM 1010000
#define wint int
#define cint long long
const wint wEP... | a.cc: In function 'int main()':
a.cc:107:40: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
107 | MCF::ae(i,g[i].first,INF,g[i].second);
| ^~~~~
a.cc:107:55: error: 'class std::vector<std::pair<int, int> >' has no membe... |
s688388493 | p01741 | C | #include <stdio.h>
#include <math.h>
int main(){
double d;
scanf("%lf",&d);
c=sqrt(d);
if(c<sqrt(d*d+1)&&c<d+1)c=d+1;
printf("%f\n",c);
return 0;
} | main.c: In function 'main':
main.c:6:9: error: 'c' undeclared (first use in this function)
6 | c=sqrt(d);
| ^
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
|
s096743640 | p01741 | C | #include <bits/stdc++.h>
using namespace std;
int main()
{
double d;
cin >> d;
double ans = max(d * sqrt(2), (int)d + 1.0);
printf("%.12f\n", ans);
}
| main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s605747655 | p01741 | C++ | #include<bits/stdc++.h>
using namespace std;double n;
main(){cin>>n;printf("%d9f\n",max(2,n*sqrt(2)));} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){cin>>n;printf("%d9f\n",max(2,n*sqrt(2)));}
| ^~~~
a.cc: In function 'int main()':
a.cc:3:34: error: no matching function for call to 'max(int, double)'
3 | main(){cin>>n;printf("%d9f\n",max(2,n*sqrt(2)));}
... |
s168540716 | p01741 | C++ | #include<bits/stdc++.h>
using namespace std;double n;
main(){cin>>n;printf("%d99f\n",max(2,n*sqrt(2)));} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){cin>>n;printf("%d99f\n",max(2,n*sqrt(2)));}
| ^~~~
a.cc: In function 'int main()':
a.cc:3:35: error: no matching function for call to 'max(int, double)'
3 | main(){cin>>n;printf("%d99f\n",max(2,n*sqrt(2)));}
... |
s404685155 | p01741 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
ld eps = 1e-9;
int main() {
ld d; cin >> d;
ld ans = d*sqrt(2);
for (int i = 0; i < d+eps; ++i) {
ld x = sqrt(d*d -... | a.cc: In function 'int main()':
a.cc:18:50: error: expected primary-expression before '<<' token
18 | cout << setprecision(22) << fixed<<ans<< << endl;
| ^~
|
s421559051 | p01741 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>
using namespace std;
#define int long long
#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n) n.begin(),n.end()
#define each(i,n) for(auto &i : n)
const int INF = 1e9;
signed main() {
... | a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before 'long'
11 | #define int long long
| ^~~~
a.cc:22:26: note: in expansion of macro 'int'
22 | long double ld = int(d);
| ^~~
a.cc:23:28: error: 'sqrt' was not declared in th... |
s157084043 | p01741 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>
using namespace std;
#define int long long
#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n) n.begin(),n.end()
#define each(i,n) for(auto &i : n)
const int INF = 1e9;
signed main() {
... | a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before 'long'
11 | #define int long long
| ^~~~
a.cc:22:26: note: in expansion of macro 'int'
22 | long double ld = int(d);
| ^~~
a.cc:23:28: error: 'sqrt' was not declared in th... |
s361972171 | p01741 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>
using namespace std;
#define int long long
#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n) n.begin(),n.end()
#define each(i,n) for(auto &i : n)
const int INF = 1e9;
signed main() {
... | a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before 'long'
11 | #define int long long
| ^~~~
a.cc:22:21: note: in expansion of macro 'int'
22 | double ld = int(d);
| ^~~
a.cc:23:28: error: 'sqrt' was not declared in this scope
... |
s386875015 | p01741 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>
using namespace std;
#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n) n.begin(),n.end()
#define each(i,n) for(auto &i : n)
const int INF = 1e9;
signed main() {
double d;
cin >> d;
... | a.cc: In function 'int main()':
a.cc:22:28: error: 'sqrt' was not declared in this scope
22 | auto ans = max(d * sqrt(2.0l), ld + 1.0l);
| ^~~~
|
s397223850 | p01741 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>
using namespace std;
#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n) n.begin(),n.end()
#define each(i,n) for(auto &i : n)
const int INF = 1e9;
signed main() {
double d;
cin >> d;
... | a.cc: In function 'int main()':
a.cc:22:30: error: 'sqrt' was not declared in this scope
22 | double ans = max(d * sqrt(2.0l), ld + 1.0l);
| ^~~~
|
s697484942 | p01741 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>
#include <cmath>
using namespace std;
#define int long long
#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n) n.begin(),n.end()
#define each(i,n) for(auto &i : n)
const int INF = 1e9;
... | a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before 'long'
12 | #define int long long
| ^~~~
a.cc:23:26: note: in expansion of macro 'int'
23 | long double ld = int(d);
| ^~~
|
s242724433 | p01741 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
int main()
{
double d;... | a.cc:38:5: error: redefinition of 'int main()'
38 | int main()
| ^~~~
a.cc:12:5: note: 'int main()' previously defined here
12 | int main()
| ^~~~
|
s887817366 | p01741 | C++ | #include <stdio.h>
#include <math.h>
main(){float f;scanf("%f", &f);printf("%.11f", max(f*sqrt(2),(int)(f+1));} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){float f;scanf("%f", &f);printf("%.11f", max(f*sqrt(2),(int)(f+1));}
| ^~~~
a.cc: In function 'int main()':
a.cc:3:48: error: 'max' was not declared in this scope; did you mean 'std::max'?
3 | main(){float f;sc... |
s174408969 | p01741 | C++ | #include <stdio.h>
#include <math.h>
#include <algorithm>
main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),(int)(f+1));} | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),(int)(f+1));}
| ^~~~
a.cc: In function 'int main()':
a.cc:4:56: error: no matching function for call to 'max(__gnu_cxx::__enable_if<true, double>::__type,... |
s236740799 | p01741 | C++ | #include <stdio.h>
#include <math.h>
#include <algorithm>
main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),ceil(f));} | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),ceil(f));}
| ^~~~
a.cc: In function 'int main()':
a.cc:4:56: error: no matching function for call to 'max(__gnu_cxx::__enable_if<true, double>::__type, fl... |
s649868677 | p01741 | C++ | #include<stdio.h>
#include<math.h>
main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}
| ^~~~
a.cc: In function 'int main()':
a.cc:3:65: error: no matching function for call to 'max(int, __gnu_cxx::__enable_if... |
s341343947 | p01741 | C++ | #include<stdio.h>
#include<math.h>
#include<algorithm>
main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);} | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}
| ^~~~
a.cc: In function 'int main()':
a.cc:4:65: error: no matching function for call to 'max(int, __gnu_cxx::__enable_if... |
s681948068 | p01741 | C++ | #include <stdio.h>
#include <cmath>
int main()
{
double d;
scanf("%lf", &d);
printf("%.12lf", max((int)d + 1 , d * sqrt(2.0)));
return 0;
} | a.cc: In function 'int main()':
a.cc:7:22: error: 'max' was not declared in this scope; did you mean 'std::max'?
7 | printf("%.12lf", max((int)d + 1 , d * sqrt(2.0)));
| ^~~
| std::max
In file included from /usr/include/c++/14/bits/specfun.h:43,
... |
s168133381 | p01741 | C++ | #include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main() {
double d;
double r = 2 / sqrt(2);
cin >> d;
int n = int(floor(d));
double ans;
cout << n << endl;
if (n == 0) {
ans = r * d;
} else if (d < sqrt(1 + n * n)){
ans = max(n + 1, r ... | a.cc: In function 'int main()':
a.cc:20:18: error: no matching function for call to 'max(int, double)'
20 | ans = max(n + 1, r * d);
| ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s903667128 | p01741 | C++ | if( d >= 1.0 && d<=sqrt(2)){
d = 2.0;
} else if ( d>=2.0&& d<=2.0*sprt(2)){
d = 4.0;
}else{
d *= sqrt(2);
}
cout << setprecision(10) << d << endl;
return 0;
}
| a.cc:1:5: error: expected unqualified-id before 'if'
1 | if( d >= 1.0 && d<=sqrt(2)){
| ^~
a.cc:3:7: error: expected unqualified-id before 'else'
3 | } else if ( d>=2.0&& d<=2.0*sprt(2)){
| ^~~~
a.cc:5:6: error: expected unqualified-id before 'else'
5 | }else{
| ... |
s016061978 | p01741 | C++ | #include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <typeinfo>
#include <numeric>
#include <functional>
#include <unordered_map>
#include <bitset>
... | a.cc: In function 'int main()':
a.cc:42:72: error: expected ')' before ';' token
42 | printf("%.11lf\n", max(((double)((int)d + 1)), d * 2.0 / sqrt(2.0));
| ~ ^
| ... |
s046578783 | p01741 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
double d;
cin >> d;
double ans = max(d * sqrt(2), (int)d + 1.0);
printf("%.12f\n", ans);
}
| a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:6:1: error: extended character is not valid in an identifier
6 | double d;
| ^
a.cc:6:1: error: extended character is not valid in an identifier
a.cc:6:1: error: extended character is not valid in an identif... |
s413310821 | p01741 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
double d;
cin >> d;
double ans = max(d * sqrt(2), (int)d + 1.0);
printf("%.12f\n", ans);
}
| a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:6:1: error: extended character is not valid in an identifier
6 | double d;
| ^
a.cc:6:1: error: extended character is not valid in an identifier
a.cc:6:1: error: extended character is not valid in an identif... |
s322041793 | p01741 | C++ | #include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
... | a.cc: In function 'int main()':
a.cc:35:43: error: expected primary-expression before 'long'
35 | cout << max(d + 1, d*sqrt(long double(2))) << endl;
| ^~~~
a.cc:38:34: error: expected primary-expression before 'long'
38 | cout << d *... |
s561104100 | p01741 | C++ | #include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
... | a.cc: In function 'int main()':
a.cc:34:53: error: expected primary-expression before 'long'
34 | cout << max((long double)(int)d + 1, d*sqrt(long double(2))) << endl;
| ^~~~
|
s048781360 | p01741 | C++ | #include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
... | a.cc: In function 'int main()':
a.cc:34:55: error: expected primary-expression before 'long'
34 | cout << max((long double)((int)d + 1), d*sqrt(long double(2))) << endl;
| ^~~~
|
s816048625 | p01742 | C++ | #include <string>
#include <iostream>
#define mod 1000000007
using namespace std;
int n, p[21], c[50][21], dp[50][51][21]; string s[50];
int solve(int l, int r, int k) {
if(r - l == 1) return p[c[l][k]];
if(dp[l][r][k]) return dp[l][r][k] - 1;
int dp2[51][27] = {0}; dp2[l][0] = 1;
for(int a = l + 1; a <= r; a++) {
... | a.cc: In function 'int solve(int, int, int)':
a.cc:16:73: error: invalid operands of types 'int*' and 'int' to binary 'operator%'
16 | dp2[a][b] += (dp[a][b] + 1LL * res * r) % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
| ... |
s759177010 | p01742 | C++ | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007LL
typedef long long ll;
int n;
ll dp[21][51][51][28];
string str[51];
ll solve(int v,int f,int t,int lb){
if(dp[v][f][t][lb]!=-1)return dp[v][f][t][lb];
if(f==t)return 1;
if(str[f].size()==v){
if(lb==0){
return solve(v,f+1,t,lb+1);
}
els... | a.cc: In function 'll solve(int, int, int, int)':
a.cc:25:32: error: 'k' was not declared in this scope
25 | if(str[k][v]!='?' && (str[k][v]-'a')!=(i-1))break;
| ^
|
s739936113 | p01743 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,a;
ll sum=0;
vector<int> t;
ll calc(ll a){
return a*(a-1)/2;
}
int main(){
cin>>n;
for(int i=0;i<n;i++){
cin>>a;
sum+=calc(a);
if(a>2)t.push_back(a);
}
sort(t.begin(),t.end());
priority_queue<ll> Q;
ll ans=0;
for(int ... | a.cc: In function 'int main()':
a.cc:24:15: error: no matching function for call to 'max(long long int, long long unsigned int)'
24 | ll cnt=max(0LL,(ll)t[i]-Q.size());
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-... |
s551294520 | p01743 | C++ | #include<bits/stdc++.h>
long long a[5],sum,n,p,i,b[4]={0,0,1,3};main(){std::cin>>n;for(i=0;i<n;i++){cin>>a[i];sum+=a[i];}sort(a,a+n);if(n<4){p=b[n];}if(n==4){if(sum<9){p=4;}else if(a[0]<3){p=5;}else{p=6;}}if(n==5){if(sum<12){p=6;}else if(a[1]<3){p=7;}else if(a[0]<3||a[3]<4){p=8;}else if(a[0]<4){p=9;}else{p=10;}}printf(... | a.cc:2:41: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | long long a[5],sum,n,p,i,b[4]={0,0,1,3};main(){std::cin>>n;for(i=0;i<n;i++){cin>>a[i];sum+=a[i];}sort(a,a+n);if(n<4){p=b[n];}if(n==4){if(sum<9){p=4;}else if(a[0]<3){p=5;}else{p=6;}}if(n==5){if(sum<12){p=6;}else if(a[1]<3){p=7... |
s564178687 | p01743 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s616801988 | p01743 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
ll n, sum = 0;
cin >> n;
vector<ll> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
a[i] = min(a[i], 5);
}
sort(a.begin(), a.end());
vector<ll> u, v;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j... | a.cc: In function 'int main()':
a.cc:13:27: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, int)'
13 | a[i] = min(a[i], 5);
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorith... |
s465759592 | p01743 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
int n,a[5],ans,p;
main(){
cin>>n;
for(int i=0;i<n;i++)cin>>a[i],ans+=a[i];
sort(a,a+n,greater<int>());
if(n==1)cout<<ans<<endl;
else if(n==2)cout<<ans-1<<endl;
else if(n==3)cout<<ans-3<<endl;
else if(n==4){
if(a[0]==2)cout<<ans-4<<endl... | a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:26:27: error: no matching function for call to 'min(long long int&, int)'
26 | else cout<<ans-6-min(a[4],4)<<endl;
| ~~~^~~~~~~~
I... |
s424772440 | p01744 | C++ | //2632.Dense Amidakuji.
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#define MAX_N 300000
#define INF 1145141919
int h, w, k, x, y;
vector<int>pos[MAX_N * 2], neg[MAX_N * 2];//-_,/
int amidakuji(int p) {
int H = 1, W = p;
while (H <= h) {
//(H+W)%2==0-->pos.
if ((H + W) % 2 == ... | a.cc: In function 'int amidakuji(int)':
a.cc:40:17: error: jump to label 'F'
40 | F:;
| ^
a.cc:21:38: note: from here
21 | goto F;
| ^
a.cc:23:29: note: crosses initialization of 'int q'
23 | ... |
s767214644 | p01747 | C++ | #include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
#pragma warning(disable : 4996)
#define PI 3.1415926535897932384626433832795L
using namespace std;
int N, X, Y;
bool check(vector<long double> x, vector<long double> y)
{
// Translation.
for (int i = 1; i < N; i++)
{
x[i] -= x[0];
... | a.cc: In function 'bool check(std::vector<long double>, std::vector<long double>)':
a.cc:34:71: error: expected ']' before ')' token
34 | long double ang = PI / 2.0L - atan2l(y[i + 1], x[i + 1);
| ^
| ... |
s611624185 | p01747 | C++ | #include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
#define PI 3.1415926535897932384626433832795L
using namespace std;
int N, X, Y;
vector<long double> x;
vector<long double> y;
int main()
{
scanf("%d", &N);
for (int i = 0; i < N; i++)
{
scanf("%d", &X);
s... | a.cc: In function 'int main()':
a.cc:64:32: error: 'n' was not declared in this scope
64 | for(int j = i + 1; j < n; j++)
| ^
a.cc:72:21: error: redeclaration of 'long double ang'
72 | long double ang = -atan2l(y[i + 1], x[i + 1]);
| ^... |
s746358794 | p01747 | C++ | #include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
#define PI 3.1415926535897932384626433832795L
using namespace std;
int N, X, Y;
vector<long double> x;
vector<long double> y;
int main()
{
scanf("%d", &N);
for (int i = 0; i < N; i++)
{
scanf("%d", &X);
s... | a.cc: In function 'int main()':
a.cc:64:32: error: 'n' was not declared in this scope
64 | for(int j = i + 1; j < n; j++)
| ^
|
s790875706 | p01747 | C++ |
import java.awt.geom.Line2D;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
public class Main {
static InputStream is;
static PrintWriter out;
static String IN... | a.cc:112:25: error: stray '@' in program
112 | @Override
| ^
a.cc:2:1: error: 'import' does not name a type
2 | import java.awt.geom.Line2D;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not nam... |
s463656845 | p01747 | C++ | #include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-12;
bool lt(double a, double b){
return a < b - EPS;
}
bool mdeq(double a, double b){
return abs(a - b) < EPS;
}
void moveToO(int target, vector<complex<double>>& pts){
complex<double> amount = pts[target];
for(complex<double>& p: pts){
... | a.cc:98:1: error: 'C' does not name a type
98 | C++
| ^
|
s380730489 | p01748 | C++ | #include<cstdio>
#include<vector>
#include<set>
#include<utility>
#include<algorithm>
using namespace std;
typedef pair<int,int> P;
const int MN=200200;
const int LOG_MN=19;
int N;
vector<int> G[MN];//only edges to leaf
vector<int> cost[MN];
int par[MN][LOG_MN];
long long dis[MN];
int dep[MN];
int pre[MN],pos[MN]... | a.cc: In function 'void dfs(int)':
a.cc:36:20: error: too many arguments to function 'void dfs(int)'
36 | dfs(u,v,d+co,dep+1);
| ~~~^~~~~~~~~~~~~~~~
a.cc:27:6: note: declared here
27 | void dfs(int v){
| ^~~
|
s156918337 | p01748 | C++ | #include<cstdio>
#include<vector>
#include<set>
#include<utility>
#include<algorithm>
using namespace std;
typedef pair<int,int> P;
const int MN=200200;
const int LOG_MN=19;
int N;
vector<int> G[MN];//only edges to leaf
vector<int> cost[MN];
int par[MN][LOG_MN];
long long dis[MN];
int dep[MN];
int pre[MN],pos[MN]... | a.cc: In function 'void dfs(int)':
a.cc:36:20: error: too many arguments to function 'void dfs(int)'
36 | dfs(u,v,d+co,dep+1);
| ~~~^~~~~~~~~~~~~~~~
a.cc:27:6: note: declared here
27 | void dfs(int v){
| ^~~
|
s343784872 | p01751 | Java | import java.util.Scanner;
public class Problem2639 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int t = 0;
if (a + b == 60) {
System.out.println(-1);
return;
}
for (;;) {
int w1 = t;
... | Main.java:3: error: class Problem2639 is public, should be declared in a file named Problem2639.java
public class Problem2639 {
^
1 error
|
s695445065 | p01751 | Java | import java.util.Scanner;
public class Problem2639 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int t = 0;
if (a + b == 60) {
System.out.println(-1);
return;
}
/*
*
* [0 << 50 >> 50] 40... | Main.java:3: error: class Problem2639 is public, should be declared in a file named Problem2639.java
public class Problem2639 {
^
1 error
|
s951596459 | p01751 | Java | import java.util.Scanner;
public class Problem2639 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int t = 0;
/*
*
* [0 << 50 >> 50] 40 [90 << 50 >> 140] 50 [190 << 5 >> 95] 40 [135 <<5>> 140] 40 [1... | Main.java:3: error: class Problem2639 is public, should be declared in a file named Problem2639.java
public class Problem2639 {
^
1 error
|
s795220842 | p01751 | C++ | #include <iostream>
using namespace std;
cout << "10" << endl; | a.cc:4:1: error: 'cout' does not name a type
4 | cout << "10" << endl;
| ^~~~
|
s971212014 | p01751 | C++ | define rep(i,a) for(int i = 0 ; i < a ; i ++)
int main(void){
int a,b,c;
cin>>a>>b>>c;
if(a>=c){
cout<<c<<endl;
return 0;
}
int n = 10000;
int sum = c;
int cnt = 0;
while(n--){
//cout<<cnt<<" "<<sum<<" "<<cnt+b<<endl;
while(cnt > sum)sum += 60;
if(cnt <= sum && sum <= cnt + b){... | a.cc:1:1: error: 'define' does not name a type
1 | define rep(i,a) for(int i = 0 ; i < a ; i ++)
| ^~~~~~
a.cc:1:33: error: 'i' does not name a type
1 | define rep(i,a) for(int i = 0 ; i < a ; i ++)
| ^
a.cc:1:41: error: 'i' does not name a type
1 | define rep(i,a... |
s745101550 | p01751 | C++ | #include<iostream>
int main(){
int n,m,b,c;
std::cin>>n>>m>>b;c=b;
for(int i=0;i<99;i++){
if(c%(n+m)<=n){goto a;}
c+=60;
}
c=-1;
a:
std::cout<<c<<endl;return 0;} | a.cc: In function 'int main()':
a.cc:11:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
11 | std::cout<<c<<endl;return 0;}
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/os... |
s829689291 | p01751 | C++ | #include<iostream>
using namespace std;
int main(){
int n,m,b,c,d;
bool a=false;
cin>>n>>m>>b;c=b;
for(int i=0;i<250000000;i++){
if(c%(n+m)<=n && a==false){a=true;d=i;}
c+=60;
}
}
if(a==false){
c=-1;
}
else{
c=b+d*60;
}
cout<<c<<endl;
... | a.cc:12:5: error: expected unqualified-id before 'if'
12 | if(a==false){
| ^~
a.cc:15:5: error: expected unqualified-id before 'else'
15 | else{
| ^~~~
a.cc:18:5: error: 'cout' does not name a type
18 | cout<<c<<endl;
| ^~~~
a.cc:19:5: error: expected unqualified-id be... |
s132348911 | p01751 | C++ | #include<iostream>
main(){int n,m,c,i;std::cin>>n>>m>>c;for(i=0;i<99;i++){
if(c%(n+m)<=n)goto a;
c+=60;
}c=-1;
a:
std::cout<<c<<"\n" | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){int n,m,c,i;std::cin>>n>>m>>c;for(i=0;i<99;i++){
| ^~~~
a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' at end of input
7 | std::cout<<c<<"\n"
| ^
| ... |
s442735156 | p01751 | C++ | int n,m,c,i;
main(){scanf("%d%d%d",&n,&m,&c);for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);} | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){scanf("%d%d%d",&n,&m,&c);for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:8: error: 'scanf' was not declared in this scope
2 | main(){scanf(... |
s282239597 | p01751 | C++ | #import<iostream>
n,m,c,i;main(){std::cin<<n<<m<<c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc:2:1: error: 'n' does not name a type
2 | n,m,c,i;main(){std::cin<<n<<m<<c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);}
| ^
a.cc:2:9: warning: ISO C++ forbids declar... |
s119666122 | p01751 | C++ | #import<iostream>
int n,m,c,i;main(){std::cin<<n<<m<<c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc:2:13: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int n,m,c,i;main(){std::cin<<n<<m<<c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);}
... |
s392092821 | p01751 | C++ | #include<iostream>
int n,m,c,i;main(){std::cin<<n<<m<<c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);} | a.cc:2:13: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int n,m,c,i;main(){std::cin<<n<<m<<c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:28: error: no match for 'operator<<' (operand types ... |
s058674153 | p01751 | C++ | #import<iostream>
n,m,c,i;main(){std::cin>>n>>m>>c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc:2:1: error: 'n' does not name a type
2 | n,m,c,i;main(){std::cin>>n>>m>>c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);}
| ^
a.cc:2:9: warning: ISO C++ forbids declar... |
s380759466 | p01751 | C++ | #include<iostream>
n,m,c,i;main(){std::cin>>n>>m>>c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);} | a.cc:2:1: error: 'n' does not name a type
2 | n,m,c,i;main(){std::cin>>n>>m>>c;for(i=0;i<99;i++){if(c%(n+m)<=n)goto a;c+=60;}c=-1;a:printf("%d\n",c);}
| ^
a.cc:2:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | n,m,c,i;main(){std::cin>>n>>m>>c;for(i=0;i<99;i++){if(c%(n+m)... |
s452016582 | p01751 | C++ | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <sstream>
#include <numeric>
#include <set>
#include <map>
//#include <bits/stdc++.h>
#define rep(i, j) for(int i = 0; i < j; i++)
#define all(i) i.begin(), i.end()
#define ll long long
#define bl... | a.cc: In function 'int main()':
a.cc:29:20: error: expected unqualified-id before 'or' token
29 | int i = 1, or = 0;
| ^~
a.cc:39:31: error: expected primary-expression before 'or' token
39 | if (i == a && or == 0){ i = 0; or = 1; }
| ... |
s190813861 | p01751 | C++ | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <sstream>
#include <numeric>
#include <set>
#include <map>
//#include <bits/stdc++.h>
#define rep(i, j) for(int i = 0; i < j; i++)
#define all(i) i.begin(), i.end()
#define ll long long
#define bl... | a.cc: In function 'int main()':
a.cc:29:20: error: expected unqualified-id before 'or' token
29 | int i = 1, or = 0;
| ^~
a.cc:39:31: error: expected primary-expression before 'or' token
39 | if (i == a && or == 0){ i = 0; or = 1; }
| ... |
s012764618 | p01751 | C++ | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <sstream>
#include <numeric>
#include <set>
#include <map>
//#include <bits/stdc++.h>
#define rep(i, j) for(int i = 0; i < j; i++)
#define all(i) i.begin(), i.end()
#define ll long long
#define bl... | a.cc: In function 'int main()':
a.cc:29:20: error: expected unqualified-id before 'or' token
29 | int i = 1, or = 0;
| ^~
a.cc:39:31: error: expected primary-expression before 'or' token
39 | if (i == a && or == 0){ i = 0; or = 1; }
| ... |
s178250462 | p01751 | C++ | def solve(a, b, c):
l = 0; r = a;
for t in range(114514):
t = l // 60
p = 60*t + c
if l <= p <= r:
print(p)
exit()
l = r + b
r = l + a
print(-1)
a, b, c = map(int, input().split())
solve(a,b,c) | a.cc:1:1: error: 'def' does not name a type
1 | def solve(a, b, c):
| ^~~
a.cc:2:12: error: 'r' does not name a type
2 | l = 0; r = a;
| ^
a.cc:3:5: error: expected unqualified-id before 'for'
3 | for t in range(114514):
| ^~~
|
s806071347 | p01751 | C++ | def solve(a, b, c):
l = 0; r = a;
for t in range(80):
t = l // 60
p = 60*t + c
if l <= p <= r:
print(p)
exit()
l = r + b
r = l + a
print(-1)
a, b, c = map(int, input().split())
solve(a,b,c) | a.cc:1:1: error: 'def' does not name a type
1 | def solve(a, b, c):
| ^~~
a.cc:2:12: error: 'r' does not name a type
2 | l = 0; r = a;
| ^
a.cc:3:5: error: expected unqualified-id before 'for'
3 | for t in range(80):
| ^~~
|
s240751047 | p01751 | C++ | // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecis... | a.cc: In function 'void solve()':
a.cc:43:9: error: expected initializer before '+=' token
43 | int b += a;
| ^~
|
s856451698 | p01751 | C++ | #include<iostream>
using namespace std;
//??????????????§
int a,b,c;
//???????§?????????????
int start;
//????????£?????????
int time;
//?????????????????????????????????
bool can;
int main() {
//??\???
cin>>a>>b>>c;
//?????????
can=false;
start=0;
time=0;
do {
//????????????????????????
if(start<=c &... | a.cc:11:5: error: 'int time' redeclared as different kind of entity
11 | int time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s134313298 | p01752 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,b) for(int i=0;i<(b);++i)
typedef pair<int,int> pii;
int h,w;
int dx[]={0,1,0,-1};
int dy[]={1,0,-1,0};
int dp[55][55][4];
vector<string> v;
bool check(int a,int b){
if(0<=a&&a<h&&0<=b&&b<w) return true;
return false;
}
int foo(int a,int b,int c){
... | a.cc: In function 'int main()':
a.cc:38:10: error: 'i' was not declared in this scope
38 | reep(i,1,h+1){
| ^
a.cc:38:5: error: 'reep' was not declared in this scope; did you mean 'rep'?
38 | reep(i,1,h+1){
| ^~~~
| rep
|
s625280951 | p01752 | C++ | #include <iostream>
#include <vector>
using namespace std;
constexpr int MAX_SIZE = 50;
constexpr int dx[] = {0, 1, 0, -1};
constexpr int dy[] = {-1, 0, 1, 0};
bool visited[MAX_SIZE + 2][MAX_SIZE + 2];
bool used[MAX_SIZE + 2][MAX_SIZE + 2][4];
int solve() {
int dir[128];
memset(dir, -1, sizeof(dir));
dir['^'] = 0... | a.cc: In function 'int solve()':
a.cc:14:9: error: 'memset' was not declared in this scope
14 | memset(dir, -1, sizeof(dir));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector>
+++ |+#include <c... |
s788946040 | p01752 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int N,M;
cin>>N>>M;
char g[52][53];
fill(g[0],g[52],'#');
int y,x,d;
for(int i=1;i<=N;i++){
for(int j=1;j<=M;j++){
cin>>g[i][j];
if(g[i][j]=='^'){
d=0;
y=i;
x=j;
}else if(g[i][j]=='>'){
d=1;
y=i;
x=j;
... | a.cc: In function 'int main()':
a.cc:36:17: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
36 | if(u[y][x][d]++)break;
| ~~~~~~~~~^
a.cc:53:9: error: invalid conversion from 'const int*' to 'int' [-fpermissive]
53 | y=dy;
| ^~
| |
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.