submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s238302693 | p00100 | C++ | #include <iostream>
#include <string>
#include <vector>
std::vector<std::string> split(const std::string& ref,char c){
std::vector<std::string> res;
size_t current=0, found;
while((found=ref.find_first_of(c,current))!=std::string::npos){
res.push_back(std::string(ref,current,found-current));
current=found+1;
}
res.pus... | a.cc: In function 'int main()':
a.cc:29:14: error: no matching function for call to 'std::vector<int>::push_back(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
29 | res.push_back(ref[0]);
| ~~~~~~~~~~~~~^~~~~~~~
In file included fr... |
s329892010 | p00100 | C++ | #include <iostream>
#include <string>
#include <vector>
std::vector<std::string> split(const std::string& ref,char c){
std::vector<std::string> res;
size_t current=0, found;
while((found=ref.find_first_of(c,current))!=std::string::npos){
res.push_back(std::string(ref,current,found-current));
current=found+1;
}
res.pus... | a.cc: In function 'int main()':
a.cc:32:19: error: expected ';' before '}' token
32 | std::cin >> it_num
| ^
| ;
33 | }
| ~
|
s034835574 | p00100 | C++ | #include <iostream>
#include <string>
#include <vector>
std::vector<std::string> split(const std::string& ref,char c){
std::vector<std::string> res;
size_t current=0, found;
while((found=ref.find_first_of(c,current))!=std::string::npos){
res.push_back(std::string(ref,current,found-current));
current=found+1;
}
res.pus... | a.cc: In function 'int main()':
a.cc:41:12: error: expected ';' before 'std'
41 | res.clear()
| ^
| ;
42 | std::cin >> it_num;
| ~~~
|
s216662568 | p00100 | C++ | using namespace std;
typedef long long ll;
ll em[4000];
int flag[4000];
int main(){
int n;
while(true){
int id,p,q;
cin >> n;
if(!n) return 0;
for(int i = 0; i < n; i++){
cin>>id>>p>>q;
em[id-1] += (ll)p * q;
flag[i] = id;
}
int f = 1;
for(int i = 0; i < n; i++){
if(em[flag[i]-1] >= 100000... | a.cc: In function 'int main()':
a.cc:11:17: error: 'cin' was not declared in this scope
11 | cin >> n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace... |
s946582969 | p00100 | C++ | #include<iostream>
using namespace std;
#define SHINE_MAX 4000
#define ELITE 1000000
#define AHO "NA"
int shineN,eliteN;
long int shineU[SHINE_MAX]; //?£??????????
int num,tanka,suryo;
int i;
int main(){
white(1){
cin>>shineN;
if(shineN==0){break;}
for(i=0;i<SHINE_MAX;i++){shineU[i]=0;}
for(i=0;i<shineN;i+... | a.cc: In function 'int main()':
a.cc:15:9: error: 'white' was not declared in this scope; did you mean 'fwrite'?
15 | white(1){
| ^~~~~
| fwrite
|
s998218510 | p00100 | C++ | #include<iostream>
using namespace std;
#define SHINE_MAX 4000
#define ELITE 1000000
#define AHO "NA"
int shineN,eliteN;
long int shineU[SHINE_MAX]; //?£??????????
int num,tanka,suryo;
int i;
int main(){
white(1){
cin>>shineN;
if(shineN==0){break;}
for(i=0;i<SHINE_MAX;i++){shineU[i]=0;}
for(i=0;i<shineN;i+... | a.cc: In function 'int main()':
a.cc:15:9: error: 'white' was not declared in this scope; did you mean 'fwrite'?
15 | white(1){
| ^~~~~
| fwrite
|
s851416060 | p00100 | C++ | #include<iostream>
using namespace std;
#define SHINE_MAX 4000
#define ELITE 1000000
#define AHO "NA"
int shineN,eliteN;
int shineI[SHINE_MAX] //??????????????????
long int shineU[SHINE_MAX]; //?£??????????
int dataN,num,tanka,suryo;
int i,j;
int main(){
while(1){
//??\???
cin>>dataN;
if(dataN==0){break;}
shine... | a.cc:10:1: error: expected initializer before 'long'
10 | long int shineU[SHINE_MAX]; //?£??????????
| ^~~~
a.cc: In function 'int main()':
a.cc:25:14: error: 'enemyI' was not declared in this scope
25 | if(enemyI[i]==num){break;}
| ^~~~~~
a.cc:28:11: error: 'shineU' was not... |
s296561432 | p00100 | C++ | #include<iostream>
using namespace std;
#define SHINE_MAX 4000
#define ELITE 1000000
#define AHO "NA"
int shineN,eliteN;
int shineI[SHINE_MAX] //??????????????????
long int shineU[SHINE_MAX]; //?£??????????
int dataN,num,tanka,suryo;
int i,j;
int main(){
while(1){
//??\???
cin>>dataN;
if(dataN==0){break;}
shine... | a.cc:10:1: error: expected initializer before 'long'
10 | long int shineU[SHINE_MAX]; //?£??????????
| ^~~~
a.cc: In function 'int main()':
a.cc:25:14: error: 'shineI' was not declared in this scope; did you mean 'shineN'?
25 | if(shineI[i]==num){break;}
| ^~~~~~
| ... |
s530393780 | p00100 | C++ | #include<iostream>
using namespace std;
#define SHINE_MAX 4000
#define ELITE 1000000
#define AHO "NA"
int shineN,eliteN;
int shineI[SHINE_MAX]; //??????????????????
long int shineU[SHINE_MAX]; //?£??????????
int dataN,num
long int tanka,suryo;
int i,j;
int main(){
while(1){
//??\???
cin>>dataN;
if(dataN==0){brea... | a.cc:13:1: error: expected initializer before 'long'
13 | long int tanka,suryo;
| ^~~~
a.cc: In function 'int main()':
a.cc:23:15: error: 'num' was not declared in this scope; did you mean 'enum'?
23 | cin>>num>>tanka>>suryo;num--;
| ^~~
| enum
a.cc:23:20: er... |
s172804280 | p00100 | C++ | ggggggggggggggggg | a.cc:1:1: error: 'ggggggggggggggggg' does not name a type
1 | ggggggggggggggggg
| ^~~~~~~~~~~~~~~~~
|
s347923606 | p00100 | C++ | #include<iostream>
using std;
int main(){
int id,price,num,count;
bool isBe=false;
while(true){
cin>>count;
if(count==0){
break;
}
for(int i=0;i<count;i++){
cin>>id>>price>>num;
if(price*num>=100000){
cout<<id<<'\n';
isBe=true;
}
}
if(!isBe){
cout<<"NA\n";
}
count=0;
isBe=fa... | a.cc:2:7: error: expected nested-name-specifier before 'std'
2 | using std;
| ^~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin>>count;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostr... |
s330394080 | p00100 | C++ | #include<iostream>
using namespace std;
int main(){
int id,price,num,count,SaleResult[4000];
bool isBe=false;
while(true){
cin>>count;
if(count==0){
break;
}
for(int i=0;i<count;i++){
cin>>id>>price>>num;
SaleResult[id]+=price*num;
if(SaleResult[id]>=1000000&&){
cout<<id<<'\n';
isBe=tru... | a.cc: In function 'int main()':
a.cc:16:32: error: expected primary-expression before ')' token
16 | if(SaleResult[id]>=1000000&&){
| ^
|
s409309583 | p00100 | C++ | //Sale Result
//
//?????????????£?????????¨?£??????°???????¨????????????????????????????????????????????????????????£?????????¨?£??????°??????????????????????£???????????????????????????? 1, 000, 000 ?????\??????????????????????????????????????????????????°??????????????????????????????????????????????????°????????´???... | a.cc: In function 'int main()':
a.cc:64:17: error: 'memset' was not declared in this scope
64 | memset(input, 0x00, sizeof(input));
| ^~~~~~
a.cc:44:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
43 | #include <map>... |
s802967965 | p00100 | C++ | //Sale Result
//
//?????????????£?????????¨?£??????°???????¨????????????????????????????????????????????????????????£?????????¨?£??????°??????????????????????£???????????????????????????? 1, 000, 000 ?????\??????????????????????????????????????????????????°??????????????????????????????????????????????????°????????´???... | a.cc: In function 'int main()':
a.cc:64:17: error: 'memset' was not declared in this scope
64 | memset(input, 0x00, sizeof(input));
| ^~~~~~
a.cc:44:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
43 | #include <map>... |
s388930696 | p00100 | C++ | include <iostream>
#include <map>
#include <vector>
using namespace std;
int main(){
int n,number;
long long a,b;
bool flag;
map<int,long long> info;
vector<int> seq;
while(cin >> n && n){
info.clear();
seq.clear();
while(n--){
cin >> number >> a >> b;
if(!info[number])seq.push_back(number); // ??¢... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/bits/stl_tree.h:63,
from /usr/include/c++/14/map:62,
from a.cc:2:
/usr/include/c++/14/e... |
s282424125 | p00100 | C++ | include <iostream>
#include <map>
#include <vector>
using namespace std;
int main(){
int n,number;
long long a,b;
bool flag;
map<int,long long> info;
vector<int> seq;
while(cin >> n && n){
info.clear();
seq.clear();
while(n--){
cin >> number >> a >> b;
if(!info[number])seq.push_back(number);
inf... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/bits/stl_tree.h:63,
from /usr/include/c++/14/map:62,
from a.cc:2:
/usr/include/c++/14/e... |
s373249458 | p00100 | C++ | #include <iostream>
#include <vector>
#include <algorithm> // sort
#include <map> // pair
using namespace std;
int n;
int main(){
while((cin >> n) != 0){
int num = 0;
vector<pair<int, int> > pairs(n);
for(int i = 0; i < n; i++){
int p, q;
cin >> pairs[i].first >> p >> q;
pairs[i].second = p * q;
}
... | a.cc:28:56: error: stray '\' in program
28 | cout << sum << \n;
| ^
a.cc: In function 'int main()':
a.cc:9:26: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std:... |
s740699678 | p00100 | C++ | #include <iostream>
int main()
{
bool loop = true;
while (loop) {
int dataset_num;
itn count = 0;
std::cin >> dataset_num;
if (dataset_num == 0) {
loop = false;
break;
}
for (int i = 0; i < dataset_num; i++) {
int officer_nu... | a.cc: In function 'int main()':
a.cc:9:9: error: 'itn' was not declared in this scope; did you mean 'int'?
9 | itn count = 0;
| ^~~
| int
a.cc:27:17: error: 'count' was not declared in this scope
27 | count +=1;
| ^~~~~
a.cc:30:13: error: ... |
s802459353 | p00100 | C++ | // a.c.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
int n;
int ban, tan, suu;
int bango[4001];
int flg,i;
while (1){
for (i = 1; i <= 4000; i++){
bango[i] = 0;
}
scanf_s("%d", &n);
if (n ==... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s062465489 | p00100 | C++ | // a.c.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
int n;
int ban, tan, suu;
long long int bango[4001];
int flg,i;
while (1){
for (i = 1; i <= 4000; i++){
bango[i] = 0;
}
scanf_s("%d", &n);
... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s886389141 | p00100 | C++ | // a.c.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include <stdio.h>
int main(void){
int n;
int ban, tan, suu;
long long int bango[4001];
int flg,i;
while (1){
for (i = 1; i <= 4000; i++){
bango[i] = 0;
}
scanf_s("%d", &n);
if (n == 0){
break;
... | a.cc: In function 'int main()':
a.cc:14:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
14 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s958881388 | p00100 | C++ | #include <bits/stdc++.h>
using namespace std ;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<end... | a.cc: In function 'int main()':
a.cc:71:36: error: expected ';' before 'v2'
71 | if(v2[a] + b * a >= 1000000)i v2[a] = 1000000;
| ^~~
| ;
|
s834573165 | p00100 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
while(cin >> n){
if(n == 0) break;
int id, price, amount;
vector<int> v;
for(int i = 0; i < n; i++){
cin >> id >> price >> amount;
if(price * amount >= 10000){
auto itr = find(v.begin(), v.end(), id);
if(itr == v.end(... | a.cc: In function 'int main()':
a.cc:14:48: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
14 | auto itr = find(v.begin(), v.end(), id);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In fil... |
s180022173 | p00100 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
while(cin >> n){
if(n == 0) break;
int id, price, amount;
vector<int> v;
for(int i = 0; i < n; i++){
cin >> id >> price >> amount;
if(price * amount >= 10000){
vector<int>::iterator itr = find(v.begin(), v.end(), id);
... | a.cc: In function 'int main()':
a.cc:14:65: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
14 | vector<int>::iterator itr = find(v.begin(), v.end(), id);
| ~... |
s284075481 | p00100 | C++ | #include <cstdio.h>
using namespace std;
int main() {
int tmp=0, tmpi=0, tmpp=0, tmpq=0, n=1, tmpn=0, ans0=0;
long long int ans[4001];
while (1) {
ans0=0;
scanf("%d", &n);
if (n==0) break;
for (tmp=0;tmp<4001;tmp++) ans[tmp]=0;
for (tmpn=0;tmpn<n;tmpn++) {
scanf("%d %d %d", &tmpi, &tmpp, &tmpq);
ans... | a.cc:1:10: fatal error: cstdio.h: No such file or directory
1 | #include <cstdio.h>
| ^~~~~~~~~~
compilation terminated.
|
s883103843 | p00100 | C++ | #include<iostream>
#include<map>
#include<vector>
using namespace std;
int main()
{
int n;
while(cin>>n && n){
map<int,int> mp;
vector<int> v;
for(int i=0; i<n; i++){
int e,p,q;
cin>>e>>p>>q;
if(!mp[e])
v.push_ba... | a.cc: In function 'int main()':
a.cc:36:6: error: expected '}' at end of input
36 | }
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s410725450 | p00100 | C++ | #include<iostream>
#include<map>
#include<vector>
using namespace std;
int main()
{
int n;
while(cin>>n && n){
map<int,int> mp;
vector<int> v;
for(int i=0; i<n; i++){
int e,p,q;
cin>>e>>p>>q;
if(!mp[e])
v.push_ba... | a.cc: In function 'int main()':
a.cc:36:6: error: expected '}' at end of input
36 | }
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s360900454 | p00100 | C++ | num=int(input())
emp=[]
cnt=0
for i in range(num):
emp.append(num)
emp[i]=[int(k) for k in input().split()]
for i in range(num):
for q in range(i+1,num):
if emp[i][0]==emp[q][0]:
emp[i][1]=emp[i][1]+emp[q][1]
emp[i][2]=emp[i][2]+emp[q][2]
emp[q][1],emp[q][2]=0,0
... | a.cc:17:11: warning: multi-character character constant [-Wmultichar]
17 | print('NA')
| ^~~~
a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'?
1 | num=int(input())
| ^~~
| enum
|
s221705796 | p00100 | C++ | #include<iostream>
using namespace std;
int main() {
long long number[4001] = {};
long long e, p, q;
int MAX = 0;
int n;
while (cin >> n, n) {
for (int i = 0; i < n; i++) {
cin >> e >> p >> q;
if (MAX <= e) { MAX = e; }
number[e - 1] += p*q;
}
}
int x = 0;
for (int i = 0; i < e; i++) {
if (numbe... | a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
25 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s694350885 | p00100 | C++ | #include <cstdio>
#include <cmath>
using namespace std;
int n, e, p, q;
int main() {
while(scanf("%d", &n), n) {
for(int i = 0, i < n; i++) {
scanf("%d %d %d", e, p, q);
if(p * q >= 1e6) printf("%d\n", e);
}
}
} | a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before '<' token
10 | for(int i = 0, i < n; i++) {
| ^~
| ;
a.cc:10:22: error: expected primary-expression before '<' token
10 | for(int i = 0, i < n; i++) {
| ^
|
s020163675 | p00100 | C++ | #include<iostream>
#include<vector>;
using namespace std;
int main() {
int n;
while (cin >> n){
if (n == 0)break;
long long u[4010] = { 0 };
vector<int>l;
for (int i = 0; i < n; i++){
long a, b, c;
cin >> a >> b >> c;
u[a] += b*c;
if (u[a] >= 1000000 && find(l.begin(), l.end(), a) == l.end())l.pus... | a.cc:2:17: warning: extra tokens at end of #include directive
2 | #include<vector>;
| ^
a.cc: In function 'int main()':
a.cc:14:52: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, long int&)'
14 | if (u[a] >= 1000... |
s580272649 | p00100 | C++ | #include<iostream>
#include<vector>;
using namespace std;
int main() {
int n;
while (cin >> n){
if (n == 0)break;
long long u[4010] = { 0 };
vector<int>l;
for (int i = 0; i < n; i++){
long a, b, c;
cin >> a >> b >> c;
u[a] += b*c;
if (u[a] >= 1000000 && find(l.begin(), l.end(), a) == l.end())l.pus... | a.cc:2:17: warning: extra tokens at end of #include directive
2 | #include<vector>;
| ^
a.cc: In function 'int main()':
a.cc:14:52: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, long int&)'
14 | if (u[a] >= 1000... |
s648593578 | p00100 | C++ | #include<iostream>
#include<vector>;
using namespace std;
int main() {
int n;
while (cin >> n){
if (n == 0)break;
long long u[4010] = { 0 };
vector<int>l;
for (int i = 0; i < n; i++){
long a, b, c;
cin >> a >> b >> c;
u[a] += b*c;
if (u[a] >= 1000000 && find(l.begin(), l.end(), a) == l.end())l.pus... | a.cc:2:17: warning: extra tokens at end of #include directive
2 | #include<vector>;
| ^
a.cc: In function 'int main()':
a.cc:14:52: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, long int&)'
14 | if (u[a] >= 1000... |
s800576530 | p00100 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
int x[4001] = {0};
int m[4001] = {0};
while(1){
int e, p, q;
cin >> n;
if(n == 0) break;
x[4001] = {0};
bool flag = true;
for(int i = 1; i <= n; i++){
cin >> e >> p >> q;
m[i] = e;
x[e] += p * q;
}
for(int i = 1; i <= n;... | a.cc: In function 'int main()':
a.cc:25:46: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
25 | cout << m[i] << end;
| ~~~~~~~~~~~~~^~~~~~
In file included from /usr/incl... |
s518191990 | p00100 | C++ | #include<iostream>
#include<array>
#include<vector>
using namespace std;
int main()
{
array<long long, 4000> ar;
vector<long long> ans;
long long n;
int e,p,q;
while (true) {
cin >> n;
ar.fill(0);
if (!n) {
break;
}
bool isNA = true;
for (int i = 0; i < n; ++i) {
cin >> e >> p >> q;
ar[e] ... | a.cc: In function 'int main()':
a.cc:28:42: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >&, std::vector<long long int>::iterator, int&)'
28 | it = find(it, ans.end(), i);
| ... |
s718961056 | p00100 | C++ | #include<iostream>
#include<array>
#include<vector>
using namespace std;
int main()
{
array<long long, 4000> ar;
vector<long long> ans;
long long n;
int e,p,q;
while (true) {
cin >> n;
ar.fill(0);
if (!n) {
break;
}
bool isNA = true;
for (int i = 0; i < n; ++i) {
cin >> e >> p >> q;
ar[e] ... | a.cc: In function 'int main()':
a.cc:28:47: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >&, std::vector<long long int>::iterator, int&)'
28 | it = std::find(it, ans.end(), i);
| ... |
s617466133 | p00100 | C++ | #include <iostream>
using namespace std;
int N, M;
int main() {
int goal = 1000000;
for (; cin >> N;) {
if (!N) break;
int v[4000];
memset(v, 0, sizeof(v));
for (int i = 0; i < N; i++) {
int e, p, q;
cin >> e >> p >> q;
v[e - 1] += p*q;
}
bool flag = false;
for (int i = 0; i < 4000; i++) {
... | a.cc: In function 'int main()':
a.cc:13:17: error: 'memset' was not declared in this scope
13 | memset(v, 0, sizeof(v));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ ... |
s769047035 | p00100 | C++ | #include <iostream>
#include <string.h>
#include <queue>
using namespace std;
int N, M;
int main() {
long long goal = 1000000;
for (; cin >> N;) {
if (!N) break;
long long v[4000];
queue<int> que;
memset(v, 0, sizeof(v));
for (int i = 0; i < N; i++) {
long long e, p, q;
cin >> e >> p >> q;
q... | a.cc: In function 'int main()':
a.cc:28:51: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
28 | cout << que.front + 1 << endl;
| ~~~~~~~~~ ^ ~
| ... |
s246454278 | p00100 | C++ | #include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;
/*temp*/
int main(){
int e, p, q;
while(cin >> n, n != 0) {
ll m[4001] = {};
int a[1000] = {};
REP(i, n){
... | a.cc: In function 'int main()':
a.cc:11:18: error: 'n' was not declared in this scope
11 | while(cin >> n, n != 0) {
| ^
|
s727090000 | p00100 | C++ | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
??
#include <stdio.h>
#include <ctype.h>
#include <string>
#include <iostream>
#include <vector>
#include <stack>
#include <fstream>
#include <sstream>
#include <queue>
#include <exception>
#include <cmath>
#include <numeric>
??
using namespace std;
typedef long... | a.cc:3:1: error: expected unqualified-id before '?' token
3 | ??
| ^
In file included from a.cc:5:
/usr/include/ctype.h:81:14: error: '__int32_t' does not name a type; did you mean '__int128_t'?
81 | extern const __int32_t **__ctype_tolower_loc (void)
| ^~~~~~~~~
| __i... |
s849819986 | p00100 | C++ | #include <iostream>
using namespace std;
typedef long long ll;
//vector<pair<bool, ll>> v(4001);
unsigned ll a[4001];
int main(){
int n, num, p, q;
while(cin >> n, n){
fill(a, a+4001, 0);
for(int i = 0;i < n;i++){
cin >> num >> p >> q;
a[num] += p * q;
}
int f = 1;
for(int i = 1;i <= 4000;i++)if(a[i]... | a.cc:5:13: error: expected initializer before 'a'
5 | unsigned ll a[4001];
| ^
a.cc: In function 'int main()':
a.cc:10:22: error: 'a' was not declared in this scope
10 | fill(a, a+4001, 0);
| ^
|
s795673726 | p00100 | C++ | while True:
n = int(input())
if n == 0:
break
d = dict()
sep = []
for _ in range(n):
i, p, q = map(int, input().split())
if i in d:
d[i] += p*q
else:
d[i] = p*q
sep.append(i)
tmp = list(filter(lambda x: x[1] >= 1000000, d.items(... | a.cc:1:1: error: expected unqualified-id before 'while'
1 | while True:
| ^~~~~
|
s445220878 | p00100 | C++ | dfdf | a.cc:1:1: error: 'dfdf' does not name a type
1 | dfdf
| ^~~~
|
s976874382 | p00100 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
using namespace std;
void shoki();
void henkan(string);
int tansaku(int);
pair<string,long long> num[4001];
int n,ban,tanka,kazu,i,j,memo;
bool dp[4001]={false};
int main(){
int al=0;
bool y=false;
while(1){
shoki();
cin>>... | a.cc: In function 'int main()':
a.cc:49:17: error: 'memset' was not declared in this scope
49 | memset(dp,false,sizeof(dp));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<utility>
++... |
s187794660 | p00100 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
vector<pair<int, long>> vec;
int n;
while (cin >> n && n > 0) {
for (int i = 0; i < n; i++) {
int id;
long p, q;
cin >> id >> p >> q;
... | a.cc: In function 'int main()':
a.cc:17:24: error: 'find_if' was not declared in this scope
17 | auto pre = find_if(
| ^~~~~~~
|
s299756873 | p00100 | C++ | #include<iostream>
using namespace std;
int main(){
int n;
long int array[n][3];
int count=0;
cin>>n;
if(n==0) goto Exit;
for(int i=0;i<n;i++){
cin>>array[i][0]>>array[i][1]>>array[i][2];
}
for(int i=0;i<n;i++){
for(int j=1;i+j<n;j++){
if(array[i][0]==... | a.cc: In function 'int main()':
a.cc:34:5: error: 'Exit' was not declared in this scope; did you mean 'exit'?
34 | Exit;
| ^~~~
| exit
a.cc:11:19: error: label 'Exit' used but not defined
11 | if(n==0) goto Exit;
| ^~~~
|
s378659283 | p00100 | C++ | #include<bits/stdc++.h>
using namespace std;
long long sum[10000];
int main(){
long long int n, a[10000], b, c;
while(true){
scanf("%lld", &n);
if(n==0)break;
bool na = true;
for(int i = 0; i < n; i++){
scanf("%lld%lld%lld", &a[i], &b, &c);
sum[a] += b*c;
... | a.cc: In function 'int main()':
a.cc:12:16: error: invalid types 'long long int [10000][long long int [10000]]' for array subscript
12 | sum[a] += b*c;
| ^
|
s531707767 | p00100 | C++ | #include<bits/stdc++.h>
using namespace std;
long long sum[10000];
int main(){
int a[10000];
long long int n, b, c;
while(true){
scanf("%lld", &n);
if(n==0)break;
bool na = true;
for(int i = 0; i < n; i++){
scanf("%d%lld%lld", &a[i], &b, &c);
sum[a] +=... | a.cc: In function 'int main()':
a.cc:13:16: error: invalid types 'long long int [10000][int [10000]]' for array subscript
13 | sum[a] += b*c;
| ^
|
s556753164 | p00100 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
while(1){
int n;
cin>>n;
if(n == 0){
break;
}
vector<int,int> data;
for(int i = 0;i < n;++i){
int num,sa,ko;
cin>>num;
cin>>sa;
cin>>ko;
data.push_back(make_pair(num,sa * ko));
}
for(pair... | In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<int, int>':
/usr/i... |
s104653939 | p00100 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
while(1){
int n;
cin>>n;
if(n == 0){
break;
}
vector<pair<int,int>> data;
vector<int> nanum;
for(int i = 0;i < n;++i){
int num,sa,ko;
cin>>num;
cin>>sa;
cin>>ko;
int sum = sa * ko;
if(i... | a.cc: In function 'int main()':
a.cc:31:9: error: expected ',' or ';' before 'if'
31 | if(b == 0){
| ^~
|
s934001304 | p00100 | C++ | (n == 0) {break;};
unsigned long int price[4000], value[4000];
for (int i = 0; i < 4000; i++) {
price[i] = 0;
value[i] = 0;
}
for (int i = 0; i < n; i++) {
int a,b,c;
cin >> a >> b >> c;
price[a-1] += b;
value[a-1] += c;
}
bool NA =
| a.cc:1:3: error: expected ')' before '==' token
1 | (n == 0) {break;};
| ~ ^~~
| )
a.cc:3:5: error: expected unqualified-id before 'for'
3 | for (int i = 0; i < 4000; i++) {
| ^~~
a.cc:3:21: error: 'i' does not name a type
3 | for (int i = 0; i < 4000; i++) {
| ... |
s366857653 | p00100 | C++ | #include <iostream>
int main(){
int i, n, q;
long long int p;
while(cin >> n, n){
bool NfAlg = false;
while(n--){
cin >> i >> p >> q;
if((p * q) >= static_cast<int>(1e6)){
cout << i << endl;
NAflg = true;
}
}
if(NAflg)
cout << "NA" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | while(cin >> n, n){
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ... |
s215874415 | p00100 | C++ | 4
1001 2000 520
1002 1800 450
1003 1600 625
1001 200 1220
2
1001 100 3
1005 1000 100 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4
| ^
|
s815702599 | p00100 | C++ | #include <iostream>
#include <stdlib.h>
using namespace std;
typedef struct{
int sum;
int pr;
} data;
int main(int argc, char **argv)
{
int i, p, q, n, size = 0, flag, pri = 1, max;
data *sarray = (data *)calloc(4000, sizeof(int));
int *id = (int *)calloc(1000, sizeof(int));
while(1){
cin >> n;
if(n == 0... | a.cc: In function 'int main(int, char**)':
a.cc:13:9: error: reference to 'data' is ambiguous
13 | data *sarray = (data *)calloc(4000, sizeof(int));
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
f... |
s713187641 | p00100 | C++ | #include<cstdio>
int main(){
int a,i;
bool fl;
unsigned long int b,c;
while(1){
scanf("%d",&i);
fl=false;
for(;i>0;i--){
scanf("%d",&a);
if(a==0){
return 0;
}
scanf("%d",&b);
scanf("%d",&c);
if(a*c>=1000000) {
fl=true;
printf("%d\n",a);
}
if(fl==false) pritnf("NA\n");
}
}
} | a.cc: In function 'int main()':
a.cc:23:15: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
23 | if(fl==false) pritnf("NA\n");
| ^~~~~~
| printf
|
s157328805 | p00100 | C++ | #include<cstdio>
int main(){
int a,i;
bool fl;
unsigned long int b,c;
while(1){
scanf("%d",&i);
fl=false;
for(int j=0;j<i;j++){
scanf("%d",&a);
if(a==0){
return 0;
}
scanf("%d",&b);
scanf("%d",&c);
if(a*c>=1000000) {
fl=true;
printf("%d\n",a);
}
if(fl==false) pritnf("NA\n");
}
}
} | a.cc: In function 'int main()':
a.cc:23:15: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
23 | if(fl==false) pritnf("NA\n");
| ^~~~~~
| printf
|
s998083557 | p00100 | C++ | #include<cstdio>
int main(){
int a,i,fl;
unsigned long int b,c;
while(1){
scanf("%d",&i);
fl=0;
for(int j=0;j<i;j++){
scanf("%d",&a);
if(a==0){
return 0;
}
scanf("%d",&b);
scanf("%d",&c);
if(a*c>=1000000) {
fl=1;
printf("%d\n",a);
}
if(fl==false) pritnf("NA\n");
}
}
} | a.cc: In function 'int main()':
a.cc:22:15: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
22 | if(fl==false) pritnf("NA\n");
| ^~~~~~
| printf
|
s743139209 | p00100 | C++ | #include<cstdio>
int main(){
int a,i,fl;
unsigned long int b,c;
while(1){
scanf("%d",&i);
fl=0;
for(int j=0;j<i;j++){
scanf("%d",&a);
if(a==0){
return 0;
}
scanf("%ld",&b);
scanf("%ld",&c);
if(a*c>=1000000) {
fl=1;
printf("%d\n",a);
}
if(fl==false) pritnf("NA\n");
}
}
} | a.cc: In function 'int main()':
a.cc:22:15: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
22 | if(fl==false) pritnf("NA\n");
| ^~~~~~
| printf
|
s553831786 | p00100 | C++ | #include<iostream>
#include<map>
#include<algorithm>
using namespace std;
main(){
while(1){
int n,a,b,c;
cin>>n;
if(n==0) break;
map<long,int> m;
for(;n>0;n--){
cin>>a>>b>>c;
m.insert((long)b*c,a);
}
m.sort();
cout<<(m.begin()).first<<endl;
}
}
cout<<"NA"<<endl;
} | a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:13:9: error: no matching function for call to 'std::map<long int, int>::insert(long int, int&)'
13 | m.insert((long)b*c,a);
| ~~~~~~~~^~~~~~~~~~~~~
In file inc... |
s375119309 | p00100 | C++ | #include<iostream>
#include<map>
#include<algorithm>
using namespace std;
main(){
while(1){
int n,a,b,c;
cin>>n;
if(n==0) break;
map<long,int> m;
for(;n>0;n--){
cin>>a>>b>>c;
m.insert(map<long,int>((long)b*c,a));
}
m.sort();
cout<<(m.begin()).first<<endl;
}
cout<<"NA"<<endl;
} | a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:13:38: error: no matching function for call to 'std::map<long int, int>::map(long int, int&)'
13 | m.insert(map<long,int>((long)b*c,a));
| ... |
s578228454 | p00100 | C++ | #include <iostream>
#include <algorithim>
using namespace std;
class MAN{
public:
unsigned int uriage;
short number;
};
int main(int argc, char const* argv[])
{
MAN *person;
int n;
bool flag;
while( cin >> n && n != 0 ){
person = new MAN[n];
for( int i = 0;i < n;i++ ){
int target;
int a,b;
cin >>... | a.cc:2:10: fatal error: algorithim: No such file or directory
2 | #include <algorithim>
| ^~~~~~~~~~~~
compilation terminated.
|
s083293968 | p00100 | C++ | #include <iostream>
#include <algorithim>
using namespace std;
class MAN{
public:
unsigned int uriage;
short number;
};
int main(int argc, char const* argv[])
{
MAN *person;
int n;
bool flag;
while( cin >> n && n != 0 ){
person = new MAN[n];
for( int i = 0;i < n;i++ ){
int target;
int a,b;
cin >>... | a.cc:2:10: fatal error: algorithim: No such file or directory
2 | #include <algorithim>
| ^~~~~~~~~~~~
compilation terminated.
|
s295193639 | p00100 | C++ | #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;
int main()
{... | a.cc: In function 'int main()':
a.cc:31:16: error: expected primary-expression before 'long'
31 | if(long long(b) * c >= 1000000){
| ^~~~
a.cc:31:16: error: expected ')' before 'long'
31 | if(long long(b) * c >= 1000000){
| ~^~~~
| ... |
s157995253 | p00100 | C++ | #include <iostream>
#include <vector>
int main(){
int n,sn,p,c;
std::vector<int> v;
while(std::cin>>n){
if(!n)return 0;
for(;n;n--){
std::cin>>sn>>p>>c;
std::vector<int>::iterator it=find(v.begin(),v.end(),sn);
if(p*c>=1000000){
if(it==v.end()){
v.push_back(sn);
}
}
if(v.em... | a.cc: In function 'int main()':
a.cc:11:41: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
11 | std::vector<int>::iterator it=find(v.begin(),v.end(),sn);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /u... |
s450788574 | p00100 | C++ | #include<cstdio>
#include<cstring>
int main(){
long long int data[4000],n;
scanf("%d",&n);
if(n==0) return 0;
memset(data,0,sizeof(data));
while(n--){
int a
long long int b,c;
scanf("%d%lld%lld",&a,&b,&c);
data[a-1]+=b*c;
}
int k=0;
for(int i=0;i<4000;i++){
if(data[i]>=1000000){
printf("%d\n",i+1);
k=1;
}
}
if(k=... | a.cc: In function 'int main()':
a.cc:11:1: error: expected initializer before 'long'
11 | long long int b,c;
| ^~~~
a.cc:12:21: error: 'a' was not declared in this scope
12 | scanf("%d%lld%lld",&a,&b,&c);
| ^
a.cc:12:24: error: 'b' was not declared in this scope
12 | scanf("%d%l... |
s140148383 | p00100 | C++ | #include<iostream>
using namespace std;
int n;
void solve()
{
bool ok=false;
int total[4000];
bool check[4000];
memset(check,false,sizeof(check));
memset(total,0,sizeof(total));
for(int i=0;i<n;i++){
int num,a,b;
cin>>num>>a>>b;
total[num]+=a*b;
if(total[num]>=1000000 && !check[num]){
cout<<num<<... | a.cc: In function 'void solve()':
a.cc:15:9: error: 'memset' was not declared in this scope
15 | memset(check,false,sizeof(check));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#inc... |
s603371332 | p00100 | C++ | #include<iostream>
#include<vector>
#include<map>
using namespace std;
main(){
//mlÛ¶vÛ¶
long long a,b,c,n,f;
//aÔbP¿cÊ
while(cin>>n,n){
map<int,long long> m;
vector<int> v;
f=1;
for(;n;n--){
cin>>a>>b>>c
if(!m[a])v.push_back(a);
m[a] += b*c;
}
for(int i=... | a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:14:37: error: expected ';' before 'if'
14 | cin>>a>>b>>c
| ^
| ... |
s751550063 | p00100 | C++ | #include<iostream>
#include<vector>
#include<map>
using namespace std;
main(){
//mlÛ¶vÛ¶
long long a,b,c,n,f;
//aÔbP¿cÊ
while(cin>>n,n){
map<int,long long> m;
vector<int> v;
f=1;
for(;n;n--){
cin>>a>>b>>c
if(!m[a])v.push_back(a);
m[a] += b*c;
}
for(int i=... | a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:14:37: error: expected ';' before 'if'
14 | cin>>a>>b>>c
| ^
| ... |
s632695349 | p00100 | C++ | #include<iostream>
#include<vector>
#include<map>
using namespace std;
main(){
//mlÛ¶vÛ¶
long long a,b,c,n,f;
//aÔbP¿cÊ
while(cin>>n,n){
map<int,long long> m;
vector<int> v;
f=1;
for(;n;n--){
cin>>a>>b>>c
if(!m[a])v.push_back(a);
m[a] += b*c;
}
for(int i=... | a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:14:37: error: expected ';' before 'if'
14 | cin>>a>>b>>c
| ^
| ... |
s577052779 | p00100 | C++ | #include<iostream>
#include<vector>
#include<map>
using namespace std;
main(){
//mlÛ¶vÛ¶
long long a,b,c,n,f;
//aÔbP¿cÊ
while(cin>>n,n){
map<int,long long> m;
vector<int> v;
f=1;
for(;n;n--){
cin>>a>>b>>c;
if(!m[a])v.push_back(a);
m[a] += b*c;
}
for(int i... | a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:21:6: error: operands to '?:' have different types 'long long int' and 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'}
21 | f?:cout<<... |
s480807804 | p00100 | C++ | #include<iostream>
#include<queue>
#include<map>
using namespace std;
main(){
long long a,b,c,n,f;
while(cin>>n,n){
map<int,long long> m;
queue<int> v;
f=1;
for(;n;n--){
cin>>a>>b>>c;
if(!m[a])v.push(a);
m[a] += b*c;
}
while(v.size())
if(m[v.front()]>999999)f=0,cout<<v.pop()... | a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:18:56: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'void')
18 | if(m[v.front()]>9... |
s625706998 | p00100 | C++ | #include <iostream>
#include <map>
#include <string>
using namespace std;
int main(void)
{
int n, num;
string str;
long a;
while (cin >> n, n){
map <string, long long> m;
for (int i = 0; i < n; i++){
cin >> str >> num >> a;
m[str] += (num * a);
}
map <string, long> ::iterator it;
bool flag = true... | a.cc: In function 'int main()':
a.cc:25:35: error: no match for 'operator=' (operand types are 'std::map<std::__cxx11::basic_string<char>, long int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, long int>, std::_Select1st<std::pair<const std::__cxx11:... |
s037176156 | p00100 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <stdio.h>
using namespace std;
typedef long long ll;
int n, id, p, q;
const ll MAX = 1000000;
struct Mem {
int id;
ll c;
Mem() {}
Mem(int _id, ll _c) { id = _id; _c = c; }
};
Mem array[40010];
int main(void) {
... | a.cc: In function 'int main()':
a.cc:26:25: error: expected primary-expression before ')' token
26 | while(cin >> n && n)) {
| ^
|
s296027241 | p00100 | C++ | #include <vector>
#include <map>
#include <algorithm>
#include <stdio.h>
#include<iostream>
using namespace std;
typedef long long ll;
struct data{
int id;
ll sum;
};
int main(void)
{
int n;
lll num, cost;
data d[10000];
while(cin >> n && n){
int flag = true;
for(int i = 0; i < n; i++){
... | a.cc: In function 'int main()':
a.cc:21:3: error: 'lll' was not declared in this scope; did you mean 'll'?
21 | lll num, cost;
| ^~~
| ll
a.cc:22:3: error: reference to 'data' is ambiguous
22 | data d[10000];
| ^~~~
In file included from /usr/include/c++/14/vector:69,
... |
s016265490 | p00100 | C++ | #include <vector>
#include <map>
#include <algorithm>
#include <stdio.h>
using namespace std;
typedef long long ll;
int n, id, p, q;
const ll MAX = 1000000;
struct Mem {
int id;
ll c;
Mem() {}
Mem(int _id, ll _c) { id = _id; _c = c; }
};
Mem array[40010];
int main(void) {
while(cin >> n && n... | a.cc: In function 'int main()':
a.cc:25:11: error: 'cin' was not declared in this scope
25 | while(cin >> n && n) {
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
4 | #include <stdio.h>
+++ |+#include <iostream>
... |
s276543092 | p00100 | C++ | main()
{
int kaisuu[100],syain[4000],n=1,tanka[4000],suuryou[4000];
int i=0,j,flag=0,a=0;
scanf("%d",&n);
while(n!=0){
for(i=0;i<n;i++){
scanf("%d %d %d",&syain[i],&tanka[i],&suuryou[i]);
}
for(i=0;i<n;i++){
if(1000000<=tanka[i] * suuryou[i]){
printf("%d\n",syain[i]);
flag=1... | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'scanf' was not declared in this scope
5 | scanf("%d",&n);
| ^~~~~
a.cc:15:9: error: 'printf' was not declared in this scope
15 | pr... |
s148716349 | p00100 | C++ | #include "stdio.h"
#include "string.h"
long long N[4001];
int f[4001];
int main(){
int x,n,p,i,j,c=0;
scanf("%d",&i);
while(i!=0){
c=0;
for(j=0;j<i;j++){
scanf("%d%d%d",&x,&n,&p);
N[x]+=n*p;
if(N[x]>=1000000){
f[c]=x;
... | a.cc:28:5: error: expected unqualified-id before 'return'
28 | return 0;
| ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
29 | }
| ^
|
s511893334 | p00100 | C++ | g#include <iostream>
#include <vector>
#include <utility>
#include <map>
using namespace std;
int main() {
int n;
while (cin >> n) {
if (n == 0) break;
vector< pair<int, long long> > members;
for (int i = 0; i < n; i++) {
pair<int, long long> member;
int id;
... | a.cc:1:2: error: stray '#' in program
1 | g#include <iostream>
| ^
a.cc:1:1: error: 'g' does not name a type
1 | g#include <iostream>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include... |
s589872210 | p00100 | C++ | #include <iostream>
using namespace std;
int main() {
for (;;) {
int n;
cin >> n;
if (!n) return 0;
pair<int, pair<int, long long> > es[4001];
for (int i = 1; i <= 4000; i++) {
es[i].first = 5000;
es[i].second.first = i;
es[i].second.second = 0;
}
for (int i = 0; i < n;... | a.cc: In function 'int main()':
a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'short'?
23 | sort(es+1, es+4001);
| ^~~~
| short
|
s549229378 | p00100 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n,num,price,amount;
while(cin>>n&&n){
vector<int> v;
while(n--){
cin>>num>>price>>amount;
long long sum = price*amount;
if(sum>=1000000) v.push_back(num);
}
if(v.size!=0) for(int i=0;i<v.size();++i)cout<<v[i]<<"\n";
else cou... | a.cc: In function 'int main()':
a.cc:13:22: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
13 | if(v.size!=0) for(int i=0;i<v.s... |
s178745651 | p00100 | C++ | #include<iostream>
#include <sstream>
using namespace std;
struct Saler
{
int Number;
int Saled;
};
int main(){
struct Saler* sl;
int n, a, b, c, i;
bool isFound;
loop:
scanf("%d\n", &n); // データ個数
if(n == 0) goto end_scope;
sl = (struct Saler*)malloc(sizeof(struct Saler) * n);
memcpy(sl, 0, sizeof(struct ... | a.cc: In function 'int main()':
a.cc:20:9: error: 'memcpy' was not declared in this scope
20 | memcpy(sl, 0, sizeof(struct Saler)*n);
| ^~~~~~
a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <sstream>
+++ |+#i... |
s339601985 | p00100 | C++ | #include<iostream>
#include <sstream>
#include <cstdlib>
using namespace std;
struct Saler
{
int Number;
int Saled;
};
int main(){
struct Saler* sl;
int n, a, b, c, i;
bool isFound;
loop:
scanf("%d\n", &n); // データ個数
if(n == 0) goto end_scope;
sl = (struct Saler*)malloc(sizeof(struct Saler) * n);
memcpy(sl... | a.cc: In function 'int main()':
a.cc:21:9: error: 'memcpy' was not declared in this scope
21 | memcpy(sl, 0, sizeof(struct Saler)*n);
| ^~~~~~
a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <cstdlib>
+++ |+#i... |
s470579622 | p00100 | C++ | #include<stdio.h>
int main(){
int n;
int id[4000],cid;
long long int price,num,sale[4000];
bool f;
int i,j,idcount;
while(scanf("%d",&n),n){
f=true;
idcount=0;
for(i=0;i<n;i++){
printf("data_id = %d\n",i);
cid=int (0);
price=num=long long int (0);
scanf("%d",&cid);
scanf("%lld",&price);
... | a.cc: In function 'int main()':
a.cc:18:35: error: expected primary-expression before 'long'
18 | price=num=long long int (0);
| ^~~~
|
s558374963 | p00100 | C++ | #include <stdio.h>
int main(void){
int i,j,k;
int n,num[4000];
long long int tanka[4000],sale_num[4000],sale_all[4001];
bool judge[4001];
while(scanf("%d",&n),n){[
k=0;
for(j=0;j<=4001;j++){
judge[j]=0;
sale_all[j]=0;
}
for(i=0;i<n;i++){
scanf("%d%lld%lld",&num[i],&tanka[i],&sale_num[i... | a.cc: In function 'int main()':
a.cc:13:20: error: expected ',' before ';' token
13 | k=0;
| ^
| ,
a.cc:13:20: error: expected identifier before ';' token
a.cc:13:20: error: expected ']' before ';' token
13 | k=0;
| ... |
s065554277 | p00100 | C++ | /*****include*****/
#include <iostream>
#include <fstream>
/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/
/*****名前空間*****/
using namespace std;
/*****グローバル変数置き場*****/
/*****その他関数置き場*****/
/*****main関数*****/
int main(){
/*****ファイルオープン*****/
#ifdef DEBUG
ofstream fout("output.txt");
ifstream fin("input.txt"... | a.cc: In function 'int main()':
a.cc:39:17: error: 'memset' was not declared in this scope
39 | memset(appear,false,sizeof(appear));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <fstr... |
s703274081 | p00100 | C++ | #include <iostream>
using namespace std;
int main(void)
{
int n;
while(cin >> n,n){
int d[4000];
bool f = false;
fill(d,d+4000,0);
int no,m,k;
for(int i = 0; i < n; i++){
cin >> no >> m >> k;
d[no-1] += m*k;
}
for(int i = 0; i < 4000;i++)
if(d[i] >= 1000000){
cout << i+1 << end;
f ... | a.cc: In function 'int main()':
a.cc:22:45: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
22 | cout << i+1 << end;
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/includ... |
s281801202 | p00100 | C++ | #include<algorithm>
#include<iostream>
#include<vector>
#include<set>
#include<string.h>
int main()
{
int n;
__int64 v[4001];
std::vector<int> vec;
while( 1 ){
std::cin >> n;
if( !n ) break;
memset( v, 0, sizeof( v ) );
vec.clear();
while( n-- ){
int num;
int a, b;
std::cin >> num >> ... | a.cc: In function 'int main()':
a.cc:10:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
10 | __int64 v[4001];
| ^~~~~~~
| __int64_t
a.cc:18:25: error: 'v' was not declared in this scope
18 | memset( v, 0, sizeof( v ) );
| ... |
s099419775 | p00100 | C++ | #include <iostream>
#include <vector>
typedef long long __int64;
#define NOS (4000)
int main()
{
const __int64 threshold = 1000000;
// const __int64 NOS = 4000;
int n;
while (std::cin >> n, n) {
std::vector<int> inputStaff(n);
__int64 staff[NOS] = {0};
while (n--) {
int id;
__int64 unit, quantity;... | a.cc: In function 'int main()':
a.cc:22:38: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
22 | if (std::find(inputStaff.begin(), inputStaff.end(), id) == inputStaff.end()) inputStaff.push_back(id);
| ... |
s066491532 | p00100 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
using namespace std;
int main(){
while(1){
int n;
cin >> n;
if(n == 0) break;
long long a[5000] = {0};
long long int number;
long long int jun[5000] = {0};
long long tanka,kazu;
for... | a.cc: In function 'int main()':
a.cc:28:25: error: expected ';' before numeric constant
28 | for(int i = 1; i 4000; i++){
| ^~~~~
| ;
a.cc:28:30: error: expected ')' before ';' token
28 | for(int i = 1; i 4000; i++){
| ~ ... |
s991469453 | p00100 | C++ | #include<stdio.h>
int main(void)
{
struct employee
{
int N,P,A;
};
employee person[10][4000];
int a,b=0,c[10],d,e;
for(d=0;;b=0,d++)
{
scanf("%d",&c[d]);
if(c[d]==0)
{
e=d;
break;
}
for(a=0;a<c[d];a++)
scanf("%d %d %d",&person[d][a].N,&person[d][a].P,&person[d][a].A);/
}
for(d=0;d<=e;b=0,d... | a.cc: In function 'int main()':
a.cc:19:91: error: expected primary-expression before '/' token
19 | scanf("%d %d %d",&person[d][a].N,&person[d][a].P,&person[d][a].A);/
| ^
a.cc:20:9: error: expect... |
s197616184 | p00100 | C++ | int main(void)
{
employee person[4000];
int a,b,c,d;
for(b=0;;b=0)
{
scanf("%d",&c);
for(a=0;a<c;a++)
{
scanf("%d %lld %lld",&person[a].N,&person[a].P,&person[a].A);
person[a].M=person[a].P*person[a].A;
for(d=0;d<a;d++)
if(person[a].N==person[d].N)
{
person[a].M+=person[d].M;
perso... | a.cc: In function 'int main()':
a.cc:3:9: error: 'employee' was not declared in this scope
3 | employee person[4000];
| ^~~~~~~~
a.cc:7:17: error: 'scanf' was not declared in this scope
7 | scanf("%d",&c);
| ^~~~~
a.cc:10:47: error: 'person' was not de... |
s009237453 | p00100 | C++ | struct employee
{
int N;
long long int P,A,M;
};
int main(void)
{
struct employee person[4000];
int a,b,c,d;
for(b=0;;b=0)
{
scanf("%d",&c);
for(a=0;a<c;a++)
{
scanf("%d %lld %lld",&person[a].N,&person[a].P,&person[a].A);
person[a].M=person[a].P*person[a].A;
for(d=0;d<a;d++)
if(person[a].N==... | a.cc: In function 'int main()':
a.cc:12:17: error: 'scanf' was not declared in this scope
12 | scanf("%d",&c);
| ^~~~~
a.cc:27:33: error: 'printf' was not declared in this scope
27 | printf("%d\n",person[a].N);
| ... |
s829692428 | p00100 | C++ | #include<iostream>
#include<vector>
#include<cstring>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
int n;
while( cin >> n, n ){
long long emp[4001];
vector<int> nums;
bool exist = false;
memset( emp, 0, sizeof(emp) );
rep(i,n){
int num;
long long val, am;
cin >> num >> v... | a.cc: In function 'int main()':
a.cc:20:33: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
20 | if( find(nums.begin(), nums.end(), num) == nums.end() ){
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In fil... |
s553789822 | p00100 | C++ | #define _CRT_SECURE_NO_WARNINGS
# include<iostream>
# include<string>
#include<conio.h>
using namespace std;
int main(){
int datasuu = 0;
int flag[4000][4000];
int sbangou[4000][4000];
int hanbai[4000][4000];
int uriage[4000][4000];
int goukei[4000][4000];
int kaisuu = 0;
for (int j = 0;; j++){
cin >> datasu... | a.cc:4:9: fatal error: conio.h: No such file or directory
4 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s872851567 | p00100 | C++ | # include<iostream>
# include<string>
#include<conio.h>
using namespace std;
int main(){
int datasuu = 0;
int flag[4000][4000];
int sbangou[4000][4000];
int hanbai[4000][4000];
int uriage[4000][4000];
int goukei[4000][4000];
int kaisuu = 0;
for (int j = 0;; j++){
cin >> datasuu;
if (datasuu == 0){
kaisu... | a.cc:3:9: fatal error: conio.h: No such file or directory
3 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s505131418 | p00100 | C++ | #include <iostream>
#include <stdio.h>
#include <string>
#include <queue>
#include <cmath>
#define int64 long long int
using namespace std;
typedef pair<int, int> P;
int main()
{
int flag[4001];
int n, c, num, val, sale, na;
P hoge[4001];
while (1) {
cin >> n;
if(n == 0) break;
... | a.cc: In function 'int main()':
a.cc:24:9: error: 'memset' was not declared in this scope
24 | memset(flag, 0, sizeof(int)*4001);
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <cmath>
+++ |+#include... |
s058180703 | p00100 | C++ | #include<iostream>
int main(){
int n,num[4001];
while(std::cin>>n){
int count=0;
memset(num,0,sizeof(num));
if(n==0)break;
for(int a,b,c,i=0;i<n;i++){
std::cin>>a>>b>>c;
num[a]+=b*c;
}
for(int i=0;i<4001;i++){
if(num[i]>=1000000)count++,std::cout<<i<<std::endl;
}
if(count==0)std::cout<<"NA"<... | a.cc: In function 'int main()':
a.cc:7:17: error: 'memset' was not declared in this scope
7 | memset(num,0,sizeof(num));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ ... |
s379757470 | p00100 | C++ | class CMem {
public :
CMem() { m_check = false; m_sale = 0; }
void Idata(long long sale) { m_sale += sale; m_check = true; }
bool Ocheck() { return m_check; }
long long Osale() { return m_sale; }
private :
bool m_check;
long long m_sale;
};
int main(void)
{
while(1) {
CMem member[4001];
bool NA = true;
in... | a.cc: In function 'int main()':
a.cc:20:17: error: 'cin' was not declared in this scope
20 | cin >> n;
| ^~~
a.cc:32:33: error: 'cout' was not declared in this scope
32 | cout << i << endl;
| ^~~~
a.cc:32:4... |
s603681249 | p00100 | C++ | #include<iostream>
#include<vector>
long long owData[4001];
std::vector<int> used;
int main(){
long long x,input[3];
bool Person;
while( std::cin>>x , x ){
Person=false;
used.clear();
memset(owData,0,sizeof(owData));
while( x-- ){
std::cin>>input[0]>>input[1]>>input[2];
if( owData[input[0]] == 0 )us... | a.cc: In function 'int main()':
a.cc:13:17: error: 'memset' was not declared in this scope
13 | memset(owData,0,sizeof(owData));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<vector>
... |
s698513149 | p00100 | C++ | #include<iostream>
#include<vector>
long long owData[4001];
std::vector<int> used;
int main(){
long long x,input[3];
bool Person;
while( std::cin>>x , x ){
Person=false;
used.clear();
memset(owData,0,sizeof(owData));
while( x-- ){
std::cin>>input[0]>>input[1]>>input[2];
if( owData[input[0]] == 0 )us... | a.cc: In function 'int main()':
a.cc:13:17: error: 'memset' was not declared in this scope
13 | memset(owData,0,sizeof(owData));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<vector>
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.