submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s238157441
p00072
C++
#include <queue> #include <vector> #include <iostream> #include <algorithm> #define WHITE 0 #define GRAY 1 #define BLACK 2 #define INF 1000000000000000000LL using namespace std; long long prim(int V, vector<pair<long long, long long>> X[]) { queue<int> Q; int dist[100], color[100]; for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; } dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0)); while (!Q.empty()) { pair<long long, long long>pa = Q.top(); Q.pop(); long long a1 = pa.first, a2 = pa.second; color[a2] = BLACK; for (int i = 0; i < X[a2].size(); i++) { long long to = X[a2][i].first, leng = X[a2][i].second; if (dist[to] > leng && color[to] < BLACK) { dist[to] = leng; Q.push(make_pair(dist[to], to)); } } } long long sum = 0; for (int i = 0; i < V; i++) { sum += dist[i]; }//0-indexed return sum; } int n, m, u, v, w; vector<pair<long long, long long> > g[100]; int main() { while(cin >> n >> m) { for(int i = 0; i < n; i++) g[i].clear(); for(int i = 0; i < m; i++) { scanf("%d,%d,%d", u, v, w); g[u].push_back(make_pair(v, w / 100 - 1)); g[v].push_back(make_pair(u, w / 100 - 1)); } cout << prim(n, g) << endl; } }
a.cc: In function 'long long int prim(int, std::vector<std::pair<long long int, long long int> >*)': a.cc:8:13: warning: overflow in conversion from 'long long int' to 'int' changes value from '1000000000000000000' to '-1486618624' [-Woverflow] 8 | #define INF 1000000000000000000LL | ^~~~~~~~~~~~~~~~~~~~~ a.cc:12:49: note: in expansion of macro 'INF' 12 | for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; } | ^~~ a.cc:13:45: error: no matching function for call to 'std::queue<int>::push(std::pair<int, int>)' 13 | dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0)); | ~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/queue:66, from a.cc:1: /usr/include/c++/14/bits/stl_queue.h:283:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]' 283 | push(const value_type& __x) | ^~~~ /usr/include/c++/14/bits/stl_queue.h:283:30: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'const std::queue<int>::value_type&' {aka 'const int&'} 283 | push(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_queue.h:288:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]' 288 | push(value_type&& __x) | ^~~~ /usr/include/c++/14/bits/stl_queue.h:288:25: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::queue<int>::value_type&&' {aka 'int&&'} 288 | push(value_type&& __x) | ~~~~~~~~~~~~~^~~ a.cc:15:50: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'? 15 | pair<long long, long long>pa = Q.top(); Q.pop(); | ^~~ | pop a.cc:20:56: error: no matching function for call to 'std::queue<int>::push(std::pair<int, long long int>)' 20 | dist[to] = leng; Q.push(make_pair(dist[to], to)); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_queue.h:283:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]' 283 | push(const value_type& __x) | ^~~~ /usr/include/c++/14/bits/stl_queue.h:283:30: note: no known conversion for argument 1 from 'std::pair<int, long long int>' to 'const std::queue<int>::value_type&' {aka 'const int&'} 283 | push(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/stl_queue.h:288:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; value_type = int]' 288 | push(value_type&& __x) | ^~~~ /usr/include/c++/14/bits/stl_queue.h:288:25: note: no known conversion for argument 1 from 'std::pair<int, long long int>' to 'std::queue<int>::value_type&&' {aka 'int&&'} 288 | push(value_type&& __x) | ~~~~~~~~~~~~~^~~
s774757664
p00072
C++
#include <queue> #include <vector> #include <iostream> #include <algorithm> #define WHITE 0 #define GRAY 1 #define BLACK 2 #define INF 1000000000000000000LL using namespace std; long long prim(int V, vector<pair<long long, long long>> X[]) { queue<pair<long long, long long> > Q; long long dist[100], color[100]; for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; } dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0)); while (!Q.empty()) { pair<long long, long long>pa = Q.top(); Q.pop(); long long a1 = pa.first, a2 = pa.second; color[a2] = BLACK; for (int i = 0; i < X[a2].size(); i++) { long long to = X[a2][i].first, leng = X[a2][i].second; if (dist[to] > leng && color[to] < BLACK) { dist[to] = leng; Q.push(make_pair(dist[to], to)); } } } long long sum = 0; for (int i = 0; i < V; i++) { sum += dist[i]; }//0-indexed return sum; } int n, m, u, v, w; vector<pair<long long, long long> > g[100]; int main() { while(cin >> n >> m) { for(int i = 0; i < n; i++) g[i].clear(); for(int i = 0; i < m; i++) { scanf("%d,%d,%d", u, v, w); g[u].push_back(make_pair(v, w / 100 - 1)); g[v].push_back(make_pair(u, w / 100 - 1)); } cout << prim(n, g) << endl; } }
a.cc: In function 'long long int prim(int, std::vector<std::pair<long long int, long long int> >*)': a.cc:15:50: error: 'class std::queue<std::pair<long long int, long long int> >' has no member named 'top'; did you mean 'pop'? 15 | pair<long long, long long>pa = Q.top(); Q.pop(); | ^~~ | pop
s227415759
p00072
C++
#include <iostream> #include <array> #include <algorithm> #include <cstdlib> using namespace std; constexpr int MAX_N = 100; constexpr int MAX_M = MAX_N * MAX_N; int par[MAX_N]; int myrank[MAX_N]; int n, m; struct edge { int a, b, d; bool operator<(const edge &r) { return d < r.d; } }; array<edge, MAX_M> e; // Union Find Tree????????????????????? //????????¶?????§??????????????????????????§??? //?????¨??????????´??????????????????? void init() { for (int i = 0; i < MAX_N; i++) { par[i] = i; myrank[i] = 0; } } // x?????????????´?????±??????????????????£??¨???????????? int find(int x) { if (par[x] == x) { return x; } else { return par[x] = find(par[x]); } } // x,y????±?????????????????????¨?????? bool unite(int x, int y) { x = find(x); y = find(y); if (x == y) return false; if (myrank[x] < myrank[y]) { par[x] = y; } else { par[y] = x; if (myrank[x] == myrank[y]) myrank[x]++; } return true; } int main() { int count, t; while (cin >> n, n) { cin >> m; init(); t = 0; for (int i = 0; i < m; i++) scanf("%d,%d,%d", &(e[i].a), &(e[i].b), &(e[i].d)); sort(e.begin(), e.begin() + m);?\ for (int i = 0; i < m; ++i) { if (unite(e[i].a, e[i].b)) t += e[i].d - 100 ; } cout << t / 100 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:73:36: error: expected primary-expression before '?' token 73 | sort(e.begin(), e.begin() + m);?\ 74 | for (int i = 0; i < m; ++i) { a.cc:74:5: error: expected primary-expression before 'for' 74 | for (int i = 0; i < m; ++i) { | ^~~ a.cc:74:1: error: expected ':' before 'for' 74 | for (int i = 0; i < m; ++i) { | ^ ~~~ | : a.cc:74:5: error: expected primary-expression before 'for' 74 | for (int i = 0; i < m; ++i) { | ^~~ a.cc:74:21: error: 'i' was not declared in this scope 74 | for (int i = 0; i < m; ++i) { | ^
s393109156
p00072
C++
#include "bits/stdc++.h" using namespace std; #define int long long #define DEBUG 0 #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--) #define all(a) (a).begin(),(a).end() #define dump(o) if(DEBUG){cerr<<#o<<" "<<o<<endl;} #define dumpc(o) if(DEBUG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; static const int MOD = 1e9 + 7; //??¶?´?????????£???????????? int:INF ll:INFL #define INFG INFL using Weight = ll;//int; class Edge { public: int s; //source int d; //destination Weight w; //weight Edge(int s = 0, int d = 0, Weight w = INFG) : s(s), d(d), w(w) {}; bool operator<(const Edge &e)const { return w > e.w; } }; using Edges = vector<Edge>; //???????????\: g[u].push_back(Edge(u, v, c)); //????????¨???????????????????????°??????????????\????????????????????? using Graph = vector<Edges>; using Array = vector<Weight>; using Matrix = vector<Array>; //?????¢?´¢, ??¢?´¢???, ??¢?´¢??? enum { WHITE, GRAY, BLACK }; //?´?????????????????§???? //Union-Find??¨ struct UnionFind { vector<int> p; //parent int s; //size ???????????° UnionFind(int n) :p(n, -1), s(n) {} bool unite(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (size(x) < size(y)) swap(x, y); p[x] += p[y]; p[y] = x; s--; return true; } bool same(int x, int y) { return root(x) == root(y); } int root(int x) { return p[x] < 0 ? x : p[x] = root(p[x]); } //?????????????´???° int size(int x) { return -p[root(x)]; } }; //????°???¨?????¨ //Kruskal O(|E|log|E|) pair<Weight, Edges> kruskal(const Graph &g) { UnionFind UF(g.size()); Edges es; for (int i = 0; i < g.size(); i++) for (auto &e : g[i]) es.emplace_back(e); sort(es.begin(), es.end()); Weight total = 0; Edges T; for (auto &e : es) if (!UF.same(e.s, e.d)) { T.push_back(e); total += e.w; UF.unite(e.s, e.d); } return make_pair(total, T); } //????°???¨?????¨ //Prim O(ElogV) //r????????°?????????????????????????±? //Edge??? bool operator<(const Edge &e)const { return w > e.w; } ???????????????????????? pair<Weight, Edges> prim(const Graph &g, int r = 0) { Edges T; Weight total = 0; vector<int> v(g.size()); priority_queue <Edge> q; q.push(-1, r, 0); while (q.size()) { Edge e = q.top(); q.pop(); if (v[e.d]) continue; v[e.d] = true; total += e.w; if (e.s != -1) T.push_back(e); for (auto &f : g[e.d]) if (!v[f.d]) q.push(f); } return make_pair(total, T); } signed main() { for (int n; cin >> n&&n;) { int m; cin >> m; Graph g(n); rep(i, 0, n) { char c; int a, b, d; cin >> a >> c >> b >> c >> d; g[a].push_back(Edge(a, b, d)); g[b].push_back(Edge(b, a, d)); } pair<Weight, Edges> k = prim(g, 0); cout << k.first / 100 - k.second.size() << endl; } return 0; }
a.cc: In function 'std::pair<long long int, std::vector<Edge> > prim(const Graph&, long long int)': a.cc:78:15: error: no matching function for call to 'std::priority_queue<Edge>::push(int, long long int&, int)' 78 | q.push(-1, r, 0); | ~~~~~~^~~~~~~~~~ In file included from /usr/include/c++/14/queue:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157, from a.cc:1: /usr/include/c++/14/bits/stl_queue.h:736:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = Edge; _Sequence = std::vector<Edge>; _Compare = std::less<Edge>; value_type = Edge]' 736 | push(const value_type& __x) | ^~~~ /usr/include/c++/14/bits/stl_queue.h:736:7: note: candidate expects 1 argument, 3 provided /usr/include/c++/14/bits/stl_queue.h:744:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = Edge; _Sequence = std::vector<Edge>; _Compare = std::less<Edge>; value_type = Edge]' 744 | push(value_type&& __x) | ^~~~ /usr/include/c++/14/bits/stl_queue.h:744:7: note: candidate expects 1 argument, 3 provided
s176260806
p00072
C++
#include<iostream> #include<string> #include<cmath> #include<queue> #include<vector> #include<functional> using namespace std; struct P { int from, to, cost; }; int parent[10000]; int root(int x) { if (parent[x] == x) return x; return parent[x] = root(parent[x]); } void unite(int x, int y) { x = parent[x]; y = parent[y]; parent[x] = y; } bool same(int x, int y) { return root(x) == root(y); } bool operator<(P a, P b) { return a.cost < b.cost; } bool operator>(P a, P b) { return a.cost > b.cost; } int main() { int n, m; while (cin >> n&&n != 0) { cin >> m; priority_queue<P, vector<P>, greater<P>>p; int a, b, c; for (int i = 0; i < m; i++) { scanf_s("%d,%d,%d", &a, &b, &c); p.push(P{ a,b,c }); } for (int i = 0; i < n; i++) parent[i] = i; int d = 0,sum=0; while (d != n - 1) { P t = p.top(); p.pop(); if (!same(t.from, t.to)) { unite(t.from, t.to); d++; sum += t.cost; } } sum /= 100; sum = sum - n + 1; cout << sum << endl; } }
a.cc: In function 'int main()': a.cc:37:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 37 | scanf_s("%d,%d,%d", &a, &b, &c); | ^~~~~~~ | scanf
s737035658
p00072
C++
#include<iostream> #include<string> #include<cmath> #include<queue> #include<vector> #include<functional> using namespace std; struct P { int from, to, cost; }; int parent[10000]; int root(int x) { if (parent[x] == x) return x; return parent[x] = root(parent[x]); } void unite(int x, int y) { x = parent[x]; y = parent[y]; parent[x] = y; } bool same(int x, int y) { return root(x) == root(y); } bool operator<(P a, P b) { return a.cost < b.cost; } bool operator>(P a, P b) { return a.cost > b.cost; } int main() { int n, m; while (cin >> n&&n != 0) { cin >> m; priority_queue<P, vector<P>, greater<P>>p; int a, b, c; for (int i = 0; i < m; i++) { scanf_s("%d,%d,%d", &a, &b, &c); p.push(P{ a,b,c }); } for (int i = 0; i < n; i++) parent[i] = i; int d = 0,sum=0; while (d != n - 1) { P t = p.top(); p.pop(); if (!same(t.from, t.to)) { unite(t.from, t.to); d++; sum += t.cost; } } sum /= 100; sum = sum - n + 1; cout << sum << endl; } }
a.cc: In function 'int main()': a.cc:37:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 37 | scanf_s("%d,%d,%d", &a, &b, &c); | ^~~~~~~ | scanf
s504975383
p00072
C++
#include<iostream> #include<string> #include<cmath> #include<queue> #include<vector> #include<functional> using namespace std; struct P { int from, to, cost; }; int parent[10000]; int root(int x) { if (parent[x] == x) return x; return parent[x] = root(parent[x]); } void unite(int x, int y) { x = parent[x]; y = parent[y]; parent[x] = y; } bool same(int x, int y) { return root(x) == root(y); } bool operator<(P a, P b) { return a.cost < b.cost; } bool operator>(P a, P b) { return a.cost > b.cost; } int main() { int n, m; while (cin >> n&&n != 0) { cin >> m; priority_queue<P, vector<P>, greater<P>>p; int a, b, c; for (int i = 0; i < m; i++) { scanf_s("%d,%d,%d", &a, &b, &c); p.push(P{ a,b,c }); } for (int i = 0; i < n; i++) parent[i] = i; int d = 0,sum=0; while (d != n - 1) { P t = p.top(); p.pop(); if (!same(t.from, t.to)) { unite(t.from, t.to); d++; sum += t.cost; } } sum /= 100; sum = sum - n + 1; cout << sum << endl; } }
a.cc: In function 'int main()': a.cc:37:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 37 | scanf_s("%d,%d,%d", &a, &b, &c); | ^~~~~~~ | scanf
s050738617
p00072
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<string> #include<queue> #include<vector> #include<functional> #include<cmath> #include<map> #include<stack> #include<set> #include<numeric> #include<limits> #include<iterator> #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ll, char> plc; int par[110], rk[110]; void init(int n) { for (int i = 1; i <= n; i++) { par[i] = i; rk[i] = 0; } } int find(int x) { if (par[x] == x)return x; else return par[x] = find(par[x]); } void unite(int x, int y) { x = find(x); y = find(y); if (x == y)return; if (rk[x] < rk[y]) par[x] = y; else { par[y] = x; if (rk[x] == rk[y])rk[x]++; } } bool same(int x, int y) { return find(x) == find(y); } struct edge { int u, v, cost; }; bool comp(const edge& e1, const edge& e2) { return e1.cost < e2.cost; } edge es[110]; int n, m; int kruskal() { sort(es, es + m, comp); init(n); ll res = 0; for (int i = 0; i < m; i++) { edge e = es[i]; if (!same(e.u, e.v)) { unite(e.u, e.v); res += (e.cost) / 100 - 1; } } return res; } int main() { while (cin >> n, n) { cin >> m; for (int i = 0; i < m; i++) { int a, b, d; scanf_s("%d,%d,%d", &a, &b, &d); es[i].u = a, es[i].v = b, es[i].cost = d; } cout << kruskal() << endl; } return 0; }
a.cc: In function 'int main()': a.cc:88:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 88 | scanf_s("%d,%d,%d", &a, &b, &d); | ^~~~~~~ | scanf
s388457561
p00072
C++
using namespace std; #define rep(i, n) for ( int i = 0; i < n; i++) #define MAX 100 #define INFTY (1<<21) int G[MAX][MAX], n; void prim(){ int D[MAX], V[MAX], P[MAX], sum = 0; rep(i, n) { D[i] = INFTY; V[i] = 0; } D[0] = 0; while(1){ int u, minv = INFTY; rep(i, n) if ( !V[i] && minv > D[i]) { minv = D[i], u = i; } if ( minv == INFTY ) break; V[u] = 1; if ( u ) sum += G[u][P[u]]; rep(v, n){ if ( !V[v] && G[u][v] < D[v] ){ D[v] = G[u][v]; P[v] = u; } } } cout << sum<< endl; } main(){ int m, s, t, c; char ch; while( cin >> n >> m && n ){ rep(i, n) rep(j, n) G[i][j] = INFTY; rep(i, m) { cin >> s >> ch >> t >> ch >> c; G[s][t] = G[t][s] = c/100-1; } prim(); } }
a.cc: In function 'void prim()': a.cc:28:5: error: 'cout' was not declared in this scope 28 | cout << sum<< endl; | ^~~~ a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:28:19: error: 'endl' was not declared in this scope 28 | cout << sum<< endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std; a.cc: At global scope: a.cc:31:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 31 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:34:12: error: 'cin' was not declared in this scope 34 | while( cin >> n >> m && n ){ | ^~~ a.cc:34:12: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s958930972
p00072
C++
#include <iostream> #include <vector> #include <cstdlib> using namespace std; struct place{ int id; int weight; }; const int unseen = -INT_MAX; int update(vector<place>& vi, int k, int w){ vector<place>::iterator iter = vi.begin(); while(iter != vi.end() && (*iter).id != k) iter++; if(iter == vi.end()){ place p; p.id = k; p.weight = w; vi.push_back(p); return 1; }else{ if((*iter).weight == w){ return 0; }else{ if(w < (*iter).weight){ (*iter).weight = w; return 1; }else return 0; } } } void swap(vector<place>& vp, int i, int j){ place p; p.id = vp[i].id; p.weight = vp[i].weight; vp[i].id = vp[j].id; vp[i].weight = vp[j].weight; vp[j].id = p.id; vp[j].weight = p.weight; } place remove(vector<place>& vp){ int min = 0; for(int i = 0; i < vp.size(); i++){ if(vp[i].weight < vp[min].weight) min = i; } swap(vp, min, vp.size() - 1); place p = vp[vp.size() - 1]; vp.pop_back(); return p; } int visit(int route[100][100], int k, int n){ int weight = 0; int val [100]; for(int i = 0; i < 100; i++) val[i] = unseen; vector<place> vp; update(vp, k, -unseen); while(!vp.empty()){ place p = remove(vp); k = p.id; val[k] =-val[k]; if(val[k] == -unseen) val[k] = 0; weight += val[k]; for(int i = 0; i < n; i++){ if(route[k][i] != 0) if(val[i] < 0) if(update(vp, i, route[k][i])) { val[i] = -route[k][i]; } } } return weight; } int main(){ const int nmax = 100; int n; int m; int route[nmax][nmax]; int a, b; int dis; char c; while(cin >> n){ for(int i = 0;i < nmax; i++){ for(int j = 0; j < nmax; j++){ route[i][j] = 0; } } if(n == 0) break; cin >> m; for(int i = 0; i < m; i++){ cin >> a >> c >> b >> c >> dis; dis = dis / 100 - 1; route[a][b] = dis; route[b][a] = dis; } cout << visit(route, 0, n) << endl; } return 0; }
a.cc:11:21: error: 'INT_MAX' was not declared in this scope 11 | const int unseen = -INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <cstdlib> +++ |+#include <climits> 4 | using namespace std;
s678801208
p00072
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <string> #include <cmath> #include <stack> #include <vector> #include <map> #include <set> #include <queue> #include <list> #include <iostream> #include <climits> #include <cfloat> using namespace std; //int main() //{ // int n, m; // int pos[100][100]; // // while (true) // { // scanf("%d", &n); // if (n == 0) // break; // scanf("%d", &m); // memset(pos, -1, sizeof(pos)); // int a, b, c; // for (int i = 0; i < m; ++i) // scanf("%d,%d,%d", &a, &b, &c); // pos[a-1][b-1] = c; // } // // return 0; //} typedef pair<int, int> edge; int main() { while (true) { int n, m; scanf("%d", &n); if (n == 0) break; vector<edge> edges[100]; bool inTree[100]; fill(inTree, inTree+100, false); scanf("%d", &m); for (int i = 0; i < m; ++i) { int a, b, c; scanf("%d,%d,%d", &a, &b, &c); edges[a].push_back(edge(c, b)); edges[b].push_back(edge(c, a)); } int res = 0; priority_queue<int, vector<edge>, greater<edge>> q; inTree[0] = true; for (int i = 0; i < edges[0].size(); ++i) q.push(edges[0][i]); while (!q.empty()) { edge e = q.top(); q.pop(); if (inTree[e.second]) continue; inTree[e.second] = true; res += e.first / 100 - 1; for (int i = 0; i < edges[e.second].size(); ++i) q.push(edges[e.second][i]); } printf("%d\n", res); } return 0; }
In file included from /usr/include/c++/14/queue:66, from a.cc:10: /usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<int, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >': a.cc:65:52: required from here 65 | priority_queue<int, vector<edge>, greater<edge>> q; | ^ /usr/include/c++/14/bits/stl_queue.h:520:67: error: static assertion failed: value_type must be the same as the underlying container 520 | static_assert(is_same<_Tp, typename _Sequence::value_type>::value, | ^~~~~ /usr/include/c++/14/bits/stl_queue.h:520:67: note: 'std::integral_constant<bool, false>::value' evaluates to false
s199703969
p00072
C++
#include <iostream> using namespace std; #define SAFE_DELETE( x ) { if ( x ){ delete x; x = NULL; } } struct tCell{ tCell() : x( 0 ), prev( NULL ), next( NULL ){} int x; tCell *prev, *next; }; class MyArray{ public: MyArray() : mSize( 0 ), head( NULL ), tail( NULL ){ head = new tCell; tail = new tCell; head->next = tail; tail->prev = head; } ~MyArray(){ init(); SAFE_DELETE( head ); SAFE_DELETE( tail ); } void init(){ for ( int i = mSize; i > 0; --i ){ tCell* it = tail->prev; it->prev->next = it->next; it->next->prev = it->prev; SAFE_DELETE( it ); } mSize = 0; } void pushBack( int x ){ tCell* it = new tCell; it->x = x; it->prev = tail->prev; it->next = tail; it->prev->next = it; it->next->prev = it; ++mSize; } void pushAsc( int x ){ } int size(){ return mSize; } tCell operator[]( int index ){ tCell* it = head->next; for ( int i = 0; i < index; ++i ){ it = it->next; } return *it; } private: int mSize; tCell *head, *tail; }; struct tData{ tData() : done( false ){} bool done; MyArray to; MyArray dis; }; class Route{ public: Route( int m ) : list( NULL ), mSize( m ){ list = new tData[ mSize ]; } ~Route(){ delete[] list; } int calc(){ bool end; int ret = 0; list[ 0 ].done = true; do{ end = true; int nextTo, nextDis = INT_MAX; for ( int i = 0; i < mSize; ++i ){ if ( list[ i ].done ){ for ( int j = 0; j < list[ i ].to.size(); ++j ){ int to = list[ i ].to[ j ].x; if ( !list[ to ].done && list[ i ].dis[ j ].x < nextDis ){ nextTo = to; nextDis = list[ i ].dis[ j ].x; end = false; } } } } if ( !end ){ ret += nextDis / 100 - 1; list[ nextTo ].done = true; } }while ( !end ); return ret; } int mSize; tData* list; }; int main(){ int n, m, p1, p2, d; char c; while ( cin >> n && n ){ cin >> m; Route* route = new Route( m ); for ( int i = 0; i < m; ++i ){ cin >> p1 >> c >> p2 >> c >> d; route->list[ p1 ].to.pushBack( p2 ); route->list[ p1 ].dis.pushBack( d ); route->list[ p2 ].to.pushBack( p1 ); route->list[ p2 ].dis.pushBack( d ); } cout << route->calc() << endl; SAFE_DELETE( route ); } return 0; }
a.cc: In member function 'int Route::calc()': a.cc:88:47: error: 'INT_MAX' was not declared in this scope 88 | int nextTo, nextDis = INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <iostream> +++ |+#include <climits> 2 | using namespace std;
s236144505
p00072
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef int Weight; struct Edge { int src, dest; Weight weight; Edge(int src, int dest, Weight weight): src(src), dest(dest), weight(weight) {;} bool operator<(const Edge &rhs) const { return weight < rhs.weight; } }; struct UnionFind { int parent[100]; UnionFind() { memset(parent, -1, sizeof(parent)); } bool unite(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (parent[y] < parent[x]) { swap(x, y); } parent[x] += parent[y]; parent[y] = x; return true; } bool find(int x, int y) { return root(x) == root(y); } int root(int x) { return parent[x] < 0 ? x : parent[x] = root(parent[x]); } }; int M, N; vector<Edge> es; void Solve() { sort(es.begin(), es.end()); UnionFind uf; int res = 0; for (int i = 0; i < M; i++) { Edge e = es[i]; if (!uf.find(e.src, e.dest)) { uf.unite(e.src, e.dest); res += (int)(e.weight / 100) - 1; } } cout << res << endl; } int main() { int u, v, w; while (cin >> N && N) { cin >> M; es.clear(); for (int i = 0; i < M; i++) { scanf("%d,%d,%d", &u, &v, &w); es.push_back(Edge(u, v, w)); } Solve(); } }
a.cc: In constructor 'UnionFind::UnionFind()': a.cc:20:5: error: 'memset' was not declared in this scope 20 | memset(parent, -1, sizeof(parent)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> 4 |
s392500812
p00072
C++
#include<iostream> #include<vector> #include<cstdio> #include<map> #include<vector> using namespace std; int main(){ int n; while(cin >>n,n){ int m,ans = 0; vector<pair<int,pair<int,int> > > P; bool done[100]={false}; cin >>m; for(int i=0,a,b,c; i<m; i++){ scanf("%d,%d,%d",&a,&b,&c); P.push_back(make_pair(c,make_pair(a,b))); } sort(P.begin(),P.end()); ans+=(P[0].first/100)-1; done[P[0].second.first] = done[P[0].second.second] = true; for(int i=0; i<n-1; i++){ for(int j=0; j<m; j++){ if(done[P[j].second.first]^done[P[j].second.second]){ ans+=(P[j].first/100)-1; done[P[j].second.first] = done[P[j].second.second] = true; break; } } } cout <<ans<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(P.begin(),P.end()); | ^~~~ | short
s464117086
p00072
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int e[100][100]; int main() { int n; while(cin>>n,n) { int m; int ans=0; cin>>m; for(int i = 0; i < n; ++i) { for(int j = 0; j < n; ++j) { e[i][j]=-1; } } while(m--) { int l,r,c; scanf("%d,%d,%d",&l,&r,&c); e[l][r]=e[r][l]=c; } bool f[n]; fill(f,f+n,0); int cnt=1; f[0]=true; while(cnt<n) { int mn=INT_MAX,num; for(int i = 0; i < n; ++i) { if (f[i]) { for(int j = 0; j < n; ++j) { if(!f[j]&&e[i][j]!=-1&&e[i][j]<mn) { mn=e[i][j]; num=j; } } } } cnt++; ans+=mn-100; f[num]=true; } cout<<ans/100<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:36:32: error: 'INT_MAX' was not declared in this scope 36 | int mn=INT_MAX,num; | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include<algorithm> +++ |+#include <climits> 5 | using namespace std; a.cc:46:57: error: 'num' was not declared in this scope; did you mean 'enum'? 46 | num=j; | ^~~ | enum a.cc:53:27: error: 'num' was not declared in this scope; did you mean 'enum'? 53 | f[num]=true; | ^~~ | enum
s955813462
p00072
C++
#include <iostream> #include <cstdio> #include <vector> #include <utility> using namespace std; class data { public: int a, b; int c; data(int p1, int p2, int cost) { a = p1; b = p2; c = cost; } bool operator<(const data & c_) const { return c > c_.c; } }; int n, m; vector<data> cost; vector<data> modefied_cost; vector<vector<int> > used_point; void init() { cost.clear(); modefied_cost.clear(); used_point.clear(); } bool input() { cin >> n; if(!n) return false; cin >> m; for(int i = 0; i < m; i++) { int a, b, c; scanf("%d,%d,%d", &a, &b, &c); cost.push_back(data(a, b, c)); } return true; } void modefy_cost() { for(int i = 0; i < cost.size(); i++) { modefied_cost.push_back(data(cost[i].a, cost[i].b, cost[i].c / 100 - 1)); } } pair<pair<int,int>,pair<int,int> > find_point(data d) { pair<pair<int, int>, pair<int, int> > ij_pair(pair<int,int>(-1, -1), pair<int,int>(-2, -2)); for(int i = 0; i < used_point.size(); i++) { for(int j = 0; j < used_point[i].size(); j++) { if(used_point[i][j] == d.a) { ij_pair.first.first = i; ij_pair.first.second = j; } else if(used_point[i][j] == d.b) { ij_pair.second.first = i; ij_pair.second.second = j; } } } return ij_pair; } int solve() { modefy_cost(); sort(modefied_cost.begin(), modefied_cost.end()); int ans = 0; for(int i = 1; i < modefied_cost.size(); i++) { pair<pair<int,int>,pair<int,int> > tmp; tmp = find_point(modefied_cost[i]); if(tmp.first.first == tmp.second.first) continue; else if(tmp.first.first > -1 && tmp.second.first < 0) { used_point[tmp.first.first].push_back(modefied_cost[i].b); ans += modefied_cost[i].c; } else if(tmp.first.first < 0 && tmp.second.first > -1) { used_point[tmp.second.first].push_back(modefied_cost[i].a); ans += modefied_cost[i].c; } else if(tmp.first.first > -1 && tmp.second.first > -1) { used_point[tmp.first.first].insert(used_point[tmp.first.first].end(), used_point[tmp.second.first].begin(), used_point[tmp.second.first].end()); used_point.erase(used_point.begin() + tmp.second.first, used_point.begin() + tmp.second.first + 1); ans += modefied_cost[i].c; } else { used_point.push_back(vector<int>(modefied_cost[i].a, modefied_cost[i].b)); ans += modefied_cost[i].c; } } return ans; } int main() { while(init(), input()) { cout << solve() << endl; } }
a.cc:24:12: error: template argument 1 is invalid 24 | vector<data> cost; | ^ a.cc:24:12: error: template argument 2 is invalid a.cc:25:12: error: template argument 1 is invalid 25 | vector<data> modefied_cost; | ^ a.cc:25:12: error: template argument 2 is invalid a.cc: In function 'void init()': a.cc:29:14: error: request for member 'clear' in 'cost', which is of non-class type 'int' 29 | cost.clear(); | ^~~~~ a.cc:30:23: error: request for member 'clear' in 'modefied_cost', which is of non-class type 'int' 30 | modefied_cost.clear(); | ^~~~~ a.cc: In function 'bool input()': a.cc:43:22: error: request for member 'push_back' in 'cost', which is of non-class type 'int' 43 | cost.push_back(data(a, b, c)); | ^~~~~~~~~ a.cc:43:32: error: reference to 'data' is ambiguous 43 | cost.push_back(data(a, b, c)); | ^~~~ In file included from /usr/include/c++/14/string:53, 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/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)' 344 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:334:5: note: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])' 334 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:323:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)' 323 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /usr/include/c++/14/bits/range_access.h:312:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)' 312 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ a.cc:7:7: note: 'class data' 7 | class data { | ^~~~ a.cc: In function 'void modefy_cost()': a.cc:50:33: error: request for member 'size' in 'cost', which is of non-class type 'int' 50 | for(int i = 0; i < cost.size(); i++) { | ^~~~ a.cc:51:31: error: request for member 'push_back' in 'modefied_cost', which is of non-class type 'int' 51 | modefied_cost.push_back(data(cost[i].a, cost[i].b, cost[i].c / 100 - 1)); | ^~~~~~~~~ a.cc:51:41: error: reference to 'data' is ambiguous 51 | modefied_cost.push_back(data(cost[i].a, cost[i].b, cost[i].c / 100 - 1)); | ^~~~ /usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)' 344 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:334:5: note: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])' 334 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:323:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)' 323 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /usr/include/c++/14/bits/range_access.h:312:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)' 312 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ a.cc:7:7: note: 'class data' 7 | class data { | ^~~~ a.cc:51:50: error: invalid types 'int[int]' for array subscript 51 | modefied_cost.push_back(data(cost[i].a, cost[i].b, cost[i].c / 100 - 1)); | ^ a.cc:51:61: error: invalid types 'int[int]' for array subscript 51 | modefied_cost.push_back(data(cost[i].a, cost[i].b, cost[i].c / 100 - 1)); | ^ a.cc:51:72: error: invalid types 'int[int]' for array subscript 51 | modefied_cost.push_back(data(cost[i].a, cost[i].b, cost[i].c / 100 - 1)); | ^ a.cc: At global scope: a.cc:55:47: error: reference to 'data' is ambiguous 55 | pair<pair<int,int>,pair<int,int> > find_point(data d) { | ^~~~ /usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)' 344 | data(initializer_list<_Tp> __il) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:334:5: note: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])' 334 | data(_Tp (&__array)[_Nm]) noexcept | ^~~~ /usr/include/c++/14/bits/range_access.h:323:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)' 323 | data(const _Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ /usr/include/c++/14/bits/range_access.h:312:5: note: 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)' 312 | data(_Container& __cont) noexcept(noexcept(__cont.data())) | ^~~~ a.cc:7:7: note: 'class data' 7 | class data { | ^~~~ a.cc:55:55: error: expected ',' or ';' before '{' token 55 | pair<pair<int,int>,pair<int,int> > find_point(data d) { | ^ a.cc: In function 'int solve()': a.cc:75:28: error: request for member 'begin' in 'modefied_cost', which is of non-class type 'int' 75 | sort(modefied_cost.begin(), modefied_cost.end()); | ^~~~~ a.cc:75:51: error: request for member 'end' in 'modefied_cost', which is of non-class type 'int' 75 | sort(modefied_cost.begin(), modefied_cost.end()); | ^~~ a.cc:75:9: error: 'sort' was not declared in this scope; did you mean 'short'? 75 | sort(modefied_cost.begin(), modefied_cost.end()); | ^~~~ | short a.cc:78:42: error: request for member 'size' in 'modefied_cost', which is of non-class type 'int' 78 | for(int i = 1; i < modefied_cost.size(); i++) { | ^~~~ a.cc:80:47: error: invalid types 'int[int]' for array subscript 80 | tmp = find_point(modefied_cost[i]); | ^ a.cc:86:76: error: invalid types 'int[int]' for array subscript 86 | used_point[tmp.first.first].push_back(modefied_cost[i].b); | ^ a.cc:87:45: error: invalid types 'int[int]' for array subscript 87 | ans += modefied_cost[i].c; | ^ a.cc:90:77: error: invalid types 'int[int]' for array subscript 90 | used_point[tmp.second.first].push_back(modefied_cost[i].a); | ^ a.cc:91:45: error: invalid types 'int[int]' for array subscript 91 | ans += modefied_cost[i].c; | ^ a.cc:97:45: error: invalid types 'int[int]' for array subscript 97 | ans += modefied_cost[i].c; | ^ a.cc:100:71: error: invalid types 'int[int]' for array subscript 100 | used_point.push_back(vector<int>(modefied_cost[i].a, modefied_cost[i].b)); | ^ a.cc:100:91: error: invalid types 'int[int]' for array subscript 100 | used_point.push_back(vector<int>(modefied_cost[i].a, modefied_cost[i].b)); | ^ a.cc:101:45: error: invalid types 'int[int]' for array subscript 101 | ans += modefied_cost[i].c; | ^
s368221364
p00072
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int MAX = 1000; int par[MAX],rank[MAX],n,m; void init(int n){ for(int i = 0 ; i < n ; i++){ par[i] = i; rank[i] = 0; } } int find(int x){ if(par[x] == x) return x; return par[x] = find(par[x]); } void unite(int x,int y){ x = find(x); y = find(y); if(x == y) return; if(rank[x] < rank[y]){ par[x] = y; } else { par[y] = x; if(rank[x] == rank[y]) rank[x]++; } } bool same(int x,int y){ return find(x) == find(y); } int kruskal(pair<int,pair<int,int> > es[MAX]){ sort(es,es + m); init(n); int res = 0; for(int i = 0 ; i < m ; i++){ int a = es[i].second.first; int b = es[i].second.second; if(!same(a,b)){ res += es[i].first; unite(a,b); } } return res; } int main(){ while(cin >> n,n){ cin >> m; pair<int,pair<int,int> > es[MAX]; for(int i = 0 ; i < m ; i++){ scanf("%d,%d,%d", &es[i].second.first, &es[i].second.second,&es[i].first); } for(int i = 0 ; i < m ; i++){ es[i].first = es[i].first/100-1; } cout << kruskal(es) << endl; } return 0; }
a.cc: In function 'void init(int)': a.cc:12:5: error: reference to 'rank' is ambiguous 12 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank' 1437 | struct rank | ^~~~ a.cc:7:14: note: 'int rank [1000]' 7 | int par[MAX],rank[MAX],n,m; | ^~~~ a.cc: In function 'void unite(int, int)': a.cc:25:6: error: reference to 'rank' is ambiguous 25 | if(rank[x] < rank[y]){ | ^~~~ /usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank' 1437 | struct rank | ^~~~ a.cc:7:14: note: 'int rank [1000]' 7 | int par[MAX],rank[MAX],n,m; | ^~~~ a.cc:25:16: error: reference to 'rank' is ambiguous 25 | if(rank[x] < rank[y]){ | ^~~~ /usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank' 1437 | struct rank | ^~~~ a.cc:7:14: note: 'int rank [1000]' 7 | int par[MAX],rank[MAX],n,m; | ^~~~ a.cc:29:8: error: reference to 'rank' is ambiguous 29 | if(rank[x] == rank[y]) rank[x]++; | ^~~~ /usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank' 1437 | struct rank | ^~~~ a.cc:7:14: note: 'int rank [1000]' 7 | int par[MAX],rank[MAX],n,m; | ^~~~ a.cc:29:19: error: reference to 'rank' is ambiguous 29 | if(rank[x] == rank[y]) rank[x]++; | ^~~~ /usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank' 1437 | struct rank | ^~~~ a.cc:7:14: note: 'int rank [1000]' 7 | int par[MAX],rank[MAX],n,m; | ^~~~ a.cc:29:28: error: reference to 'rank' is ambiguous 29 | if(rank[x] == rank[y]) rank[x]++; | ^~~~ /usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank' 1437 | struct rank | ^~~~ a.cc:7:14: note: 'int rank [1000]' 7 | int par[MAX],rank[MAX],n,m; | ^~~~
s312901533
p00072
C++
#include<cstdio.txt> #include<cctype> #include<cstring> #include<cstdlib> #include<algorithm> #include<stack> #include<queue> #include<deque> #include<vector> #include<list> #include<bitset> #include<set> using namespace std; #define MAX_N 100 #define INF 1 << 20 int n, m, a, b, c, d[MAX_N][MAX_N], i, j, min[3], cnt, ans; bool array[MAX_N]; int main(){ while (true){ scanf("%d", &n); if (n == 0) return 0; scanf("%d", &m); cnt = 1; ans = 0; for (i = 0; i < n; i++){ for (j = 0; j < n; j++){ if (i == j){ d[i][j] = 0; continue; } d[i][j] = INF; } array[i] = false; } array[0] = true; for (i = 0; i < m; i++){ scanf("%d,%d,%d", &a, &b, &c); d[a][b] = c / 100 - 1; d[b][a] = c / 100 - 1; } for (cnt = 1; cnt < n; cnt++){ c = INF; for (i = 0; i < n; i++){ for (j = 0; j < n; j++){ if (array[i] && !array[j] && c > d[i][j]){ c = d[i][j]; b = j; } } } ans += c; array[b] = true; } printf("%d\n", ans); } }
a.cc:1:9: fatal error: cstdio.txt: No such file or directory 1 | #include<cstdio.txt> | ^~~~~~~~~~~~ compilation terminated.
s634288468
p00072
C++
#include <algorithm> #include <iostream> #include <vector> using namespace std; #define REP(i,n) for(i=0;i<n;i++) struct branch{ int n1, n2, w; }; bool greater(branch i, branch j){ return (i.w > j.w); } int main(){ while (1){ int n,i; char c; cin >> n; if (n == 0) break; vector <int> T(n); REP(i,n) T[i] = i; int m; cin >> m; vector <branch> S(m); REP(i,m) cin >> S[i].n1 >> c>>S[i].n2 >> c>>S[i].w; sort(S.begin(), S.end(),greater); int a = 0; while (S.size()){ branch tmp = S.back(); S.pop_back(); int b = T[tmp.n1], c = T[tmp.n2]; if (b != c){ REP(i,n) if (T[i] == c) T[i] = b; a += tmp.w / 100 - 1; } } cout << a << endl; } }
a.cc: In function 'int main()': a.cc:26:41: error: reference to 'greater' is ambiguous 26 | sort(S.begin(), S.end(),greater); | ^~~~~~~ In file included from /usr/include/c++/14/string:49, 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:2: /usr/include/c++/14/bits/stl_function.h:353:12: note: candidates are: 'template<class _Tp> struct std::greater' 353 | struct greater; | ^~~~~~~ a.cc:9:6: note: 'bool greater(branch, branch)' 9 | bool greater(branch i, branch j){ | ^~~~~~~
s392245772
p00073
Java
import java.util.Scanner; public class aoj0218 { public static void main(String args[]){ Scanner in = new Scanner(System.in); while(true){ int x = in.nextInt(); int h = in.nextInt(); if(x + h == 0)break; double S = x*x+2*x*Math.sqrt((x/2)*(x/2)+h*h); System.out.println(S); } } }
Main.java:3: error: class aoj0218 is public, should be declared in a file named aoj0218.java public class aoj0218 { ^ 1 error
s194464818
p00073
Java
import java.util.Scanner; public class AOJ0073 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); double x, h; double s, t1, t2; while (true) { x = stdIn.nextInt(); h = stdIn.nextInt(); if (x == 0 && h == 0) break; t1 = h * h + x * x / 4; t2 = Math.sqrt(t1); s = x * x + 2 * x * t2; System.out.println(s); } } }
Main.java:3: error: class AOJ0073 is public, should be declared in a file named AOJ0073.java public class AOJ0073 { ^ 1 error
s081716429
p00073
Java
import java.io.*; public class Main0073{ public static void main(String[] args){ BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); try{ String s,t; while((s=reader.readLine()) !=null &&(t=reader.readLine()) !=null){ double n=Integer.parseInt(s); double m=Integer.parseInt(t); if(n ==0 &&m==0){ break; } double x=n*n; double l=Math.sqrt(m*m+n*n/4); double y=2*n*l; System.out.println(x+y); } }catch(IOException e){ System.exit(0); } } }
Main.java:3: error: class Main0073 is public, should be declared in a file named Main0073.java public class Main0073{ ^ 1 error
s175613546
p00073
C
#include<stdio.h> #include<math.h> int main() { int n; int x,h; double sei; double s,san,tai,hen; do{ scanf("%d%d",&x,&h); if(x==0 && h==0)break; sei=x*x; tai=(double)x/2; hen=tai*tai+h*h; hen=sqrt(hen); san=(double)hen*x/2; S=4*san+sei; printf("%0.6f",s); }while(n); return 0; }
main.c: In function 'main': main.c:17:9: error: 'S' undeclared (first use in this function) 17 | S=4*san+sei; | ^ main.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
s774672996
p00073
C
#include<stdio.h> #include <math.h> int main(void) { int x,h; double ans; while(1) { scanf("%d%d",&x,&h); if(x==0 &&h==0) { return(0); } ans = sprt(x*x+h*h); printf("%ls\n",ans*x*2+x*x); }}
main.c: In function 'main': main.c:12:7: error: implicit declaration of function 'sprt'; did you mean 'sqrt'? [-Wimplicit-function-declaration] 12 | ans = sprt(x*x+h*h); | ^~~~ | sqrt
s490223261
p00073
C
#include <stdio.h> #include <math.c> main(){ double x,h,s,a; while(1){ scanf("%lf%lf",&x,&h); if(x==0&&h==0) break; a=(x/2)*(x/2)+h*h; a=sqrt(a); s=x*x+a*x*2; printf("%f\n",s); } return 0; }
main.c:2:10: fatal error: math.c: No such file or directory 2 | #include <math.c> | ^~~~~~~~ compilation terminated.
s656291850
p00073
C
#include<stdio.h> #include<math.h> int main(){ int x.h; double k; while(1){ scanf("%d",&x); scanf("%d",&h); if(x==0&&h==0)break; k=sqrt(h*h+x*x/4); printf("%lf\n",2*x*k+x*x); return 0; }
main.c: In function 'main': main.c:4:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 4 | int x.h; | ^ main.c:4:6: error: expected expression before '.' token main.c:7:13: error: 'x' undeclared (first use in this function) 7 | scanf("%d",&x); | ^ main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in main.c:8:13: error: 'h' undeclared (first use in this function) 8 | scanf("%d",&h); | ^ main.c:13:1: error: expected declaration or statement at end of input 13 | } | ^
s974363107
p00073
C
#include<stdio.h> #include<math.h> int main(){ int x,h; double k; while(1){ scanf("%d",&x); scanf("%d",&h); if(x==0&&h==0)break; k=sqrt(h*h+x*x/4); printf("%lf\n",2*x*k+x*x); return 0; }
main.c: In function 'main': main.c:13:1: error: expected declaration or statement at end of input 13 | } | ^
s631226844
p00073
C
#include <stdio.h> #include <math.h> int main(int argc,char* argv[]){ for(;;){ int x,h; double S,len,side; scanf("%d",&x); scanf("%d",&h); if(x == 0 && h == 0){ break; } S = x*x; len = sqrt((double)(x*x)/4 + h*h); side = len*x*2; printf("%.6lf\n",S + side); } return 0;
main.c: In function 'main': main.c:24:3: error: expected declaration or statement at end of input 24 | return 0; | ^~~~~~
s868238703
p00073
C
#inlude <stdio.h> #include <math.h> int main(void) { double x,h,a; while(scanf("%lf %lf",%x,&h)){ if(x==0&&h==0) break; printf("%.6f\n",(x*sqrt((4*h*h)+(x*x)))+(x*x)); } return 0; }
main.c:1:2: error: invalid preprocessing directive #inlude; did you mean #include? 1 | #inlude <stdio.h> | ^~~~~~ | include main.c: In function 'main': main.c:10:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 10 | while(scanf("%lf %lf",%x,&h)){ | ^~~~~ main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 3 | #include <math.h> +++ |+#include <stdio.h> 4 | main.c:10:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 10 | while(scanf("%lf %lf",%x,&h)){ | ^~~~~ main.c:10:15: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:10:31: error: expected expression before '%' token 10 | while(scanf("%lf %lf",%x,&h)){ | ^ main.c:13:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 13 | printf("%.6f\n",(x*sqrt((4*h*h)+(x*x)))+(x*x)); | ^~~~~~ main.c:13:17: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:13:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:13:17: note: include '<stdio.h>' or provide a declaration of 'printf'
s311804681
p00073
C
#include<stdio.h> #include<math.h> int main(void) { double x,h,a;/*テ、ツクツ?ィツセツコ*//*テゥツォツ佚」ツ??/ double S; /*ティツ。ツィテゥツ敖「テァツゥツ?/ while(1){ scanf("%lf",&x); scanf("%lf",&h); if(x == 0 && h == 0){ break; } S = x * x + 4 * x * sqrt(x * x / 4 + h * h) / 2; printf("%f\n",S); } return 0; }
main.c: In function 'main': main.c:6:59: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 6 | double x,h,a;/*テ、ツクツ?ィツセツコ*//*テゥツォツ佚」ツ??/ main.c:6:41: error: unterminated comment 6 | double x,h,a;/*テ、ツクツ?ィツセツコ*//*テゥツォツ佚」ツ??/ | ^ main.c:6:3: error: expected declaration or statement at end of input 6 | double x,h,a;/*テ、ツクツ?ィツセツコ*//*テゥツォツ佚」ツ??/ | ^~~~~~
s866913501
p00073
C++
#include<stdio.h> #include<math.h> int main(void) { double x,h,S,y,l; while(1){ scanf("%lf %lf",&x,&h); if(x==0 && h==0){ break; } y=x*x; l=sqrt(h*h+(x/2)*(x/2))*x*2; S=y+l; printf("%f\n",S); } return 0;
a.cc: In function 'int main()': a.cc:16:18: error: expected '}' at end of input 16 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s525460058
p00073
C++
#include<iostream> #include<cmath> using namespace std; int main(){ int x, h; while(cin >> x >> '\n' >> h){ if(x == 0 && h == 0) break; double ans = x * x + 4 * (x * sqrt((x/2)*(x/2) + h*h) * 0.5); cout << ans << endl; } }
a.cc: In function 'int main()': a.cc:6:24: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'char') 6 | while(cin >> x >> '\n' >> h){ | ~~~~~~~~ ^~ ~~~~ | | | | | char | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'long unsigned int&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'long long unsigned int&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'float&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'double&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: cannot bind non-const lvalue reference of type 'long double&' to a value of type 'char' 6 | while(cin >> x >> '\n' >> h){ | ^~~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: invalid conversion from 'char' to 'void*' [-fpermissive] 6 | while(cin >> x >> '\n' >> h){ | ^~~~ | | | char a.cc:6:27: error: cannot bind rvalue '(void*)10' to 'void*&' /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: invalid conversion from 'char' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive] 6 | while(cin >> x >> '\n' >> h){ | ^~~~ | | | char /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' (near match) 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:7: note: conversion of argument 1 would be ill-formed: a.cc:6:27: error: invalid conversion from 'char' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive] 6 | while(cin >> x >> '\n' >> h){ |
s861725735
p00073
C++
#include<iostream> #include<cmath> using namespace std; int main(){ int x, h; while(cin >> x ;cin >> h){ if(x == 0 && h == 0) break; double ans = x * x + 4 * (x * sqrt((x/2)*(x/2) + h*h) * 0.5); cout << ans << endl; } }
a.cc: In function 'int main()': a.cc:6:23: error: expected ')' before ';' token 6 | while(cin >> x ;cin >> h){ | ~ ^~ | ) a.cc:6:33: error: expected ';' before ')' token 6 | while(cin >> x ;cin >> h){ | ^ | ;
s410845428
p00073
C++
#include<iostream> #include<algorithm> using namespace std; int main() { long long int a = 0; long long int b = 0; while (cin >> a, cin >> b) { long long int c = 0; c = a*a*(a*a + b*b); long long int d = 0; d = sqrt(c * 10000000000); cout << a * a + d / 100000 << '.' << d % 100000 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:21: error: 'sqrt' was not declared in this scope 13 | d = sqrt(c * 10000000000); | ^~~~
s378088986
p00073
C++
#include<iostream> #include<algorithm> using namespace std; int main() { long long int a = 0; long long int b = 0; while (cin >> a, cin >> b) { long long int c = 0; c = a*a*(a*a + 4*b*b) * 10000000000; long long int d = 0; d = sqrt(c); cout << a * a + d / 100000 << '.' << d % 100000 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:21: error: 'sqrt' was not declared in this scope 13 | d = sqrt(c); | ^~~~
s444177537
p00073
C++
#include<iostream> #include<algorithm> using namespace std; int main() { long long int a = 0; long long int b = 0; while (cin >> a, cin >> b) { long long int c = a*a*(a*a + 4 * b*b) * 10000000000; long long int d = sqrt(c); cout << a * a + d / 100000 << '.' << d % 100000 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:35: error: 'sqrt' was not declared in this scope 11 | long long int d = sqrt(c); | ^~~~
s157976616
p00073
C++
#include<iostream> #include<algorithm> using namespace std; int main() { long long int a = 0; long long int b = 0; while (1) { cin >> a; cin >> b; if (a == 0 && b == 0) { break; } long long int c = a*a*(a*a + 4 * b*b) * 10000000000; long long int d = sqrt(c); cout << a * a + d / 100000 << '.' << d % 100000 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:35: error: 'sqrt' was not declared in this scope 17 | long long int d = sqrt(c); | ^~~~
s930555556
p00073
C++
#include<iostream> using nmespace std; int main(){ int w,h; float ans; while(1){ cin>>w>>h; if(w==0&&h==0){ break; } ans=(float)w*w*2.0+w*h*6.0; cout<<ans<<endl; }
a.cc:2:7: error: expected nested-name-specifier before 'nmespace' 2 | using nmespace std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>w>>h; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:12:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout<<ans<<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:12:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 12 | cout<<ans<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:13:2: error: expected '}' at end of input 13 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s020194088
p00073
C++
#include<iostream> using namespace std; int main(){ int w,h; float ans; while(1){ cin>>w>>h; if(w==0&&h==0){ break; } ans=(float)w*w*2.0+w*h*6.0; cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:13:2: error: expected '}' at end of input 13 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s212205406
p00073
C++
6 4 7 9 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 6 | ^
s421265638
p00073
C++
import java.util.*; public class Main { Scanner sc = new Scanner(System.in); double x, h; void run() { for(;;) { x = sc.nextInt(); h = sc.nextInt(); if (x == 0 && h == 0) break; System.out.println(x + "|" + h); double l = Math.sqrt(x*x/4 + h*h); double res = x*x + 2 * x * l; System.out.println(res); } } public static void main(String args[]) { new Main().run(); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s089096588
p00073
C++
import java.util.*; public class Main { Scanner sc = new Scanner(System.in); double x, h; void run() { for(;;) { x = sc.nextInt(); h = sc.nextInt(); if (x == 0 && h == 0) break; //System.out.println(x + "|" + h); double l = Math.sqrt(x*x/4 + h*h); double res = x*x + 2 * x * l; System.out.println(res); } } public static void main(String args[]) { new Main().run(); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s976786135
p00073
C++
int main() { double x, h; while(cin >> x >> h && (x || h)) cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl; }
a.cc: In function 'int main()': a.cc:4:15: error: 'cin' was not declared in this scope 4 | while(cin >> x >> h && (x || h)) | ^~~ a.cc:5:17: error: 'cout' was not declared in this scope 5 | cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl; | ^~~~ a.cc:5:25: error: 'setprecision' was not declared in this scope 5 | cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl; | ^~~~~~~~~~~~ a.cc:5:57: error: 'sqrt' was not declared in this scope 5 | cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl; | ^~~~ a.cc:5:88: error: 'endl' was not declared in this scope 5 | cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl; | ^~~~
s599829420
p00073
C++
#include <iostream> #include <sstream> #include <algorithm> #include <cstdio> #include <string> #include <vector> #include <stack> //AOJ0073 #define rep(x,to) for(int x=0;x<to;x++) #define rep2(x,from,to) for(int x=from;x<to;x++) using namespace std; int main(void){ int x,h; char k; while(cin >> x >> h){ if(x==0 && h==0 || cin.eof()) break; double trg = sqrt(x*x/4.00 + 1.00*h*h) * x * 0.5; printf("%.8f\n",trg*4+x*x*1.00); } return 0; }
a.cc: In function 'int main()': a.cc:21:30: error: 'sqrt' was not declared in this scope 21 | double trg = sqrt(x*x/4.00 + 1.00*h*h) * x * 0.5; | ^~~~
s540272826
p00073
C++
#inlude <stdio.h> #include <math.h> int main(void) { double x,h,a; while(scanf("%lf %lf",%x,&h)){ if(x==0&&h==0) break; printf("%.6f\n",(x*sqrt((4*h*h)+(x*x)))+(x*x)); } return 0; }
a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include? 1 | #inlude <stdio.h> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:10:31: error: expected primary-expression before '%' token 10 | while(scanf("%lf %lf",%x,&h)){ | ^ a.cc:10:15: error: 'scanf' was not declared in this scope 10 | while(scanf("%lf %lf",%x,&h)){ | ^~~~~ a.cc:13:17: error: 'printf' was not declared in this scope 13 | printf("%.6f\n",(x*sqrt((4*h*h)+(x*x)))+(x*x)); | ^~~~~~ a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 3 | #include <math.h> +++ |+#include <cstdio> 4 |
s848792956
p00073
C++
#include<stdio.h> #include<math.h> int main(){ int x,h,y,num=0; while(1){ scanf("%d %d",&x,&h); y=sqrt(x*x+h*h); num=x*x+2*x*y; if((x==0)&&(h==0)){ break; } printf("%d",num); }
a.cc: In function 'int main()': a.cc:21:10: error: expected '}' at end of input 21 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s206931682
p00073
C++
#include <iostream> #include <cmath> #include <cstdio> using namespace std; int main(){ double S,nx,xh; int x,h; for(;;){ cin >> x >> h; if(x == 0 && h == 0) break; nx = (double)x; nh = (double)h; S = sqrt(4*nh*nh+nx*nx)+nx*nx; printf("%.6f\n" ,S); } return 0; }
a.cc: In function 'int main()': a.cc:14:5: error: 'nh' was not declared in this scope; did you mean 'h'? 14 | nh = (double)h; | ^~ | h
s748619929
p00073
C++
#include <stdio.h> #include<math.h> #include <string.h> #include <ctype.h> int main(){ double x,h,c,a; while(1){ scanf("%lf%lf",&x,&h); if(x==0&&h==0)break; c=4*h*h+x*x; c=sqrt(c); a=x*c+x*x; printf("%f\n",a) return 0; }
a.cc: In function 'int main()': a.cc:14:17: error: expected ';' before 'return' 14 | printf("%f\n",a) | ^ | ; ...... 19 | return 0; | ~~~~~~ a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s657532142
p00073
C++
#include <stdio.h> #include<math.h> #include <string.h> #include <ctype.h> int main(){ double x,h,c,a; while(1){ scanf("%lf%lf",&x,&h); if(x==0&&h==0)break; c=4*h*h+x*x; c=sqrt(c); a=x*c+x*x; printf("%f\n",a); return 0; }
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s372814417
p00073
C++
#include <cmath> #include <cstdio> using namespace std; // x: base length, h: height of pyramid double get_surface_area_of_pyramid(int x, int h) { double height_of_triangle = sqrt(x * x / 4.0 + h * h); return 2 * x * height_of_triangle + x * x; } int main(void) { int x, h; // 4角推 while (cin >> x >> h) { if (x == 0 && h == 0) { break; } printf("%.6f\n",get_surface_area_of_pyramid(x, h)); } return 0; }
a.cc: In function 'int main()': a.cc:16:16: error: 'cin' was not declared in this scope 16 | while (cin >> x >> h) { | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <cstdio> +++ |+#include <iostream> 3 |
s250781322
p00073
C++
#include<iostream> #include<iomanip> int main() { double x, h; while( std::cin >> x >> h, x || h ) { double t = sqrt( x * x / 4.0 + h * h ); std::cout << std::fixed << std::setprecision( 6 ) << x * t * 2.0 + x * x << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:28: error: 'sqrt' was not declared in this scope 9 | double t = sqrt( x * x / 4.0 + h * h ); | ^~~~
s920866374
p00073
C++
loop do x, h = 2.times.map{gets.to_i} break if x==0 && h==0 puts x*x+Math.sqrt(4*h*h+x*x)*x end
a.cc:1:1: error: 'loop' does not name a type 1 | loop do | ^~~~ a.cc:3:3: error: expected unqualified-id before 'break' 3 | break if x==0 && h==0 | ^~~~~
s856085543
p00073
C++
while true x, h = 2.times.map{gets.to_i} break if x==0 && h==0 puts x*x+Math.sqrt(4*h*h+x*x)*x end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while true | ^~~~~ a.cc:3:3: error: expected unqualified-id before 'break' 3 | break if x==0 && h==0 | ^~~~~
s368154198
p00073
C++
while true x = gets.to_i h = gets.to_i break if x==0 && h==0 puts x*x+Math.sqrt(4*h*h+x*x)*x end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while true | ^~~~~
s132139885
p00073
C++
#include <iomanip> #include <iostream> using namespace std; int main(){ while(1){ double x,h,s; cin>>x>>h; if(x==0&&h==0)break; s=x*x+2*x*pow((x*x/4+h*h),0.5); cout<<fixed<<setprecision(6)<<s<<endl; } }
a.cc: In function 'int main()': a.cc:10:27: error: 'pow' was not declared in this scope 10 | s=x*x+2*x*pow((x*x/4+h*h),0.5); | ^~~
s491138025
p00074
C
h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
main.c:1:1: warning: data definition has no type or storage class 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'h' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; | ^ main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; | ^ main.c:1:7: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int] 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; | ^ main.c:1:9: error: return type defaults to 'int' [-Wimplicit-int] 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; | ^~~~ main.c: In function 'main': main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; | ^~~~~ main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:49: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; | ^~~~~~ main.c:1:49: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:49: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:49: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:1: error: expected declaration or statement at end of input 1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s; | ^
s432232370
p00074
C
h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;}
main.c:1:1: warning: data definition has no type or storage class 1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'h' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] 1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;} | ^ main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] 1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;} | ^ main.c:1:7: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int] 1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;} | ^ main.c:1:9: error: return type defaults to 'int' [-Wimplicit-int] 1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;} | ^~~~ main.c: In function 'main': main.c:1:19: error: expected expression before 'for' 1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;} | ^~~
s872878372
p00074
C
include<stdio.h> int main(void) { int t,m,s,n,i,T=0,M=0,S=0,n3,sum,N; scanf("%d",&t); scanf("%d",&m); scanf("%d",&s); sum = 3600*t + 60*m + s; N = 7200 - sum; for(i=0;i<2;i++){ if( N>=3600 ){ T = N / 3600; N = N % 3600; } if( N>=60 && N<3600 ){ M = N / 60; N = N % 60; } S = N; if(T<10){ printf("0%d",T); } else{ printf("%d",T); } if(M<10){ printf(":0%d",M); } else{ printf(":%d",M); } if(S<10){ printf(":0%d",S); } else{ printf(":%d",S); } printf("\n"); N = 7200 - sum; N = N *3; } return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s671547655
p00074
C++
#include<iostream> using namespace std; int s[3], t[3], u[3], time, vtime[2]; int main() { while (true) { cin >> s[0] >> s[1] >> s[2]; if (s[0] == -1) { break; } time = s[0] * 3600 + s[1] * 60 + s[2]; vtime[0] = 7200 - time; vtime[1] = 7200 - (time / 3); t[0] = vtime[0] / 3600; t[1] = (vtime[0] / 60) % 60; t[2] = vtime[0] % 60; u[0] = vtime[1] / 3600; u[1] = (vtime[1] / 60) % 60; u[2] = vtime[1] % 60; for (int i = 0; i < 3; i++) { if (i) { cout << ':'; } if (t[i] < 10) { cout << '0' << t[i]; } else { cout << t[i]; } } cout << endl; for (int i = 0; i < 3; i++) { if (i) { cout << ':'; } if (u[i] < 10) { cout << '0' << u[i]; } else { cout << u[i]; } } cout << endl; } }
a.cc:3:23: error: 'int time' redeclared as different kind of entity 3 | int s[3], t[3], u[3], time, vtime[2]; | ^~~~ 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, from /usr/include/c++/14/ext/atomicity.h:35, from /usr/include/c++/14/bits/ios_base.h:39, 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/time.h:76:15: note: previous declaration 'time_t time(time_t*)' 76 | extern time_t time (time_t *__timer) __THROW; | ^~~~ a.cc: In function 'int main()': a.cc:8:22: error: assignment of function 'time_t time(time_t*)' 8 | time = s[0] * 3600 + s[1] * 60 + s[2]; | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:9:33: error: invalid operands of types 'int' and 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'} to binary 'operator-' 9 | vtime[0] = 7200 - time; | ~~~~ ^ ~~~~ | | | | int time_t(time_t*) noexcept {aka long int(long int*) noexcept} a.cc:10:41: error: invalid operands of types 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'} and 'int' to binary 'operator/' 10 | vtime[1] = 7200 - (time / 3); | ~~~~ ^ ~ | | | | | int | time_t(time_t*) noexcept {aka long int(long int*) noexcept}
s589966564
p00074
C++
include<stdio.h> int main(void) { int t,m,s,n,i,T=0,M=0,S=0,n3,sum,N; scanf("%d",&t); scanf("%d",&m); scanf("%d",&s); sum = 3600*t + 60*m + s; N = 7200 - sum; for(i=0;i<2;i++){ if( N>=3600 ){ T = N / 3600; N = N % 3600; } if( N>=60 && N<3600 ){ M = N / 60; N = N % 60; } S = N; if(T<10){ printf("0%d",T); } else{ printf("%d",T); } if(M<10){ printf(":0%d",M); } else{ printf(":%d",M); } if(S<10){ printf(":0%d",S); } else{ printf(":%d",S); } printf("\n"); N = 7200 - sum; N = N *3; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<stdio.h> | ^~~~~~~
s913449596
p00074
C++
#include<iostream> using namespace std; int main(){ int h,m,s,sum1,sum2; cin>>h>>m>>s; if(h==-1&&m==-1&&s==-1)break; sum1 = 60*60*60*h+60*60*m+60*s; sum2 = sum1/3; sum1 = 60*60*60*2 - sum1; sum2 = 60*60*60*2 - sum2; h = sum1/216000; m = (sum1%216000)/3600; s = ((sum1%216000)%3600)/60; cout<<h<<':'<<m<<':'<<s<<endl;; h = sum2/216000; m = (sum2%216000)/3600; s = ((sum2%216000)%3600)/60; cout<<h<<':'<<m<<':'<<s; }
a.cc: In function 'int main()': a.cc:6:32: error: break statement not within loop or switch 6 | if(h==-1&&m==-1&&s==-1)break; | ^~~~~
s993258517
p00074
C++
#include<iostream> #include<iomanip> int main(){ while(1){ int t,m,s; double T=0,N; std::cin>>h>>m>>s; if(h==-1&&m==-1&&s==-1)break; T+=h*60; T+=m; T+=(s/60); NT=120-T; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl; NT*=3; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl; } return 0; }
a.cc:17:56: error: empty character constant 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^~ a.cc:17:59: warning: missing terminating ' character 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^ a.cc:17:59: error: missing terminating ' character 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^~ a.cc: In function 'int main()': a.cc:8:19: error: 'h' was not declared in this scope 8 | std::cin>>h>>m>>s; | ^ a.cc:13:9: error: 'NT' was not declared in this scope; did you mean 'N'? 13 | NT=120-T; | ^~ | N
s576454223
p00074
C++
#include<iostream> #include<iomanip> int main(){ while(1){ int t,m,s; double T=0,N; std::cin>>h>>m>>s; if(h==-1&&m==-1&&s==-1)break; T+=h*60; T+=m; T+=(s/60); NT=120-T; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl; NT*=3; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:19: error: 'h' was not declared in this scope 8 | std::cin>>h>>m>>s; | ^ a.cc:13:9: error: 'NT' was not declared in this scope; did you mean 'N'? 13 | NT=120-T; | ^~ | N
s432783286
p00074
C++
#include<iostream> #include<iomanip> int main(){ while(1){ int h,m,s; double T=0,N; std::cin>>h>>m>>s; if(h==-1&&m==-1&&s==-1)break; T+=h*60; T+=m; T+=(s/60); NT=120-T; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl; NT*=3; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl; } return 0; }
a.cc:17:56: error: empty character constant 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^~ a.cc:17:59: warning: missing terminating ' character 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^ a.cc:17:59: error: missing terminating ' character 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^~ a.cc: In function 'int main()': a.cc:13:9: error: 'NT' was not declared in this scope; did you mean 'N'? 13 | NT=120-T; | ^~ | N a.cc:17:58: error: expected ';' before ':' token 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^ | ;
s218798871
p00074
C++
#include<iostream> #include<iomanip> int main(){ while(1){ int h,m,s; double T=0,NT; std::cin>>h>>m>>s; if(h==-1&&m==-1&&s==-1)break; T+=h*60; T+=m; T+=(s/60); NT=120-T; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl; NT*=3; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl; } return 0; }
a.cc:17:56: error: empty character constant 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^~ a.cc:17:59: warning: missing terminating ' character 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^ a.cc:17:59: error: missing terminating ' character 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^~ a.cc: In function 'int main()': a.cc:17:58: error: expected ';' before ':' token 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^ | ;
s812637439
p00074
C++
#include<iostream> #include<iomanip> int main(){ while(1){ int h,m,s; double T=0,NT; std::cin>>h>>m>>s; if(h==-1&&m==-1&&s==-1)break; T+=h*60; T+=m; T+=(s/60); NT=120-T; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2<<std::setfill('0'<<s<<std::endl; NT*=3; h=NT/60; m=NT-h*60; s=(NT-h*60-m)*60; std::cout<<std::setw(2)<<std::setfill('0')<<h<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl; } return 0; }
a.cc:17:56: error: empty character constant 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^~ a.cc:17:59: warning: missing terminating ' character 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^ a.cc:17:59: error: missing terminating ' character 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^~ a.cc: In function 'int main()': a.cc:17:58: error: expected ';' before ':' token 17 | std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':'; | ^ | ; a.cc:18:119: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 18 | std::cout<<std::setw(2)<<std::setfill('0')<<m<<':'; std::cout<<std::setw(2<<std::setfill('0'<<s<<std::endl; | ~~~~~~^~~~~~~~~~~
s757373919
p00075
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { while (scanner.hasNext()) { String[] s = scanner.nextLine().split(","); Student student = new Student(s[0], Double.parseDouble(s[1]), Double.parseDouble(s[2])); if (student.bmi.is??????()) { System.out.println(student.????±???????); } } } } } class Student { final String ????±???????; final Bmi bmi; Student(String ????±???????, double ??????kg, double ??????m) { this.????±??????? = ????±???????; this.bmi = new BmiImpl(??????kg, ??????m); } } interface Bmi { int ??????????¢???? = 25; boolean is??????(); } class BmiImpl implements Bmi { private final double ??????kg; private final double ??????m; BmiImpl(double ??????kg, double ??????m) { this.??????kg = ??????kg; this.??????m = ??????m; } public double calc() { return ??????kg / Math.pow(??????m, 2); } @Override public boolean is??????() { return calc() >= ??????????¢????; } }
Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: -> expected if (student.bmi.is??????()) { ^ Main.java:11: error: <identifier> expected System.out.println(student.????????????); ^ Main.java:11: error: illegal start of expression System.out.println(student.????????????); ^ Main.java:11: error: illegal start of expression System.out.println(student.????????????); ^ Main.java:11: error: illegal start of expression System.out.println(student.????????????); ^ Main.java:11: error: illegal character: '\u00b1' System.out.println(student.????????????); ^ Main.java:19: error: <identifier> expected final String ????????????; ^ Main.java:19: error: illegal character: '\u00b1' final String ????????????; ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: illegal character: '\u00b1' Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:23: error: <identifier> expected this.???????????? = ????????????; ^ Main.java:23: error: illegal start of expression this.???????????? = ????????????; ^ Main.java:23: error: illegal start of expression this.???????????? = ????????????; ^ Main.java:23: error: illegal start of expression this.???????????? = ????????????; ^ Main.java:23: error: illegal character: '\u00b1' this.???????????? = ????????????; ^ Main.java:23: error: illegal character: '\u00b1' this.???????????? = ????????????; ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: : expected this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: : expected this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:29: error: <identifier> expected int ??????????????? = 25; ^ Main.java:29: error: = expected int ??????????????? = 25; ^ Main.java:29: error: <identifier> expected int ??????????????? = 25; ^ Main.java:31: error: = expected boolean is??????(); ^ Main.java:36: error: <identifier> expected private final double ??????kg; ^ Main.java:36: error: <identifier> expected private final double ??????kg; ^ Main.java:37: error: <identifier> expected private final double ??????m; ^ Main.java:37: error: <identifier> expected private final double ??????m; ^ Main.java:39: error: <identifier> expected BmiImpl(double ??????kg, double ??????m) { ^ Main.java:39: error: <identifier> expected BmiImpl(double ??????kg, double ??????m) { ^ Main.java:39: error: <identifier> expected BmiImpl(double ??????kg, double ??????m) { ^ Main.java:40: error: <identifier> expected this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: : expected this.??????kg = ??????kg; ^ Main.java:41: error: <identifier> expected this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: : expected this.??????m = ??????m; ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: : expected return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: : expected re
s724765613
p00075
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { while (scanner.hasNext()) { String[] s = scanner.nextLine().split(","); Student student = new Student(s[0], Double.parseDouble(s[1]), Double.parseDouble(s[2])); if (student.bmi.is??????()) { System.out.println(student.????±???????); } } } } } class Student { final String ????±???????; final Bmi bmi; Student(String ????±???????, double ??????kg, double ??????m) { this.????±??????? = ????±???????; this.bmi = new BmiImpl(??????kg, ??????m); } } interface Bmi { int ??????????¢???? = 25; boolean is??????(); } class BmiImpl implements Bmi { private final double ??????kg; private final double ??????m; BmiImpl(double ??????kg, double ??????m) { this.??????kg = ??????kg; this.??????m = ??????m; } public double calc() { return ??????kg / Math.pow(??????m, 2); } @Override public boolean is??????() { return calc() >= ??????????¢????; } }
Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: illegal start of expression if (student.bmi.is??????()) { ^ Main.java:10: error: -> expected if (student.bmi.is??????()) { ^ Main.java:11: error: <identifier> expected System.out.println(student.????????????); ^ Main.java:11: error: illegal start of expression System.out.println(student.????????????); ^ Main.java:11: error: illegal start of expression System.out.println(student.????????????); ^ Main.java:11: error: illegal start of expression System.out.println(student.????????????); ^ Main.java:11: error: illegal character: '\u00b1' System.out.println(student.????????????); ^ Main.java:19: error: <identifier> expected final String ????????????; ^ Main.java:19: error: illegal character: '\u00b1' final String ????????????; ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: illegal character: '\u00b1' Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String ????????????, double ??????kg, double ??????m) { ^ Main.java:23: error: <identifier> expected this.???????????? = ????????????; ^ Main.java:23: error: illegal start of expression this.???????????? = ????????????; ^ Main.java:23: error: illegal start of expression this.???????????? = ????????????; ^ Main.java:23: error: illegal start of expression this.???????????? = ????????????; ^ Main.java:23: error: illegal character: '\u00b1' this.???????????? = ????????????; ^ Main.java:23: error: illegal character: '\u00b1' this.???????????? = ????????????; ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: : expected this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: : expected this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:29: error: <identifier> expected int ??????????????? = 25; ^ Main.java:29: error: = expected int ??????????????? = 25; ^ Main.java:29: error: <identifier> expected int ??????????????? = 25; ^ Main.java:31: error: = expected boolean is??????(); ^ Main.java:36: error: <identifier> expected private final double ??????kg; ^ Main.java:36: error: <identifier> expected private final double ??????kg; ^ Main.java:37: error: <identifier> expected private final double ??????m; ^ Main.java:37: error: <identifier> expected private final double ??????m; ^ Main.java:39: error: <identifier> expected BmiImpl(double ??????kg, double ??????m) { ^ Main.java:39: error: <identifier> expected BmiImpl(double ??????kg, double ??????m) { ^ Main.java:39: error: <identifier> expected BmiImpl(double ??????kg, double ??????m) { ^ Main.java:40: error: <identifier> expected this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: : expected this.??????kg = ??????kg; ^ Main.java:41: error: <identifier> expected this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: : expected this.??????m = ??????m; ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: : expected return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: : expected re
s157472085
p00075
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { while (scanner.hasNext()) { String[] s = scanner.nextLine().split(","); Student student = new Student(s[0], Double.parseDouble(s[1]), Double.parseDouble(s[2])); if (student.bmi.isDebu()) { System.out.println(student.studentId); } } } } } class Student { final String studentId; final Bmi bmi; Student(String studentId, double ??????kg, double ??????m) { this.studentId = studentId; this.bmi = new BmiImpl(??????kg, ??????m); } } interface Bmi { int debu = 25; boolean isDebu(); } class BmiImpl implements Bmi { private final double ??????kg; private final double ??????m; BmiImpl(double ??????kg, double ??????m) { this.??????kg = ??????kg; this.??????m = ??????m; } public double calc() { return ??????kg / Math.pow(??????m, 2); } @Override public boolean isDebu() { return calc() >= debu; } }
Main.java:22: error: <identifier> expected Student(String studentId, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String studentId, double ??????kg, double ??????m) { ^ Main.java:22: error: <identifier> expected Student(String studentId, double ??????kg, double ??????m) { ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: : expected this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: illegal start of expression this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:24: error: : expected this.bmi = new BmiImpl(??????kg, ??????m); ^ Main.java:36: error: <identifier> expected private final double ??????kg; ^ Main.java:36: error: <identifier> expected private final double ??????kg; ^ Main.java:37: error: <identifier> expected private final double ??????m; ^ Main.java:37: error: <identifier> expected private final double ??????m; ^ Main.java:39: error: <identifier> expected BmiImpl(double ??????kg, double ??????m) { ^ Main.java:39: error: <identifier> expected BmiImpl(double ??????kg, double ??????m) { ^ Main.java:39: error: <identifier> expected BmiImpl(double ??????kg, double ??????m) { ^ Main.java:40: error: <identifier> expected this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: illegal start of expression this.??????kg = ??????kg; ^ Main.java:40: error: : expected this.??????kg = ??????kg; ^ Main.java:41: error: <identifier> expected this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: illegal start of expression this.??????m = ??????m; ^ Main.java:41: error: : expected this.??????m = ??????m; ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: illegal start of expression return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: : expected return ??????kg / Math.pow(??????m, 2); ^ Main.java:45: error: : expected return ??????kg / Math.pow(??????m, 2); ^ 64 errors
s136337067
p00075
Java
public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int stnum; double weight, height, BMI; String data, datap[]; while( scan.hasNext()) { data = scan.next(); datap = data.split(",",3); stnum = Integer.valueOf(datap[0]); weight = Double.valueOf(datap[1]); height = Double.valueOf(datap[2]); BMI = (weight)/(height*height); if(BMI>=25.0) System.out.println(stnum); } } }
Main.java:4: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s866691314
p00075
Java
import java.io.*; class Main { public static void main(String args[])throws IOException { BufferedReader input=new BufferedReader(new InputStreamReader(System.in)); String str; while((str=input.readLine())!=null) { String str_ary[]=str.split(","); Double a[]=new Double[3]; for(int i=0;i<3;i++) { a[i]=Double.parseDouble(str_ary[i]); } if(a[1]/Math.pow(a[2],2)>=25)System.out.println((int)a[0]); } } }
Main.java:16: error: incompatible types: Double cannot be converted to int if(a[1]/Math.pow(a[2],2)>=25)System.out.println((int)a[0]); ^ 1 error
s614459934
p00075
Java
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList l = new ArrayList(); while(sc.hasNext()){ String[] s = sc.next().split(","); double w = Double.parseDouble(s[1]); double h = Double.parseDouble(s[2]); if(w/(h*h)>=25)l.add(Integer.parseInt(s[0])); } if(l.isEmpty())System.out.println("該当なし"); else for(Integer i:l)System.out.println(i); } }
Main.java:16: error: incompatible types: Object cannot be converted to Integer else for(Integer i:l)System.out.println(i); ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s108745194
p00075
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList l = new ArrayList(); while(sc.hasNext()){ double w = Double.parseDouble(s[1]); double h = Double.parseDouble(s[2]); if(w/(h*h)>=25)l.add(Integer.parseInt(s[0])); } if(l.isEmpty())System.out.println("該当なし"); else for(Integer i:l)System.out.println(i); } }
Main.java:11: error: cannot find symbol double w = Double.parseDouble(s[1]); ^ symbol: variable s location: class Main Main.java:12: error: cannot find symbol double h = Double.parseDouble(s[2]); ^ symbol: variable s location: class Main Main.java:13: error: cannot find symbol if(w/(h*h)>=25)l.add(Integer.parseInt(s[0])); ^ symbol: variable s location: class Main Main.java:16: error: incompatible types: Object cannot be converted to Integer else for(Integer i:l)System.out.println(i); ^ 4 errors
s996845822
p00075
C
#include <stdio.h> #include <math.h> int main(void){ int a;double b,c; while(scanf("%d",&a) != EOF){ scanf("%lf %lf",&b,&c) if(b/(c*c)>=25){ printf("%d\n",a); } } return 0; }
main.c: In function 'main': main.c:7:39: error: expected ';' before 'if' 7 | scanf("%lf %lf",&b,&c) | ^ | ; 8 | if(b/(c*c)>=25){ | ~~
s116174517
p00075
C
#include<stdio.h> int main{ int n; double w; double h; scanf("%d,%lf,%lf",&n,&w,&h); double bmi; bmi = w/(h*h); if(bmi>=25){ printf("%d",n); } return 0; }
main.c:3:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 3 | int main{ | ^
s840713678
p00075
C
#include<stdio.h> int main(){ int i; int a[10000],n=0,g double w,h; while(scanf("%d,%lf,%lf",&g,&w,&h)!=-1){ if(w/h/h>=25){ a[n]=g; n++; } } for(i=0;i<n;i++) printf("%d\n",a[i]); return 0; }
main.c: In function 'main': main.c:5:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'double' 5 | double w,h; | ^~~~~~ main.c:6:27: error: 'g' undeclared (first use in this function) 6 | while(scanf("%d,%lf,%lf",&g,&w,&h)!=-1){ | ^ main.c:6:27: note: each undeclared identifier is reported only once for each function it appears in main.c:6:30: error: 'w' undeclared (first use in this function) 6 | while(scanf("%d,%lf,%lf",&g,&w,&h)!=-1){ | ^ main.c:6:33: error: 'h' undeclared (first use in this function) 6 | while(scanf("%d,%lf,%lf",&g,&w,&h)!=-1){ | ^
s675539070
p00075
C
main(){ int n; double g,m; while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ if(25<=g/m/m)printf("%d\n",n); } return 0; }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function 'main': main.c:5:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 5 | while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(){ main.c:5:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 5 | while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ | ^~~~~ main.c:5:11: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:5:41: error: 'EOF' undeclared (first use in this function) 5 | while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ | ^~~ main.c:5:41: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:5:41: note: each undeclared identifier is reported only once for each function it appears in main.c:6:22: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 6 | if(25<=g/m/m)printf("%d\n",n); | ^~~~~~ main.c:6:22: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:6:22: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:6:22: note: include '<stdio.h>' or provide a declaration of 'printf'
s044559336
p00075
C
n,g,m;int main(){ while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ if(25<=g/m/m)printf("%d\n",n); } return 0; }
main.c:1:1: warning: data definition has no type or storage class 1 | n,g,m;int main(){ | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'g' [-Wimplicit-int] 1 | n,g,m;int main(){ | ^ main.c:1:5: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] 1 | n,g,m;int main(){ | ^ main.c: In function 'main': main.c:3:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | n,g,m;int main(){ main.c:3:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ | ^~~~~ main.c:3:11: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:3:41: error: 'EOF' undeclared (first use in this function) 3 | while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ | ^~~ main.c:3:41: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:3:41: note: each undeclared identifier is reported only once for each function it appears in main.c:4:22: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 4 | if(25<=g/m/m)printf("%d\n",n); | ^~~~~~ main.c:4:22: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:4:22: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:4:22: note: include '<stdio.h>' or provide a declaration of 'printf'
s189202523
p00075
C
n;int main(g,m){ while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ if(25<=g/m/m)printf("%d\n",n); } return 0; }
main.c:1:1: warning: data definition has no type or storage class 1 | n;int main(g,m){ | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c: In function 'main': main.c:1:7: error: type of 'g' defaults to 'int' [-Wimplicit-int] 1 | n;int main(g,m){ | ^~~~ main.c:1:7: error: type of 'm' defaults to 'int' [-Wimplicit-int] main.c:3:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | n;int main(g,m){ main.c:3:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ | ^~~~~ main.c:3:11: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:3:41: error: 'EOF' undeclared (first use in this function) 3 | while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF){ | ^~~ main.c:3:41: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:3:41: note: each undeclared identifier is reported only once for each function it appears in main.c:4:22: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 4 | if(25<=g/m/m)printf("%d\n",n); | ^~~~~~ main.c:4:22: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:4:22: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:4:22: note: include '<stdio.h>' or provide a declaration of 'printf'
s033781936
p00075
C
int main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;}
main.c: In function 'main': main.c:1:5: error: type of 'n' defaults to 'int' [-Wimplicit-int] 1 | int main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~~ main.c:1:30: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | int main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} main.c:1:30: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | int main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~~~ main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:60: error: 'EOF' undeclared (first use in this function) 1 | int main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~ main.c:1:60: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:1:60: note: each undeclared identifier is reported only once for each function it appears in main.c:1:77: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | int main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~~~~ main.c:1:77: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:77: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:77: note: include '<stdio.h>' or provide a declaration of 'printf'
s387287656
p00075
C
main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:1:26: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} main.c:1:26: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~~~ main.c:1:26: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:56: error: 'EOF' undeclared (first use in this function) 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~ main.c:1:56: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:1:56: note: each undeclared identifier is reported only once for each function it appears in main.c:1:73: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);return 0;} | ^~~~~~ main.c:1:73: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:73: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:73: note: include '<stdio.h>' or provide a declaration of 'printf'
s679173207
p00075
C
main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:1:26: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);} main.c:1:26: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);} | ^~~~~ main.c:1:26: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:56: error: 'EOF' undeclared (first use in this function) 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);} | ^~~ main.c:1:56: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:1:56: note: each undeclared identifier is reported only once for each function it appears in main.c:1:73: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(n){double g,m;while(scanf("%d,%lf,%lf",&n,&g,&m)!=EOF)if(25<=g/m/m)printf("%d\n",n);} | ^~~~~~ main.c:1:73: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:73: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:73: note: include '<stdio.h>' or provide a declaration of 'printf'
s466793940
p00075
C
#include<stdio.h> int main(){ float a,b,c; printf("????¢¨??????????????????????????\???????????????:"); while(1){ scanf("%f",&a); if(a<85){ printf("????????????\n??????????????\?????????:"); } else{ printf("?????????????????§?????????(^??^)9m??????????????¬??°\n"); break; } } printf("???????????\???????????????(m):"); scanf("%f",&b); c=a/(b*b); if(c<22){ printf]("????????????BMI???%1.0f?????¨???????????§????????¨??£??¨??¨??????????????£?????????????????????\n",c); } else if(c>=25){ printf("????????????BMI???%1.0f???????????°??????????????§??????\n",c); } else{ printf("????????????BMI???%1.0f????¨??????§??????(??????\n",c); } return 0; }
main.c: In function 'main': main.c:11:58: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs] 11 | printf("?????????????????§?????????(^??^)9m??????????????¬??°\n"); main.c:15:42: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs] 15 | printf("???????????\???????????????(m):"); main.c:19:23: error: expected ';' before ']' token 19 | printf]("????????????BMI???%1.0f?????¨???????????§????????¨??£??¨??¨??????????????£?????????????????????\n",c); | ^ | ; main.c:19:23: error: expected statement before ']' token main.c:25:64: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs] 25 | printf("????????????BMI???%1.0f????¨??????§??????(??????\n",c);
s674097312
p00075
C
#include<stdio.h> int main(){ int x[1000],a,b,c,k=0,i; scanf("%d,%lf,%lf",&a,&b,&c); if(b/c/c>=25) x[k++]=a; } for(i=0;i<k;i++) printf("%d\n",x[i]); return 0; }
main.c:8:1: error: expected identifier or '(' before 'for' 8 | for(i=0;i<k;i++) | ^~~ main.c:8:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 8 | for(i=0;i<k;i++) | ^ main.c:8:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token 8 | for(i=0;i<k;i++) | ^~ main.c:10:1: error: expected identifier or '(' before 'return' 10 | return 0; | ^~~~~~ main.c:11:1: error: expected identifier or '(' before '}' token 11 | } | ^
s874175133
p00075
C
main(n){for(float h,w;~scanf("%d,%f,%f",&n,&w,&h);w/h/h<25||printf("%d\n",n));}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(n){for(float h,w;~scanf("%d,%f,%f",&n,&w,&h);w/h/h<25||printf("%d\n",n));} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:1:24: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(n){for(float h,w;~scanf("%d,%f,%f",&n,&w,&h);w/h/h<25||printf("%d\n",n));} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(n){for(float h,w;~scanf("%d,%f,%f",&n,&w,&h);w/h/h<25||printf("%d\n",n));} main.c:1:24: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(n){for(float h,w;~scanf("%d,%f,%f",&n,&w,&h);w/h/h<25||printf("%d\n",n));} | ^~~~~ main.c:1:24: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:61: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(n){for(float h,w;~scanf("%d,%f,%f",&n,&w,&h);w/h/h<25||printf("%d\n",n));} | ^~~~~~ main.c:1:61: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:61: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:61: note: include '<stdio.h>' or provide a declaration of 'printf'
s163939116
p00075
C
main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:25: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} main.c:1:25: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} | ^~~~~ main.c:1:25: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:66: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} | ^~~~~~ main.c:1:66: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:66: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:66: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:83: error: 'd' undeclared (first use in this function) 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} | ^ main.c:1:83: note: each undeclared identifier is reported only once for each function it appears in main.c:1:91: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} | ^~~~ main.c:1:91: note: include '<stdio.h>' or provide a declaration of 'puts' main.c:1:118: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} | ^~~~ main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit' +++ |+#include <stdlib.h> 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} main.c:1:118: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;!d&&puts("ツ該ツ督鳴づ按つオ");exit(0);} | ^~~~ main.c:1:118: note: include '<stdlib.h>' or provide a declaration of 'exit'
s500226335
p00075
C
main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:25: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);} main.c:1:25: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);} | ^~~~~ main.c:1:25: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:66: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);} | ^~~~~~ main.c:1:66: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:66: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:66: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:83: error: 'd' undeclared (first use in this function) 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);} | ^ main.c:1:83: note: each undeclared identifier is reported only once for each function it appears in main.c:1:87: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);} | ^~~~ main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit' +++ |+#include <stdlib.h> 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);} main.c:1:87: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 1 | main(a){float b,c;for(;~scanf("%d,%f,%f",&a,&b,&c);)b/(c*c)>=25&&printf("%d\n",a),d++;exit(0);} | ^~~~ main.c:1:87: note: include '<stdlib.h>' or provide a declaration of 'exit'
s776198793
p00075
C
include <stdio.h> int main(int argc,char* argv[]){ int s_sum; double w,len; while(scanf("%d,%lf,%lf",&s_sum,&w,&len) != EOF){ if(w/(len*len) >= 25.0){ printf("%d\n",s_sum); } } return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s412421960
p00075
C
#include<stdio.h> int main() { int num; double w , h; while(1) { scanf("%d",&num); if(num==EOF)break; scanf("%f",&w); scanf("%f",&h); if(w/(h*h)>=25.0) printf("%d\n",count); } return 0; }
main.c: In function 'main': main.c:11:15: error: 'count' undeclared (first use in this function) 11 | printf("%d\n",count); | ^~~~~ main.c:11:15: note: each undeclared identifier is reported only once for each function it appears in
s872632716
p00075
C
main(){int x,sum=0;double a,b;while(scanf("%d,%lf,%lf",&x,&a,&b)!=EOF){float y=a/b;y/=b;if(y>=25)printf("%d\n",x);}return 0;}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){int x,sum=0;double a,b;while(scanf("%d,%lf,%lf",&x,&a,&b)!=EOF){float y=a/b;y/=b;if(y>=25)printf("%d\n",x);}return 0;} | ^~~~ main.c: In function 'main': main.c:1:37: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | main(){int x,sum=0;double a,b;while(scanf("%d,%lf,%lf",&x,&a,&b)!=EOF){float y=a/b;y/=b;if(y>=25)printf("%d\n",x);}return 0;} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(){int x,sum=0;double a,b;while(scanf("%d,%lf,%lf",&x,&a,&b)!=EOF){float y=a/b;y/=b;if(y>=25)printf("%d\n",x);}return 0;} main.c:1:37: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | main(){int x,sum=0;double a,b;while(scanf("%d,%lf,%lf",&x,&a,&b)!=EOF){float y=a/b;y/=b;if(y>=25)printf("%d\n",x);}return 0;} | ^~~~~ main.c:1:37: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:67: error: 'EOF' undeclared (first use in this function) 1 | main(){int x,sum=0;double a,b;while(scanf("%d,%lf,%lf",&x,&a,&b)!=EOF){float y=a/b;y/=b;if(y>=25)printf("%d\n",x);}return 0;} | ^~~ main.c:1:67: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>' main.c:1:67: note: each undeclared identifier is reported only once for each function it appears in main.c:1:98: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | main(){int x,sum=0;double a,b;while(scanf("%d,%lf,%lf",&x,&a,&b)!=EOF){float y=a/b;y/=b;if(y>=25)printf("%d\n",x);}return 0;} | ^~~~~~ main.c:1:98: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:98: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:98: note: include '<stdio.h>' or provide a declaration of 'printf'
s151088692
p00075
C++
#include<stdio.h> int main(){ double y,z; int x; while(scanf("%d,%lf,%lf",&x.&y,&z); if((y/z/z)>=25)printf("%d\n",x); } return 0; }
a.cc: In function 'int main()': a.cc:7:29: error: expected unqualified-id before '&' token 7 | while(scanf("%d,%lf,%lf",&x.&y,&z); | ^ a.cc:7:35: error: expected ')' before ';' token 7 | while(scanf("%d,%lf,%lf",&x.&y,&z); | ~ ^ | ) a.cc: At global scope: a.cc:10:1: error: expected unqualified-id before 'return' 10 | return 0; | ^~~~~~ a.cc:11:1: error: expected declaration before '}' token 11 | } | ^
s238931306
p00075
C++
#include<stdio.h> int main(){ double y,z; int x; while(scanf("%d,%lf,%lf",&x.&y,&z)!=EOF){ if((y/z/z)>=25)printf("%d\n",x); } return 0; }
a.cc: In function 'int main()': a.cc:7:29: error: expected unqualified-id before '&' token 7 | while(scanf("%d,%lf,%lf",&x.&y,&z)!=EOF){ | ^
s890129226
p00075
C++
#include <iostream> #include <cstdio> using namespace std; #define rep2(x,from,to) for(int x = (from); x < (to); ++(x)) #define rep(x,to) rep2(x,0,to) int main() { int n; double w, h; char a, b; while(cin >> n >> a >> w >> b >> h) { if(w/pow(h,2.0) >= 25) cout << n << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:22: error: 'pow' was not declared in this scope 12 | if(w/pow(h,2.0) >= 25) cout << n << endl; | ^~~
s007011107
p00075
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <cstring> #include <cmath> #include <queue> #include <map> #include <set> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define FOR(i,s,n) for(int i=s; i<n; i++) #define ALL(x) x.begin(), x.end() #define pb push_back #define foreach(it,con) for(auto it=con.begin();it!=con.end();it++) typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef vector<int> vi; struct Person{ Person(int _id,int _m,int _h):h(_h),m(_m),id(_id){ } int id; float m; float h; float bmi(){ return mass/h*h; } }; int main(){ list<Person> pers; while(cin>>n,n){ rep(i,n){ int id; float m,h; cin>>id,m,h; Person p(id,m,h); if(p.bmi()>=25.0){ cout << id << endl; } } } return 0; }
a.cc: In member function 'float Person::bmi()': a.cc:30:24: error: 'mass' was not declared in this scope 30 | return mass/h*h; | ^~~~ a.cc: In function 'int main()': a.cc:35:9: error: 'list' was not declared in this scope 35 | list<Person> pers; | ^~~~ a.cc:11:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>' 10 | #include <set> +++ |+#include <list> 11 | using namespace std; a.cc:35:20: error: expected primary-expression before '>' token 35 | list<Person> pers; | ^ a.cc:35:22: error: 'pers' was not declared in this scope 35 | list<Person> pers; | ^~~~ a.cc:36:20: error: 'n' was not declared in this scope; did you mean 'yn'? 36 | while(cin>>n,n){ | ^ | yn
s410376607
p00075
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <cstring> #include <cmath> #include <queue> #include <map> #include <set> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define FOR(i,s,n) for(int i=s; i<n; i++) #define ALL(x) x.begin(), x.end() #define pb push_back #define foreach(it,con) for(auto it=con.begin();it!=con.end();it++) typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef vector<int> vi; struct Person{ Person(int _id,int _m,int _h):h(_h),m(_m),id(_id){ } int id; float m; float h; float bmi(){ return mass/h*h; } }; int main(){ int n; while(cin>>n,n){ rep(i,n){ int id; float m,h; cin>>id,m,h; Person p(id,m,h); if(p.bmi()>=25.0){ cout << id << endl; } } } return 0; }
a.cc: In member function 'float Person::bmi()': a.cc:30:24: error: 'mass' was not declared in this scope 30 | return mass/h*h; | ^~~~
s676002114
p00075
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <cstring> #include <cmath> #include <queue> #include <map> #include <set> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define FOR(i,s,n) for(int i=s; i<n; i++) #define ALL(x) x.begin(), x.end() #define pb push_back #define foreach(it,con) for(auto it=con.begin();it!=con.end();it++) typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef vector<int> vi; struct Person{ Person(int _id,int _m,int _h):h(_h),m(_m),id(_id){ } int id; float m; float h; float bmi(){ return mass/h*h; } }; int main(){ int n; while(cin>>n,n){ rep(i,n){ int id; float m,h; cin>>id >> m >> h; Person p(id,m,h); if(p.bmi()>=25.0){ cout << id << endl; } } } return 0; }
a.cc: In member function 'float Person::bmi()': a.cc:30:24: error: 'mass' was not declared in this scope 30 | return mass/h*h; | ^~~~
s801949250
p00075
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <cstring> #include <cmath> #include <queue> #include <map> #include <set> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define FOR(i,s,n) for(int i=s; i<n; i++) #define ALL(x) x.begin(), x.end() #define pb push_back #define foreach(it,con) for(auto it=con.begin();it!=con.end();it++) typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef vector<int> vi; struct Person{ Person(int _id,int _m,int _h):h(_h),m(_m),id(_id){ } int id; float m; float h; float bmi(){ return mass/h*h; } }; int main(){ int n; while(cin>>n,n){ rep(i,n){ } } return 0; }
a.cc: In member function 'float Person::bmi()': a.cc:30:24: error: 'mass' was not declared in this scope 30 | return mass/h*h; | ^~~~
s593205201
p00075
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <cstring> #include <cmath> #include <queue> #include <map> #include <set> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define FOR(i,s,n) for(int i=s; i<n; i++) #define ALL(x) x.begin(), x.end() #define pb push_back #define foreach(it,con) for(auto it=con.begin();it!=con.end();it++) typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef vector<int> vi; struct Person{ Person(int _id,float _m,float _h) :id(_id),h(_h),m(_m){ } int id; float m; float h; float bmi(){ return mass/h*h; } }; int main(){ int n; while(cin>>n,n){ rep(i,n){ } } return 0; }
a.cc: In member function 'float Person::bmi()': a.cc:31:24: error: 'mass' was not declared in this scope 31 | return mass/h*h; | ^~~~
s828890802
p00075
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <cstring> #include <cmath> #include <queue> #include <map> #include <set> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define FOR(i,s,n) for(int i=s; i<n; i++) #define ALL(x) x.begin(), x.end() #define pb push_back #define foreach(it,con) for(auto it=con.begin();it!=con.end();it++) typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef vector<int> vi; struct Person{ Person(int _id,int _m,int _h):h(_h),m(_m),id(_id){ } int id; float m; float h; float bmi(){ return m/h*h; } }; int main(){ stringstream str; while(cin>>str){ int id; char split; float m,h; str >>id >> split >> m >> split >> h; Person p(id,m,h); if(p.bmi()>=25.0){ cout << id << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:35:22: error: aggregate 'std::stringstream str' has incomplete type and cannot be defined 35 | stringstream str; | ^~~
s402706731
p00075
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <cstring> #include <cmath> #include <queue> #include <map> #include <set> #include <sstream> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define FOR(i,s,n) for(int i=s; i<n; i++) #define ALL(x) x.begin(), x.end() #define pb push_back #define foreach(it,con) for(auto it=con.begin();it!=con.end();it++) typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef vector<int> vi; struct Person{ Person(int _id,int _m,int _h):h(_h),m(_m),id(_id){ } int id; float m; float h; float bmi(){ return m/h*h; } }; int main(){ stringstream str; while(cin>>str){ int id; char split; float m,h; str >>id >> split >> m >> split >> h; Person p(id,m,h); if(p.bmi()>=25.0){ cout << id << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:37:18: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'}) 37 | while(cin>>str){ | ~~~^~~~~ | | | | | std::stringstream {aka std::__cxx11::basic_stringstream<char>} | std::istream {aka std::basic_istream<char>} a.cc:37:18: note: candidate: 'operator>>(int, int)' (built-in) 37 | while(cin>>str){ | ~~~^~~~~ a.cc:37:18: note: no known conversion for argument 2 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'int' In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::stringstream' {aka 'std::__cxx11::basic_stringstream<char>'} to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133