submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s171884105 | p00769 | C++ | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <map>
#include <set>
#include <list>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <iomanip>
#define SIZE 101
#define INF ... | a.cc:27:5: error: 'int index' redeclared as different kind of entity
27 | int index = 0;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:9:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(c... |
s294128013 | p00769 | C++ | import std.string;
import std.algorithm;
import std.math;
import std.array;
import std.format;
import std.range;
import std.stdio;
import std.conv;
struct Node
{
size_t value;
Node*[] childs;
static
Node* parse(string str)
{
Node* dst = new Node;
size_t cnt;
foreach(e; str)... | a.cc:1:1: error: 'import' does not name a type
1 | import std.string;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import std.algorithm;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:... |
s859861565 | p00769 | C++ | #include <iostream>
#include <cctype>
#include <cstdlib>
#include <string>
#include <list>
using namespace std;
int min(char* s) {
int n = 0;
int sum = 0, tmpI = 0;
bool flag = true;
list<int> intlist;
for(int i = 0; s[i] != '\0'; i++) {
if(s[i] == '[') {
int count = 1, j;
for(j = 1; count != 0; j++) ... | a.cc: In function 'int min(char*)':
a.cc:29:25: error: 'strncpy' was not declared in this scope
29 | strncpy(tmpS, s+i+1, j-2);
| ^~~~~~~
a.cc:6:1: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #... |
s223289380 | p00769 | C++ | #include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <vector>
#include <string>
#include <ctype.h>
#include <math.h>
#include <stdio.h>
using namespace std;
char c[10001];
int p;
int solve(){
++p;
vector<int> v;
if (isdigit(c[p])){
int n = atoi(&c[p]);
p += (int)log10((double)n) + 2;
retur... | a.cc:51:2: error: stray '#' in program
51 | }#include <iostream>
| ^
a.cc:51:3: error: 'include' does not name a type
51 | }#include <iostream>
| ^~~~~~~
a.cc:62:6: error: redefinition of 'char c [10001]'
62 | char c[10001];
| ^
a.cc:12:6: note: 'char c [10001]' previously declared he... |
s030325880 | p00769 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <iomanip>
#include <cmath>
#define MAX_N 100
using namespace std;
int N;
char str[10000];
int get_num(int l){
int res = 0;
for (int i = l; str[i] != ']'; i++)
{
res += (str[i]-'0');
res *= 10;
}
res /= 10;
return res;
}
int dfs(int l, in... | a.cc: In function 'void solve()':
a.cc:53:26: error: 'strlen' was not declared in this scope
53 | int res = dfs(0, strlen(str)-1);
| ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <cmath... |
s562641224 | p00769 | C++ | #include <bits/stdc++.h>
テ「ツ??
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define ALL(x) (x).begin(),(x).end()
テ「ツ??
using namespace std;
テ「ツ??
template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
テ「ツ??
usin... | a.cc:2:1: error: extended character 「 is not valid in an identifier
2 | テ「ツ??
| ^
a.cc:5:1: error: extended character 「 is not valid in an identifier
5 | テ「ツ??
| ^
a.cc:7:1: error: extended character 「 is not valid in an identifier
7 | テ「ツ??
| ^
a.cc:10:1: error: extended character 「 is no... |
s212806501 | p00769 | C++ | #include <bits/stdc++.h>
テ「ツ??
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define ALL(x) (x).begin(),(x).end()
テ「ツ??
using namespace std;
テ「ツ??
template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
テ「ツ??
usin... | a.cc:2:1: error: extended character 「 is not valid in an identifier
2 | テ「ツ??
| ^
a.cc:5:1: error: extended character 「 is not valid in an identifier
5 | テ「ツ??
| ^
a.cc:7:1: error: extended character 「 is not valid in an identifier
7 | テ「ツ??
| ^
a.cc:10:1: error: extended character 「 is no... |
s220616103 | p00769 | C++ | #include<iostream>
#include<iomanip>
#include<cstdlib>
#include<stdio.h>
#include<time.h>
#include<math.h>
#include<algorithm>
#include<string>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<deque>
#include<set>
#include<map>
#define REP(i, N) for(ll i = 0; i < N; ++i)
#define FOR(i, a, b) for... | a.cc: In function 'int stoit(const std::string&, std::size_t*, int)':
a.cc:40:36: error: 'INT_MIN' was not declared in this scope
40 | if (errno == ERANGE || x < INT_MIN || x > INT_MAX) {
| ^~~~~~~
a.cc:16:1: note: 'INT_MIN' is defined in header '<climits>'; this is p... |
s659603398 | p00769 | C++ | #include <iostream>
#include <vector>
#include <set>
#include <utility>
#include <functional>
#include <algorithm>
#include <string>
#include <cassert>
using namespace std;
int parse_impl(string::const_iterator &begin, string::const_iterator end) {
assert(*begin == '[');
begin++;
if (*begin == '[') {
vector<int>... | a.cc: In function 'int parse(std::string)':
a.cc:42:27: error: cannot bind non-const lvalue reference of type 'std::__cxx11::basic_string<char>::const_iterator&' to an rvalue of type 'std::__cxx11::basic_string<char>::const_iterator'
42 | return parse_impl(it, line.end());
| ^... |
s689347088 | p00769 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
struct node{
int val;
vector<int> next;
node(){
val = -1;
}
node(int a){
val = a;
}
};
int n;
string s;
vector<node> tree;
int make(int p, int v)
{
string tmp;
for(int i = p; i < s.size(); i++){
if(s[i] == '['){... | a.cc: In function 'int calc(int)':
a.cc:52:3: error: 'sort' was not declared in this scope; did you mean 'short'?
52 | sort(vec.begin(), vec.end());
| ^~~~
| short
a.cc: In function 'int make(int, int)':
a.cc:41:1: warning: control reaches end of non-void function [-Wreturn-type]
41 | }
| ... |
s685203520 | p00769 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <stdlib.h>
using namespace std;
struct node{
int val;
vector<int> next;
node(){
val = -1;
}
node(int a){
val = a;
}
};
int n;
string s;
vector<node> tree;
int make(int p, int v)
{
string tmp;
for(int i = p; i < s.size(); i++){
... | a.cc: In function 'int calc(int)':
a.cc:53:3: error: 'sort' was not declared in this scope; did you mean 'short'?
53 | sort(vec.begin(), vec.end());
| ^~~~
| short
a.cc: In function 'int make(int, int)':
a.cc:42:1: warning: control reaches end of non-void function [-Wreturn-type]
42 | }
| ... |
s159731037 | p00769 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
#include <utility>
#include <cstdlib>
using namespace std;
typedef pair<int, int> pii;
const char *p;
int solve() {
int ret = 0;
++p;
if(*p=='['){
vector<int> v;
while(*p == '['){
v.push_back(solve());
}
sort(v.begin(), v.end());
... | a.cc: In function 'int solve()':
a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'?
20 | sort(v.begin(), v.end());
| ^~~~
| short
|
s020295090 | p00769 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
#include <cassert>
using namespace std;
const char *p;
int rec() {
int res = 0;
vector<int> v;
++p;
if(*p == '[') {
while(*p == '[') v.push_back(rec());
sort(v.begin(), v.end());
for(int i = 0; i < v.size()/2+1; i++) res += v[i];
} else {... | a.cc: In function 'int rec()':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
16 | sort(v.begin(), v.end());
| ^~~~
| short
|
s458671834 | p00769 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
#include <string>
#include <cassert>
using namespace std;
const char *p;
int rec() {
int res = 0;
vector<int> v;
++p;
if(*p == '[') {
while(*p == '[') v.push_back(rec());
sort(v.begin(), v.end());
for(int i = 0; i < v.size()/2+1; i++) res +... | a.cc: In function 'int rec()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(v.begin(), v.end());
| ^~~~
| short
|
s945347921 | p00769 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
using namespace std;
const char *p;
int rec() {
int res = 0;
vector<int> v;
++p;
if(*p == '[') {
while(*p == '[') v.push_back(rec());
sort(v.begin(), v.end());
for(int i = 0; i < v.size()/2+1; i++) res += v[i];
} else {
char *e;
... | a.cc: In function 'int rec()':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
16 | sort(v.begin(), v.end());
| ^~~~
| short
|
s670113541 | p00769 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
using namespace std;
const char *p;
int rec() {
int res = 0;
vector<int> v;
++p;
if(*p == '[') {
while(*p == '[') v.push_back(rec());
sort(v.begin(), v.end());
for(int i = 0; i < v.size()/2+1; i++) res += v[i];
} else {
char *e;
... | a.cc: In function 'int rec()':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
16 | sort(v.begin(), v.end());
| ^~~~
| short
a.cc: In function 'int main()':
a.cc:35:9: error: cannot convert 'char (*)[1000]' to 'const char*' in assignment
35 | p = &str;
... |
s059143681 | p00769 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
using namespace std;
const char *p;
int rec() {
int res = 0;
vector<int> v;
++p;
if(*p == '[') {
while(*p == '[') v.push_back(rec());
sort(v.begin(), v.end());
for(int i = 0; i < v.size()/2+1; i++) res += v[i];
} els... | a.cc: In function 'int main()':
a.cc:36:9: error: cannot convert 'char (*)[1000]' to 'const char*' in assignment
36 | p = &str;
| ^~~~
| |
| char (*)[1000]
|
s449065073 | p00769 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
const char *p;
int rec() {
int res = 0;
vector<int> v;
++p;
if(*p == '[') {
while(*p == '[') v.push_back(rec());
sort(v.begin(), v.end());
for(int i = 0; i < v.size()/2+1; i++) r... | a.cc: In function 'int main()':
a.cc:37:9: error: cannot convert 'char (*)[1000]' to 'const char*' in assignment
37 | p = &str;
| ^~~~
| |
| char (*)[1000]
|
s134089494 | p00769 | C++ | #include <iostream>
#include <cctype>
#include <cstdlib>
#include <vector>
using namespace std;
string str;
const char *p;
int parse() {
p ++;
switch(*p) {
case '[':
{
vector<int> v;
while(*p == '[') {
v.push_back( parse() );
p ++;
}
sort(v.begin(), v.end());
int ... | a.cc: In function 'int parse()':
a.cc:23:7: error: 'sort' was not declared in this scope; did you mean 'short'?
23 | sort(v.begin(), v.end());
| ^~~~
| short
a.cc:41:1: warning: control reaches end of non-void function [-Wreturn-type]
41 | }
| ^
|
s986554477 | p00769 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cctype>
using namespace std;
const char *p;
string str;
int parse() {
int num;
char *e;
p++;
if(*p=='[') {
vector<int> v;
for(;;) {
if(*p == '[') {
num = parse();
v.push_back(num);
p++;
} else break;
}
p++;
... | a.cc: In function 'int parse()':
a.cc:26:5: error: 'sort' was not declared in this scope; did you mean 'short'?
26 | sort(v.begin(), v.end());
| ^~~~
| short
a.cc:38:1: warning: control reaches end of non-void function [-Wreturn-type]
38 | }
| ^
|
s360581180 | p00769 | C++ | #include<iostream>
#include<string>
#include<cctype>
#include<vector>
#include<algorithm>
using namespace std;
string s;
int now;
int rec(int now){
if(isdigit(s[now])){
int res = 0;
while(now < s.size() && isdigit(s[now])) res = res * 10 + s[now++] - '0';
return ++res / 2;
}else{
vector<int> dat; in... | a.cc: In function 'int rec(int)':
a.cc:16:51: error: too few arguments to function 'int rec(int)'
16 | while(s[now] == '[') now++ , dat.push_back(rec()) , now++;
| ~~~^~
a.cc:9:5: note: declared here
9 | int rec(int now){
| ^~~
a.cc: In function ... |
s184064938 | p00769 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
int n;
int d;
int md;
int inum;
int sum;
int cha;
string s;
string snum;
vector<int> hyo[1000];
cin>>n;
for(int i=0;i<n;i++){
cin>>s;
d=0;
md=0;
for(int i=0;i<s.size();i++){
if(s[i]=='[')... | a.cc: In function 'int main()':
a.cc:38:84: error: 'pow' was not declared in this scope
38 | for(int j=0;j<snum.size();j++) inum+=(snum[j]-'0')*pow(10.0,(double)snum.size()-1-j);
| ^~~
|
s229102470 | p00769 | C++ |
#include "stdafx.h"
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<sstream>
using namespace std;
string str;
int rewrite(int from, string s){
//end位置を取得
int end = -1;
for (int i = from; i < (signed)s.size(); i++){
if (i >= 1 && s[i - 1] == ']' &&s[i] == ']'){
end = i;
br... | a.cc:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s326648094 | p00770 | Java | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
#define REP(i,n) for(int i = 0;i < (n);i++)
#define FOR(i,a,n) for(int i = (a);i < (n);i++)
const int MAX_E = 1e3 + 3;
const int START = MAX_E / 2;
const int N = 1e6 + 3;
const int INF = 1e9;
int p[N+1];
void e(){
fill(p,p... | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <vector>
^
Main.java:3: error: illegal character: '#'
#include <algorithm>
^
Main.java:4: error: illegal character: '#'
#include <map>
^
Main.java:7: error: illegal character: '#'
#define REP(i,n) for(in... |
s274292155 | p00770 | Java | import java.util.Arrays;
import java.util.Scanner;
public class Main {
static boolean[] isPrime;
static int[][] data
static void prime() {
isPrime = new boolean[1000000];
Arrays.fill(isPrime, true);
isPrime[0] = false;
isPrime[1] = false;
for(int i=2; i*i<=1000000; i++) {
if(isPrime[i]) {
for(in... | Main.java:6: error: ';' expected
static int[][] data
^
1 error
|
s553442971 | p00770 | C | #include <iostream>
#include <algorithm>
#include <string>
#define MAX 1000001
#define SIZE 2000
typedef long long ll;
using namespace std;
int m, n;
int table[SIZE][SIZE]={{0,0}};
int dp[SIZE][SIZE];
bool prime[MAX];
pair<int, int>coord[MAX];//座標
pair<int, int> ans;// <素数の数, 出口の番号>
void dfs(int count, int y, in... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s124456297 | p00770 | C++ | #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std
#define LOG(...) printf(__VA_A... | a.cc:17:20: error: expected ';' before 'typedef'
17 | using namespace std
| ^
| ;
......
28 | typedef long long ll;
| ~~~~~~~
|
s786413292 | p00770 | C++ | 13 947
13 947
13 947
13 947
13 947
1 1069
4 1091
4 839
1 941
1 941
16 829
1 929
24 947
0 0
17 947
25 947
23 947
22 829
26 947
23 947
1 823
1 953
1 1063
1 953
1 839
0 0
0 0
0 0
0 0
0 0
19 947
20 947
20 947
19 947
20 947
13 947
17 947
22 947
0 0
14 829
19 947
11 947
11 947
5 941
20 947
18 829
9 821
574 993541 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 13 947
| ^~
|
s077013792 | p00770 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<queue>
using namespace std;
vector<int>prime;
void Prime(){
int notPrime[1000002];
memset(notPrime,0,sizeof(notPrime));
for(int i=2;i<2000;i++)
for(int j=i;j*i<1000001;j++)
notPrime[j*i]=1;
for(int i=2... | a.cc: In function 'void Prime()':
a.cc:11:5: error: 'memset' was not declared in this scope
11 | memset(notPrime,0,sizeof(notPrime));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<queue>
+++ |+#include <cst... |
s305257794 | p00770 | C++ | #include <iostream>
#include <algorithm>
#include <utility>
using namespace std;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, -1, 0, 1};
int caves[2000][2000];
bool sieve[1000001];
int SX, SY;
typedef pair<int, int> PII;
PII dp[2000][2000];
bool vis[2000][2000];
int main()
{
int nx, ny;
fill(sieve, sieve + 1000001... | a.cc: In function 'int main()':
a.cc:35:17: error: 'memset' was not declared in this scope
35 | memset(caves, -1, sizeof(caves));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <utility... |
s181289601 | p00770 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,x,y) for(int i=(x);i<(y);++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define dump(x)
#endif
typedef long long int ll;
typedef pair<int,int> ... | a.cc: In function 'void solve()':
a.cc:44:32: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const st... |
s438257171 | p00770 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<str... | a.cc:49:21: error: 'int index [1200][1200]' redeclared as different kind of entity
49 | int index[1200][1200];
| ^
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:... |
s431215866 | p00770 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<str... | a.cc:22:12: error: size of array 'prime' is not an integral constant-expression
22 | bool prime[N];
| ^
|
s125467981 | p00770 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
#define REP(i,n) for(int i = 0;i < (n);i++)
#define FOR(i,a,n) for(int i = (a);i < (n);i++)
const int MAX_E = 1e3 + 3;
const int START = MAX_E / 2;
const int N = 1e6 + 3;
const int INF = 1e9;
int p[N];
void e(){
fill(p,p+N... | a.cc: In function 'int main()':
a.cc:67:7: error: 'sx' was not declared in this scope; did you mean 'x'?
67 | sx = x,sy = y;
| ^~
| x
a.cc:67:14: error: 'sy' was not declared in this scope; did you mean 'y'?
67 | sx = x,sy = y;
| ^~
| y
a.c... |
s614756837 | p00770 | C++ | #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
#define f first
#define s second
typedef pair<int,int> P;
int a[2000][2000],ans[2000][2000],d=0,y=999,x=1001,n,m;
bool b[1000001],used[2000][2000];
int dx[]={-1,0,1,0},tx[]={-1,0,1};
int dy[]={0,1,0,-1},ty[]={1,1,1};
int main(){
b[0]=b[... | a.cc: In function 'int main()':
a.cc:47:4: error: expected '}' at end of input
47 | }
| ^
a.cc:11:11: note: to match this '{'
11 | int main(){
| ^
|
s979381618 | p00770 | C++ | #include <vector>
#include <map>
#include <cstdio>
using namespace std;
#define t_max 10000001
int M[1001][1001];
int S[1001][1001];
int P[1001][1001];
int table[t_max];
vector<pair<int,int> >m(t_max);
map<pair<int,int>,int>m_rev;
pair<int,int> dfs(int x,int y){
if(y==1001)return make_pair(0,0);
if(S[x][y]>=0)return ... | a.cc:28:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
28 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:41:17: error: 'memset' was not declared in this scope
41 | memset(M,0,sizeof(M));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined... |
s885969006 | p00770 | C++ | #include <iostream>
#include <map>
#include <cmath>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cstdio>
using namespace std;
const int MAX = 1000001;
bool pri[MAX];
vector<int>v;
map<int,pair<int,int> >pos;
int field[1201][1201];
int N,M;
void make(){
int cnt = 2;
int c = 1;
int x = 50... | a.cc: In function 'void make()':
a.cc:30:11: error: 'dx' was not declared in this scope; did you mean 'nx'?
30 | nx += dx[i];
| ^~
| nx
a.cc:31:11: error: 'dy' was not declared in this scope; did you mean 'ny'?
31 | ny += dy[i];
| ^~
| ny
|
s172028021 | p00770 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
using namespace std;
int holes[1005][1005],table[1005][1005];
bool prime[1000008];
int main(){
int m,n,g,x,y,sx,sy,i,j;
int dx[]={1,0,-1,0},dy[]={0,-1,0,1},d;
memset(prime,1,sizeof(prime));
prime[0]=prime[1]=0;
for(i=2;i<=1000003;i++){
if(prime[i... | a.cc: In function 'int main()':
a.cc:83:1: error: 'parintf' was not declared in this scope; did you mean 'printf'?
83 | parintf("%d %d\n",maxCnt,maxNum);
| ^~~~~~~
| printf
|
s987244358 | p00770 | C++ | #define SIZE 2000
#define X first
#define Y second
const int STX = 1000, STY = 1000;
int id[SIZE][SIZE];
bool is_prime[MAX_N+1];
vector<pair<int, int> > coord;
void Sieve() {
fill(is_prime, is_prime+MAX_N+1, true);
is_prime[0] = is_prime[1] = false;
for(int i=2; i*i<=MAX_N; i++) {
if(is_prime[i]) {
... | a.cc:8:15: error: 'MAX_N' was not declared in this scope
8 | bool is_prime[MAX_N+1];
| ^~~~~
a.cc:9:1: error: 'vector' does not name a type
9 | vector<pair<int, int> > coord;
| ^~~~~~
a.cc: In function 'void Sieve()':
a.cc:12:8: error: 'is_prime' was not declared in this scope
12 | ... |
s740963867 | p00770 | C++ | #include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>
#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<b... | a.cc: In function 'int main()':
a.cc:65:48: error: label 'end' used but not defined
65 | if (i>=m) goto end;
| ^~~
|
s834568535 | p00771 | C | #include <stdio.h>
#include <math.h>
typedef struct rope { double x, y, l; } Rope;
/* 風船が飛ぶことのできる高さの最大値を求める */
Rope height(Rope r1, Rope r2){
double d = sqrt((r1.x - r2.x) * (r1.x - r2.x) + (r1.y - r2.y) * (r1.y - r2.y));
}
int main(void){
int n, x[10], y[10], l[10];
Rope r[10], min;
int i, x, y, l;
while (sca... | main.c: In function 'main':
main.c:14:16: error: conflicting types for 'x'; have 'int'
14 | int i, x, y, l;
| ^
main.c:12:16: note: previous declaration of 'x' with type 'int[10]'
12 | int n, x[10], y[10], l[10];
| ^
main.c:14:19: error: conflicting types ... |
s312452529 | p00771 | C++ | 3
10 10 20
10 -10 20
-10 10 120
1
10 10 16
2
10 10 20
10 -10 20
2
100 0 101
-90 0 91
2
0 0 53
30 40 102
3
10 10 20
10 -10 20
-10 -10 20
3
1 5 13
5 -3 13
-3 -3 13
3
98 97 168
-82 -80 193
-99 -96 211
4
90 -100 160
-80 -80 150
90 80 150
80 80 245
4
85 -90 290
-80 -80 220
-85 90 145
85 90 170
5
0 0 4
3 0 5
-3 0 5
0 3 5
0 -... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s706578161 | p00771 | C++ | #include<iostream>
#include<algorithm>
#include<complex>
#include<cmath>
using namespace std;
typedef double R;
typedef complex<R> P;
struct C{P c;R r;};
double n, x, y, l;
C c[108];
C tc[108];
pair<P, P> cross_circles(C a, C b){
R d = abs(a.c - b.c);
R l = ((a.r*a.r - b.r*b.r) / d + d) / 2.0;
R h = sqrt(a.r*a.... | a.cc: In function 'bool able(R)':
a.cc:30:3: error: 'vector' was not declared in this scope
30 | vector<P> points;
| ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
4 | #include<cmath>
+++ |+#include <vector>
5 | using n... |
s253242502 | p00771 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <it... | a.cc:383:27: error: expected '}' at end of input
383 | res += d*h[t];
| ^
a.cc:289:12: note: to match this '{'
289 | class Flow {
| ^
a.cc: In member function 'int Flow::min_cost_flow(int, int, int)':
a.cc:383:27: error: expected '}' at end of input
383... |
s882162480 | p00771 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
#define LIMIT 50
int n; long double x[100], y[100], l[100];
long double dst(long double ax, long double ay, long double az, long double bx, long double by, long double bz) {
return sqrtl((ax - bx)*(ax - bx) + (ay - by)*(ay - by) + (az - bz)*(az - bz));
}
long... | a.cc: In function 'long double dst(long double, long double, long double, long double, long double, long double)':
a.cc:7:16: error: 'sqrtl' was not declared in this scope; did you mean 'strtol'?
7 | return sqrtl((ax - bx)*(ax - bx) + (ay - by)*(ay - by) + (az - bz)*(az - bz));
| ^~~~~
... |
s636274632 | p00771 | C++ | //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <... | a.cc: In function 'int main()':
a.cc:141:38: error: 'EPS' was not declared in this scope
141 | if(dis(p[k]-pp) <= ri[k]+EPS)
| ^~~
|
s584797002 | p00771 | C++ | #include<cstdio>
#include<vector>
#include<math.h>
using namespace std;
const double ESP = 1e-10;
double add(double x, double y) {
if (abs(x + y) < ESP * (abs(x) + abs(y)))
return 0;
else return x + y;
}
struct P {
double x, y;
P() {}
P(double X, double Y) {
x = X, y = Y;
}
void init(int X, int Y)... | a.cc: In function 'int cross(int, int)':
a.cc:74:7: error: reference to 'plus' is ambiguous
74 | if (plus(s - r[i] - r[j])) return -2; // imposible
| ^~~~
In file included from /usr/include/c++/14/bits/refwrap.h:39,
from /usr/include/c++/14/vector:68,
from a.cc:2:
/usr... |
s747304703 | p00771 | C++ | #include<cstdio>
#include<vector>
#include<algorithm>
#include<complex>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
const int INF = 1000000000;
#define X real()
#define Y imag()
typedef complex<double> Point;
class Line{
public:
double A,B,C;
Line(double A,do... | a.cc: In function 'double solve()':
a.cc:121:17: error: 'cin' was not declared in this scope
121 | cin>>a>>b>>c;
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
4 | #include<complex>
+++ |+#include... |
s067303108 | p00772 | C++ | #include <cstdio>
#include <cstring>
#include <deque>
#include <vector>
#include <algorithm>
#include <windows.h>
using namespace std;
int dp[50][51][50][51], dp2[2][50][51][60][10], dp3[2][50][51][31];
int visited1[50][51][50][51], visited2[2][50][51][60][10], visited3[2][50][51][31];
vector <int> trans[60];
vector ... | a.cc:6:10: fatal error: windows.h: No such file or directory
6 | #include <windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s129493027 | p00772 | C++ | #include <cstdio>
#include <cstring>
#include <deque>
#include <vector>
#include <algorithm>
//#include <windows.h>
using namespace std;
char dp[50][51][50][51], dp2[2][50][51][60][10], dp3[2][50][51][31];
short visited1[50][51][50][51], visited2[2][50][51][60][10], visited3[2][50][51][31];
vector <int> trans[60];
ve... | a.cc: In function 'int canConvergeTo(int, int, int, int)':
a.cc:26:42: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'char'
26 | int &ret = dp3[type][s][e][tarnum];
| ~~~~~~~~~~~~~~~~~~~~~~^
a.cc: In function 'int transPossible(int, int, int, int, in... |
s494067387 | p00773 | Java | package JAG2018C;
import java.util.Scanner;
public class Mian{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
double x=sc.nextInt(),y=sc.nextInt(),n=sc.nextInt();
if(x==0)break;
x= (100+x)/100;
y=(100+y)/100;
int max=0;
for(int i=1;i<n;i++) {
f... | Main.java:4: error: class Mian is public, should be declared in a file named Mian.java
public class Mian{
^
1 error
|
s231328020 | p00773 | Java |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
while(true) {
double x=in.nextInt(),y=in.nextInt(),s=in.nextInt();
if(x==0)break;
int max=0;
for(double i=1;i<=s;i++) {
for(double j=1;j<s=;j++) {
if((int)(i*((100+x)/100))+(in... | Main.java:12: error: illegal start of expression
for(double j=1;j<s=;j++) {
^
1 error
|
s352061015 | p00773 | Java | public class Test {
public static void main(String[] args){
int i,j,s,k=0,t=0,max;
double x,y,oldRate,newRate;
while(Integer.parseInt(args[k]) != 0){
x = Integer.parseInt(args[k]); //x?????£?\????????¶[%]
y = Integer.parseInt(args[k+1]); //y??????V????????¶[%]
oldRate = (100+x)/100;
newRate = (... | Main.java:1: error: class Test is public, should be declared in a file named Test.java
public class Test {
^
1 error
|
s393899252 | p00773 | Java | package TaxRate;
import java.io.*;
import java.util.*;
public class TaxRate {
private static Scanner scr;
public static void main(String args[]) throws IOException{
scr = new Scanner(System.in);
while (true){
try{
String[] str = scr.nextLine().split(" ", 0);
int x = Integer.parseInt(str[0]);... | Main.java:5: error: class TaxRate is public, should be declared in a file named TaxRate.java
public class TaxRate {
^
1 error
|
s817932837 | p00773 | Java | import java.util.Scanner;
public class Main1192 {
void run(){
Scanner s = new Scanner(System.in);
int x = s.nextInt();
int y = s.nextInt();
int p = s.nextInt();
int max = 0;
for(int i = 1; i < p; i++) {
for (int j = 1; j < p; j++){
int checkNum = i * (100 + x... | Main.java:3: error: class Main1192 is public, should be declared in a file named Main1192.java
public class Main1192 {
^
1 error
|
s046953776 | p00773 | Java | import java.util.Scanner;
public class Main {
void run(){
Scanner s = new Scanner(System.in);
while(true){
int x = s.nextInt();
int y = s.nextInt();
int p = s.nextInt();
if (x == 0 && y == 0 & p == 0) break;
int max = 0;
for(int i = 1; i < p; i++) {
... | Main.java:21: error: ')' or ',' expected
System.out.println(max
^
1 error
|
s328464630 | p00773 | Java | import java.util.Scanner;
public class Main {
void run(){
Scanner s = new Scanner(System.in);
while(true){
int x = s.nextInt();
int y = s.nextInt();
int p = s.nextInt();
if (x == 0 && y == 0 & p == 0) break;
int max = 0;
for(int i = 1; i < p; i++) {
... | Main.java:16: error: ';' expected
int onceNum = (i * (100 + y) / 100) + (j * (100 + y) / 100));
^
1 error
|
s289132416 | p00773 | Java | import java.util.*;
public class Satomi {
void run(){
Scanner sc = new Scanner(System.in);
while(true){
int x = sc.nextInt();
int y = sc.nextInt();
int s = sc.nextInt();
if(x == 0 && y == 0 && s == 0) {
break;
}
int aprice = s * 100 / (100+x);
int bprice = 1;
int times = aprice/2;
i... | Main.java:3: error: class Satomi is public, should be declared in a file named Satomi.java
public class Satomi {
^
1 error
|
s378282688 | p00773 | Java | import java.util.*;
public class Main {
void run(){
Scanner sc = new Scanner(System.in);
while(true){
int x = sc.nextInt();
int y = sc.nextInt();
int s = sc.nextInt();
if ( ( x | y | s ) == 0 ) {
break;
}
}
public static void main(String[] args){
new Main().run();
}
} | Main.java:15: error: illegal start of expression
public static void main(String[] args){
^
1 error
|
s799374746 | p00773 | Java | import java.io.*;
import java.util.*;
class Main {
public static void main(String args[])
{
while(true){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
StringTokenizer st = new StringTokenizer(str, " ");
... | Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
String str = br.readLine();
^
1 error
|
s162857146 | p00773 | Java | //吉田慎一朗 J4-170532 Tax Rate Changed http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1192&lang=jp 左奥
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
public class taxrate... | Main.java:9: error: class taxrate is public, should be declared in a file named taxrate.java
public class taxrate {
^
1 error
|
s915557724 | p00773 | C | #include <stdio.h>
int main(){
int s,p=0,q;
int x,y;
int a,b;
int i,j;
int c,d;
i=a*(100+x)/100;
j=b*(100+x)/100;
scanf("%d %d %d",&x,&y,&s);
while (!(x==0&&y==0&&s==0)) {
for(a=0;a<s;a++) {
for (b=a;b<s;b++){
if (i+j==s) {
... | main.c: In function 'main':
main.c:30:1: error: expected declaration or statement at end of input
30 | }
| ^
|
s583986893 | p00773 | C | #include<stdio.h>
int main(void){
int x,y,s,a=0,b,h1=0,h2=0,sum=0,hh1,hh2;
while(1){
scanf("%d %d %d",&x,&y,&s);
if(x==0&&y==0&&s==0)
break;
for(a=1;a<s;a++){
b=s-a;
if((100*a)%(100+x)!=0){
h1=a*100/(100+x)+1;
}
else
h1=a*100/(100+x);
if((b*100)%(100+x)!=0)
h2=b*100/(100+x)... | main.c: In function 'main':
main.c:37:1: error: expected declaration or statement at end of input
37 | }
| ^
|
s457309484 | p00773 | C | #include<stdio.h>
int shouhi(int n,int m){
return n*(100+m)/100;
}
int main(){
int X,Y,s,a,b,i,A=0,B=0;
for(i=0;i<1000;i++){
scanf("%d %d %d",&X,&Y,&s);
if((X==0)&&(Y==0)&&(s==0)){
return 0;
for(a=1;a<100;a++){
for(b=a+1;b<100;b++){
if((shouhi(a,X) + shouhi(b,X) == s) && (shouhi(a,Y) + shouhi(b,Y) ... | main.c: In function 'main':
main.c:24:9: error: expected declaration or statement at end of input
24 | }
| ^
|
s596270054 | p00773 | C | #include<stdio.h>
int main(void){
FILE *fp1,*fp2;
int s,i,j,max,x,y,a,b;
fopen_s(&fp1,"a.txt","r");
fopen_s(&fp2,"a_ans.txt","w");
while(1){
max=0;
fscanf_s(fp1,"%d %d %d",&x,&y,&s);
if(x==0 && y==0 && s==0){
break;
}
for(i=1;i<=s-i;i++){
for(j=s-i;i<=j;j--){
a=i*(100+x)*0.01;b=j*(100+x)*0.01;... | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'fopen_s'; did you mean 'fopen'? [-Wimplicit-function-declaration]
6 | fopen_s(&fp1,"a.txt","r");
| ^~~~~~~
| fopen
main.c:10:17: error: implicit declaration of function 'fscanf_s'; did you mean 'fsca... |
s978623177 | p00773 | C | #include<stdio.h>
int main(void){
int s,i,j,max,x,y,a,b;
while(1){
max=0;
fscanf_s(fp1,"%d %d %d",&x,&y,&s);
if(x==0 && y==0 && s==0){
break;
}
for(i=1;i<=s-i;i++){
for(j=s-i;i<=j;j--){
a=i*(100+x)*0.01;b=j*(100+x)*0.01;
if(a+b==s){
a=i*(100+y)*0.01;b=j*(100+y)*0.01;
if(a+b>max){
... | main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'fscanf_s'; did you mean 'fscanf'? [-Wimplicit-function-declaration]
7 | fscanf_s(fp1,"%d %d %d",&x,&y,&s);
| ^~~~~~~~
| fscanf
main.c:7:26: error: 'fp1' undeclared (first use... |
s257967275 | p00773 | C | #include <stdio.h>
int main() {
int x, y, s, i, j = 0,k,A,B;
int answer[10000] = { 0 };
while (true) {
scanf("%d %d %d", &x, &y, &s);
if (x == 0 && y == 0 && s == 0)
break;
A = (100 + x) / 100;
B = (100 + y) / 100;
for (i = 1; i < s; i++){
for (j = 1; j < s; j++){
if (s == i*A + j*A) {
i... | main.c: In function 'main':
main.c:9:16: error: 'true' undeclared (first use in this function)
9 | while (true) {
| ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include <stdio.h>
+++ |+#include <st... |
s523791486 | p00773 | C | #include <stdio.h>
int main() {
int x, y, s, i, j = 0,k=0;
int answer[10000] = { 0 };
while (true) {
scanf("%d %d %d", &x, &y, &s);
if (x == 0 && y == 0 && s == 0)
break;
for (i = 1; i < s; i++){
for (j = 1; j <s; j++){
if (s == i*(100 + x) / 100 + j*(100 + x) / 100) {
if (answer[k] < i*(100 ... | main.c: In function 'main':
main.c:8:16: error: 'true' undeclared (first use in this function)
8 | while (true) {
| ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include <stdio.h>
+++ |+#include <st... |
s806843327 | p00773 | C | #include<stdio.h>
int main()
{
short rate_before,rate_after;
int price_before,i,a,b,max;
int n,m,p,q,r;
while(1){
max = 0;
scanf("%hd %hd %d",&rate_before,&rate_after,&price_before);
if(rate_before == 0 && rate_after == 0 && price_before == 0){
break;
}
for(i = 1;i <= price_before/... | main.c: In function 'main':
main.c:18:20: error: 'x' undeclared (first use in this function)
18 | n = i * (100+x) / 100;
| ^
main.c:18:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:24: error: 'y' undeclared (first use in this funct... |
s060988837 | p00773 | C | #include<stdio.h>
int main()
{
short rate_before,rate_after;
int price_before,i,a,b,max;
int n,m,p,q,r;
while(1){
max = 0;
scanf("%hd %hd %d",&rate_before,&rate_after,&price_before);
if(rate_before == 0 && rate_after == 0 && price_before == 0){
break;
}
for(i = 1;i <= price_before/... | main.c: In function 'main':
main.c:18:20: error: 'x' undeclared (first use in this function)
18 | n = i * (100+x) / 100;
| ^
main.c:18:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:24: error: 'y' undeclared (first use in this funct... |
s076032474 | p00773 | C | #include<stdio.h>
int main()
{
short rate_before,rate_after;
int price_before,i,a,b,max;
int n,m,p,q,r;
while(1){
max = 0;
scanf("%hd %hd %d",&rate_before,&rate_after,&price_before);
if(rate_before == 0 && rate_after == 0 && price_before == 0){
break;
}
for(i = 1;i <= price_before/... | main.c: In function 'main':
main.c:18:20: error: 'x' undeclared (first use in this function)
18 | n = i * (100+x) / 100;
| ^
main.c:18:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:24: error: 'y' undeclared (first use in this funct... |
s109190681 | p00773 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s813277046 | p00773 | C++ | #include <iostream>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) for(int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x) cerr << #x << " = " << (x) << endl;
using namespace std;
template <typename X, typename T>
auto vectors(X x, T a) {
return vector<T>(x, a);
}
te... | a.cc: In function 'auto vectors(X, T)':
a.cc:10:16: error: 'vector' was not declared in this scope
10 | return vector<T>(x, a);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++... |
s495191304 | p00773 | C++ | #Include<bits/stdc++.h>
using namespace std;
int tax(int p,t){
return p+p*t/100;
}
int main(){
int x,y,s;
for(int i=0;i<99;i++){
cin >> x >> y >> s;
if(x=0){
break;
}
vector<int> a(s,0);
for(int j=1;j<s;j++){
if(tax(j,y)==s){
a.at(i)=tax(j,x);
}
sort(a,.begin(), a.end());
cout << a.at(s) << endl;
}
}
| a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
1 | #Include<bits/stdc++.h>
| ^~~~~~~
| include
a.cc:4:15: error: 't' has not been declared
4 | int tax(int p,t){
| ^
a.cc: In function 'int tax(int, int)':
a.cc:5:12: error: 't' was not declared ... |
s939854558 | p00773 | C++ | #Include<bits/stdc++.h>
using namespace std;
int tax(int p,int t){
return p+p*t/100;
}
int main(){
int x,y,s;
for(int i=0;i<99;i++){
cin >> x >> y >> s;
if(x=0){
break;
}
vector<int> a(s,0);
for(int j=1;j<s;j++){
if(tax(j,y)==s){
a.at(i)=tax(j,x);
}
sort(a,.begin(), a.end());
cout << a.at(s) << endl;
}... | a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
1 | #Include<bits/stdc++.h>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
12 | cin >> x >> y >> s;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in ... |
s541495516 | p00773 | C++ | #include<bits/stdc++.h>
using namespace std;
int tax(int p,int t){
return p+p*t/100;
}
int main(){
int x,y,s;
for(int i=0;i<99;i++){
cin >> x >> y >> s;
if(x=0){
break;
}
vector<int> a(s,0);
for(int j=1;j<s;j++){
if(tax(j,y)==s){
a.at(i)=tax(j,x);
}
sort(a.begin(), a.end());
cout << a.at(s) << endl;
}
... | a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s886799271 | p00773 | C++ | #include<bits/stdc++.h>
using namespace std;
int tax(int p,int t){
return p+p*t/100;
}
int main(){
int x,y,s;
cin >> x >> y >> s;
if(x=0){
break;
}
vector<int> a(s,0);
for(int j=1;j<s;j++){
if(tax(j,y)==s){
a.at(i)=tax(j,x);
}
sort(a.begin(), a.end());
cout << a.at(s) << endl;
}
}
| a.cc: In function 'int main()':
a.cc:13:2: error: break statement not within loop or switch
13 | break;
| ^~~~~
a.cc:18:8: error: 'i' was not declared in this scope
18 | a.at(i)=tax(j,x);
| ^
|
s486669904 | p00773 | C++ | #include<bits/stdc++.h>
using namespace std;
int tax(int p,int t){
return p+p*t/100;
}
int main(){
int x,y,s;
cin >> x >> y >> s;
if(x=0){
break;
}
vector<int> a(s,0);
for(int j=1;j<s;j++){
if(tax(j,y)==s){
a.at(j-1)=tax(j,x);
}
sort(a.begin(), a.end());
cout << a.at(s) << endl;
}
}
| a.cc: In function 'int main()':
a.cc:13:2: error: break statement not within loop or switch
13 | break;
| ^~~~~
|
s777372914 | p00773 | C++ | #include<iostream>
#include<string>
#include<queue>
#include <utility>
#include <functional>
//#include<>
using namespace std;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1};
//#define int long long;
signed main(){
int x,y,s;
while(cin >> x >> y >> s, x){
for(int i = 0; i < 999; ++i){
for(int j = ... | a.cc: In function 'int main()':
a.cc:19:11: error: 'res' was not declared in this scope
19 | res = max(res, i*(100+y)/100 + j*(100+y)/100);
| ^~~
a.cc:28:15: error: 'res' was not declared in this scope
28 | cout << res << endl;
| ^~~
a.cc:31:2: error: expected '... |
s308051725 | p00773 | C++ | int main(){
int x, y, s;
int i, j, n;
float r1, r2;
while(~scanf("%d %d %d", &x, &y, &s) && x | y | s){
r1 = (float)x / 100 + 1;
r2 = (float)y / 100 + 1;
n = 0;
for(i = 1, x = 0; i <= s; i++){
x = 0;
for(j = 1; i + j <= s; j++){
x = (int)(i * r1) + (int)(j * r1);
y = (int)(i * r2) + (int)(j * ... | a.cc: In function 'int main()':
a.cc:5:16: error: 'scanf' was not declared in this scope
5 | while(~scanf("%d %d %d", &x, &y, &s) && x | y | s){
| ^~~~~
a.cc:21:17: error: 'printf' was not declared in this scope
21 | printf("%d\n", n);
| ^~~~~~
a... |
s476954965 | p00773 | C++ | 5 8 105
8 5 105
1 2 24
99 98 24
12 13 26
1 22 23
1 13 201
13 16 112
2 24 50
1 82 61
1 84 125
1 99 999
99 1 999
98 99 999
1 99 11
99 1 12
0 0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5 8 105
| ^
|
s985190400 | p00773 | C++ | #include<iostream>
using namespace std;
void main(){
int x,y,s;
cin>>x>>y>>s;
while((x|y|s)!=0){
int a=1,b=s-1;
int top=0;
while(a<=b){
//aとbの税抜きの最大金額を計算する
int a_max= (double)a*100/(100+x);
int b_max= (double)b*100/(100+x);
while((double)a_max*(100+x)/100 < a+1) a_max++;
while((double)b_max*(10... | a.cc:4:1: error: '::main' must return 'int'
4 | void main(){
| ^~~~
|
s400223092 | p00773 | C++ | #include<iostream>
using namespace std;
void main(){
int x,y,s;
cin>>x>>y>>s;
while((x|y|s)!=0){
int a=1,b=s-1;
int top=0;
while(a<=b){
int a_max= (int)((double)a*100/(100+x));
int b_max= (int)((double)b*100/(100+x));
while((double)a_max*(100+x)/100 < a+1) a_max++;
while((double)b_max*(100+x)/100 ... | a.cc:4:1: error: '::main' must return 'int'
4 | void main(){
| ^~~~
|
s831926703 | p00773 | C++ | nclude <bits/stdc++.h>
using namespace std;
inline int calc(int p, int x) {
return p * (100 + x) / 100;
}
int main() {
for(int x, y, s; cin >> x >> y >> s && (x|y|s);) {
int res = 0;
for(int a = 1; a < s; ++a) {
for(int b = 1; b < s; ++b) {
if(calc(a, x) + calc(b, x) != s) continue;
... | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude <bits/stdc++.h>
| ^~~~~~
a.cc: In function 'int main()':
a.cc:9:20: error: 'cin' was not declared in this scope
9 | for(int x, y, s; cin >> x >> y >> s && (x|y|s);) {
| ^~~
a.cc:14:15: error: 'max' was not declared in thi... |
s655790362 | p00773 | C++ | #include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int a[100];
int i, j, k, n = 0,t;
int m1, m2;
int mm1, mm2;
int temp;
while (1){
int x, y, s;//x???????¨????,y??´??°???????¨????,z??????????¨?
cin >> x >> y >> s;
if (x == 0 && y == 0 && s == 0) break;
int max=0;
for (m1 = 1... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s985382399 | p00773 | C++ | int taxx(int p){
return p*(100+x)/100;
}
int taxy(int p){
return p*(100+y)/100;
}
int main(){
int i,j;
int p1,p2,s;
int max;
int p3,p4;
while(1){
p3=0;
p4=0;
max=-1;
cin >> x >> y >> s;
if(x==0 && y==0 && s==0)break;
for(i=1;i<=(s-1)/2;i++){
for(j=1;j<=s-1;j++){
p1=taxx(i)... | a.cc: In function 'int taxx(int)':
a.cc:2:17: error: 'x' was not declared in this scope
2 | return p*(100+x)/100;
| ^
a.cc: In function 'int taxy(int)':
a.cc:5:17: error: 'y' was not declared in this scope
5 | return p*(100+y)/100;
| ^
a.cc: In function 'int main(... |
s514089687 | p00773 | C++ | #include <cstdio>
#include <vector>
using namespace std;
int tax(int tr, int p){
int a;
a = (100 + tr) * p / 100;
return a;
}
int X, Y, S;
int solve(){
int MAX = 0;
for(int i = 1; i < S; i++){
for(int j = i; j < S; j++){
if(tax(X, i) + tax(X, j) == S)
MAX = max(MAX, tax(Y, i) + tax(Y, j));
}
... | a.cc: In function 'int solve()':
a.cc:20:13: error: expected ';' before '}' token
20 | return MAX
| ^
| ;
21 | }
| ~
|
s068017042 | p00773 | C++ | #include <iostream>
using namespace std;
int X,Y,S;
int solve() {
int max = 0;
cin >> X >> Y >> S;
for (int i=1;i<S;i++) {
for (int j=i;j<s;j++) {
if (tax(X,i)+tax(X,j) == S) {
max = maxCheck(max,tax(Y,i)+tax(Y,j));
}
}
}
}
int maxCheck(int max,int sum) {
if (max>sum)
return max;
e... | a.cc: In function 'int solve()':
a.cc:9:20: error: 's' was not declared in this scope
9 | for (int j=i;j<s;j++) {
| ^
a.cc:10:11: error: 'tax' was not declared in this scope; did you mean 'max'?
10 | if (tax(X,i)+tax(X,j) == S) {
| ^~~
| max
a.cc... |
s792516017 | p00773 | C++ | #include <iostream>
using namespace std;
int X,Y,S;
int solve();
int maxCheck(int max,int sum);
int tax(int ratio,int price);
int solve(int X,int Y,int S) {
int max = 0;
for (int i=1;i<S;i++) {
for (int j=i;j<S;j++) {
if (tax(X,i)+tax(X,j) == S) {
max = maxCheck(max,(tax(Y,i)+tax(Y,j)));
}
}
... | /usr/bin/ld: /tmp/ccg3zOYw.o: in function `main':
a.cc:(.text+0xfa): undefined reference to `solve()'
collect2: error: ld returned 1 exit status
|
s622069989 | p00773 | C++ | #include <iostream>
using namespace std;
int X,Y,S;
int tax(double rate,int price){
return price*(100+rate)/100;
}
int solve(){
int maximum = 0;
for(int i=1; i<S; ++i){
for(int j=1; j<S; ++j){
if(tax(X,i)+tax(X,j) == S)
maximum = max(maximum, tax(Y,i)+tax(Y,j))
... | a.cc: In function 'int solve()':
a.cc:15:58: error: expected ';' before '}' token
15 | maximum = max(maximum, tax(Y,i)+tax(Y,j))
| ^
| ;
16 | }
| ~ ... |
s479790864 | p00773 | C++ | #include<iostream>
using namespace std;
int main(){
int maximum;
int X,Y,S;
cin >> X >> Y >> S;
for(int i=1;i<S;++i)
for(int j=1;j<S;j++){
if(tax(X,i)+tax(X,j)==S)
maximum = max(maximum,tax(Y,i)+tax(Y,j));
}
cout << maximum << endl;
}
int tax(int a,int b){
return (int)b*(double)(1+a/100);
} | a.cc: In function 'int main()':
a.cc:10:20: error: 'tax' was not declared in this scope
10 | if(tax(X,i)+tax(X,j)==S)
| ^~~
|
s883807919 | p00773 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int maximum=0;
int X,Y,S;
cin >> X >> Y >> S;
for(int i=1;i<S;++i)
for(int j=1;j<S;j++){
if(tax(X,i)+tax(X,j)==S)
maximum = max(maximum,tax(Y,i)+tax(Y,j));
}
cout << maximum << endl;
}
int tax(int a,int b){
return (int)b*(double)(1... | a.cc: In function 'int main()':
a.cc:11:20: error: 'tax' was not declared in this scope
11 | if(tax(X,i)+tax(X,j)==S)
| ^~~
|
s824123718 | p00773 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int maximum=0;
int X,Y,S;
cin >> X >> Y >> S;
for(int i=1;i<S;++i)
for(int j=1;j<S;j++){
if(tax(X,i)+tax(X,j)==S)
maximum = max(maximum,tax(Y,i)+tax(Y,j));
}
cout << maximum << endl;
return 0;
}
int tax(int a,int b){
return... | a.cc: In function 'int main()':
a.cc:11:20: error: 'tax' was not declared in this scope
11 | if(tax(X,i)+tax(X,j)==S)
| ^~~
|
s187486527 | p00773 | C++ | #include<iostream>
using namespace std;
int main(){
int x=1,y=1,s=11,k=0,max[1000];
while(S !=0){
cin>>x>>y>>s;
S=x+y+s;
int a,b,A,C,D,t[1000];
k+=1;
for(a=1;a<s-1;a++){
A=a+a*x/100;
for(b=1;b+b*x/100<s-A;b++)
C=a+a*y/100;
D=b+b*y/100;
t[a]=C+D;
}
int i,M=t[1];
for(i=1;i<s-1;i++){
... | a.cc: In function 'int main()':
a.cc:7:15: error: 'S' was not declared in this scope
7 | while(S !=0){
| ^
|
s520550100 | p00773 | C++ | #include "../stdc++.h"
#define loop(n, i) for(int i=0;i<n;i++)
#define all(v) v.begin(),v.end()
#define HERE cout << "HERE: " << __LINE__ << endl;
#define INSP(v) cout << v << " at " << __LINE__ << endl;
using namespace std;
typedef long long ll;
int tax(int a, int t) {
return static_cast<int>(a*(100+t)/100);
}... | a.cc:1:10: fatal error: ../stdc++.h: No such file or directory
1 | #include "../stdc++.h"
| ^~~~~~~~~~~~~
compilation terminated.
|
s902550349 | p00773 | C++ | #include <stdio.h>
//?¨????pct%??§?¨????yen????????¨???????¨??????????
int zeikomi(int yen, int pct){
return yen*(100+pct)/100;
}
//?¨????pct%??§?¨????yen????????????????¨?????????????????????§???
int zeinuki(int yen, int pct){
if( yen*100%(100+pct) == 0 )
return yen*100/(100+pct);
else
return (yen+1)*100/(100... | a.cc:16:1: error: '::main' must return 'int'
16 | void main(){
| ^~~~
|
s833737784 | p00773 | C++ | 5 8 105
8 5 105
1 2 24
99 98 24
12 13 26
1 22 23
1 13 201
13 16 112
2 24 50
1 82 61
1 84 125
1 99 999
99 1 999
98 99 999
1 99 11
99 1 12
0 0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5 8 105
| ^
|
s493805057 | p00773 | C++ | #include <iostream>
using namespace std;
int x,y,s,i,j,sum;
int max=0;
int main() {
while(1){
cin>>x>>y>>s;
if (x==0) break;
for (i=1;i<s;i++){
for (j=1;j<s-i;j++){
if (i*(100+x)/100+j*(100+x)/100==s){
sum=i*(100+y)/100+j*(100+y)/100;
if (max<sum){
max=sum;
}
}
}
}
co... | a.cc: In function 'int main()':
a.cc:15:15: error: reference to 'max' is ambiguous
15 | if (max<sum){
| ^~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:... |
s594239495 | p00773 | C++ | #include <iostream>
#include <vector>
#include <algorithm> // sort
#include <map> // pair
using namespace std;
//????¨????s???????????????????????????????????????
//????????¨???????¨????y??§??????????????????????????§????????????
int tax(int p, int price){
return price * (100 + p) / 100;
}
int main(){
int x, y, s;... | a.cc: In function 'int main()':
a.cc:31:10: error: expected '}' at end of input
31 | }
| ^
a.cc:14:11: note: to match this '{'
14 | int main(){
| ^
|
s041430509 | p00773 | C++ |
#include<iostream>
using namespace std;
int tax(int x,int y);
int tax(int x,int y,int a){
int a=a*(100+y)/(100+x);
return a;
}
int main()
{
while(1){
cin>>x>>y>>a;
if(x==0&&y==0&&a==0){
break;
}
cout<<tax(x,y,a)<<endl;
}
return 0;
} | a.cc: In function 'int tax(int, int, int)':
a.cc:7:9: error: declaration of 'int a' shadows a parameter
7 | int a=a*(100+y)/(100+x);
| ^
a.cc:6:25: note: 'int a' previously declared here
6 | int tax(int x,int y,int a){
| ~~~~^
a.cc: In function 'int main()':
a.cc:13:1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.