Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
#include<string.h>
int main(void) {
char a[1001];
scanf("%s",a);
int b=strlen(a);
if(a[b-1]=='s')
{printf("%s\n",strcat(a,"es"));}
else
{
printf("%s\n",strcat(a,"s"));
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179439/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179439/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
char S[1024];
scanf("%s", S);
int i=0;
while(S[i]!='\0'){
i++;
}
if(S[i-1]=='s'){
S[i]='e';
S[i+1]='s';
S[i+2]='\0';
}
else{
S[i]='s';
S[i+1]='\0';
}
printf("%s\n", S);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179497/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179497/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char s[100009];
int t,d,n,q,m=0;
scanf("%d %d",&n,&q);
for(int i=1;i<=n;i++)
{
scanf("%d",&s[i]);
if(s[i]==1)
m++;
}
while(q--)
{
scanf("%d %d",&t,&d);
if(t==1)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17954/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17954/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
#include<string.h>
#define min(x,y) ((x)<(y)?(x):(y))
int n,m;
int c[16],x[20000];
long dp[20001][256];
long rec(int p, int y){ //現在p番目に注目しており、その手前の値はy。x[n]との差の二乗を返す
if(dp[p][y]>=0) return dp[p][y];
//終条件
if(p==n) return 0;
long ret=10000000000;
for(int i=0; i<m; ++i){... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179590/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179590/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@dp = dso_local local_unnam... |
#include <stdio.h>
#include <string.h>
typedef struct {
const char* name;
int hosei;
} settouzi_t;
const settouzi_t settouzi_list[20]={
{"yotta" , 24 },
{"zetta" , 21 },
{"exa" , 18 },
{"peta" , 15 },
{"tera" , 12 },
{"giga" , 9 },
{"mega" , 6 },
{"kilo" , 3 },
{"hecto" , 2 },
{"deca" , 1 },
{"dec... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179640/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179640/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.settouzi_t = type {... |
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i, N;
long long T, t[200001];
scanf("%d %lld", &N, &T);
for (i = 1; i <= N; i++) scanf("%lld", &(t[i]));
long long sum = T;
for (i = 2; i <= N; i++) sum += (t[i] - t[i-1] > T)? T: t[i] - t[i-1];
printf("%lld\n", sum);
fflush(stdout);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179684/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179684/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
char ss[16][99]={
"AKIHABARA",
"AKIHABAR",
"AKIHABRA",
"AKIHABR",
"AKIHBARA",
"AKIHBAR",
"AKIHBRA",
"AKIHBR",
"KIHABARA",
"KIHABAR",
"KIHABRA",
"KIHABR",
"KIHBARA",
"KIHBAR",
"KIHBRA",
"KIHBR"
};
int main(){
char s[99];
scanf("%s",s);
for(int i=0;i<16;i++)if(!strcmp(s,ss[i]))... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179741/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179741/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@ss = dso_local global [16 ... |
#include <stdio.h>
#include <string.h>
int main(void){
char nums[10][8];
strcpy(nums[0], "0111111");
strcpy(nums[1], "0000110");
strcpy(nums[2], "1011011");
strcpy(nums[3], "1001111");
strcpy(nums[4], "1100110");
strcpy(nums[5], "1101101");
strcpy(nums[6], "1111101");
strcpy(nums[7], "0100111");
strcpy(num... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179785/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179785/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str.10 = private unnamed_... |
#include <stdio.h>
#include <stdlib.h>
#define MOD 1000000007
#define MAX 100000
int p2[MAX+5];
int f[MAX + 5];
int main()
{
int i, t;
int N, M;
p2[0] = 1;
for (i = 1; i <= MAX; i++) p2[i] = (p2[i - 1] << 1) % MOD;
scanf("%d%d", &N, &M);
f[M] = 1;
for (i = M + 1; i < N && i <= 2 * M; i++) {
f[i] = ((f[i ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179835/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179835/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@p2 = dso_local local_unnam... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
int upll(const vo... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179886/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179886/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.atai = type { i64, ... |
#include<stdio.h>
int main(){
int K;
scanf("%d",&K);
printf("%d\n",(K/2)*(K/2+K%2));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179936/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179936/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
long long int n,q,i,c=0,d=0;
scanf("%lli %lli",&n,&q);
int a[n];
for(i=0;i<n;i++){
scanf("%d",&a[i]);
if(a[i]==1){
c++;
}
else{
d++;
}
}
for(i=0;i<q;i++){
long long int x,b;
scanf("%lli %lli",&x,&b);
if(x==1){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17998/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17998/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main(void)
{
int A;
scanf("%d",&A);
if(A%2==0){
printf("%d",(A/2)*(A/2));
} else {
printf("%d",(A/2+1)*(A/2));
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180028/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180028/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
//読み取り
int a;
int ans;
scanf("%d",&a);
if(a%2==0){
ans = (a/2)*(a/2);
printf("%d",ans);
}else{
ans = ((a+1)/2) * ((a-1)/2);
printf("%d",ans);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180071/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180071/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main(void){
int K,answer = 0;
scanf("%d",&K);
for(int i=2; i<=K; i+=2){
for(int j=1; j<=K; j+=2){
answer++;
}
}
printf("%d\n",answer);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180114/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180114/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
int k;
scanf("%d",&k);
if (k % 2 == 0) {
printf("%d\n",k * k / 4);
} else {
printf("%d\n",(k - 1) * (k + 1) / 4);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180158/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180158/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int A,N;
scanf("%d", &A);
if (A % 2 == 1)
N = A / 2 * (A / 2 + 1);
else
N = A / 2 * A / 2;
printf("%d", N);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180208/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180208/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
long long a,b,r,tmp,x;
scanf("%lld %lld",&a,&b);
x=a*b;
if(a>b){
tmp=a;
a=b;
b=tmp;
}
r=b%a;
while(r!=0){
b=a;
a=r;
r=b%a;
}
printf("%lld\n",x/a);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180251/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180251/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
int acnt[100001];
int bcnt[100001];
int main(){
int a,b;
int i;
long long ans = 1;
scanf("%d %d", &a, &b);
for(i = 0;i < 100001;i++){
acnt[i] = 0;
bcnt[i] = 0;
}
for(i = 2;i <= a;i++){
while(a % i == 0){
acnt[i]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180295/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180295/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
unsigned long max(unsigned long x, unsigned long y) {
if(x > y) return x;
return y;
}
unsigned long min(unsigned long x, unsigned long y) {
if(x < y) return x;
return y;
}
unsigned long pau(unsigned long a, unsigned long b) {
int i;
u... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180338/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180338/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main() {
long x;
long A, B;
scanf("%ld %ld", &A, &B);
long i = 1, j = 1;
while (1) {
while (B * j <= A * i) {
if (A * i == B * j) {
x = A * i;
goto OUT;
}
j++;
}
i++;
}
OUT:
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180381/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180381/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
int main(){
long long int a,b,c,r,tmp;
scanf("%lld %lld",&a,&b);
c = a*b;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r = a % b;
while(r!=0){
a = b;
b = r;
r = a % b;
}
printf("%lld\n",c/b);
return 0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180424/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180424/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
long long gcd(long long A, long long B) {
long long t, r;
if (A<B) {
t=A;
A=B;
B=t;
}
r = A%B;
while (r!=0) {
A=B;
B=r;
r=A%B;
}
return B;
}
int main(void) {
long long A, B;
scanf("%lld%lld", &A, &B);
printf("%ll... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180468/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180468/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
int m,n;
void makeboard(int **board,int x,int y,int rank);
int countboard(int **board,int x,int y,int rank);
int main(void){
int s,t;
int i,j,k,count=0,counts;
int place[10][2];
int **board,**copyboard;
while(scanf("%d",&m) && m!=0){
count=0;
scanf("%d",&n);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180510/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180510/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(void)
{
double x1, y1, x2, y2;
double dis;
scanf("%lf", &x1);
scanf("%lf", &y1);
scanf("%lf", &x2);
scanf("%lf", &y2);
dis = ((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2));
printf ("%lf\n", sqrt(dis));
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180554/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180554/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main()
{
double x1,y1,x2,y2;
scanf("%lf",&x1);
scanf("%lf",&y1);
scanf("%lf",&x2);
scanf("%lf",&y2);
printf("%lf\n",sqrt(pow(x2-x1,2)+pow(y2-y1,2)));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180598/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180598/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define SIZE 200000
int main() {
int num[SIZE], ind[SIZE];
int n, i, b, up = 0;
scanf ("%d", &n);
for (i = 0; i < n; i++)
{
scanf ("%d", num + i);
ind[num[i]] = i;
}
for (i = 0; i < n; i++)
{
scanf ("%d", &b);
if (up ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18067/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18067/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main()
{
int n,i;
scanf("%d",&n);
char str[n];
scanf("%s",str);
for(i=1;i<n;i++)
{
if(str[i]!=str[i-1])
{
printf("YES\n%c%c",str[i-1],str[i]);
return 0;
}
}
printf("NO");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18072/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18072/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include <string.h>
int main(void){
int n,a=0,b=0,ab=0,o=0;
char type[3];
while(scanf("%d,%s",&n,type)!=EOF){
if(strcmp(type,"A")==0)
a++;
else if(strcmp(type,"B")==0)
b++;
else if(strcmp(type,"AB")==0)
ab++;
else
o++;
}
printf("%d\n%d\n%d\n%d\n",a,b,... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180785/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180785/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void)
{
int a;
char x[3];
int A=0,B=0,O=0,AB=0;
while(scanf("%d,%s",&a,x)!=EOF){
if(x[0] == 'A' && x[1] == '\0')A++;
else if(x[0] == 'B')B++;
else if(x[0] == 'O')O++;
else AB++;
}
printf("%d\n%d\n%d\n%d\n",A,B,AB,O);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180886/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180886/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int bloodVal[4] = {0};
int num;
char bloodType;
while( scanf("%d,%c", &num, &bloodType) != EOF )
{
switch( bloodType )
{
case 'A':
scanf("%c", &bloodType);
if( bloodType == '\n' )
{
bloodVal[0]++;
}
else
{
bloodVal[2]++;
}
brea... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180936/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180936/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define N 10001
#define P 104730 // No.10000 prime number is 104729
int main(void) {
int is_prime[P];
int prime[N];
int i;
int j;
int len;
int input;
int output;
for (i = 2;i < P;++i) {
is_prime[i] = 1;
}
// sieve of Eratosthenes
len = P/2;
for (i = 2;i < len;++i) {
if (is_prime[i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180987/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180987/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#define MAX 10000
#define MAX2 1000000
int sieve[MAX2+1];
int primes[MAX];
void create_primes() {
memset(sieve, 0, sizeof(sieve));
memset(primes, 0, sizeof(primes));
int i,j,p;
p = 0;
for (i=2; i<MAX2; i++) {
if (!sieve[i]) {
primes[p++]=i;
if (p>=MAX) break;
for (j... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181043/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181043/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@sieve = dso_local local_un... |
// AOJ 2249: Road Construction
// 2017.11.15 bal4u@uu
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 16010
typedef struct { int t, node, c; } QUE;
QUE que[MAX]; int qsize;
#define PARENT(i) ((i)>>1)
#define LEFT(i) ((i)<<1)
#define RIGHT(i) (((i)<<1)+1)
void min_heapify(int i)
{
int l, r... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181100/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181100/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.QUE = type { i32, i... |
#include<stdio.h>
#include<stdlib.h>
int distance(short ax, short ay, short bx, short by);
short X[100];
short Y[100];
int H[100];
int main(){
short N, i;
short is;
if(scanf("%hd", &N));
short A = -1;
for(i=0; i<N; i++){
if(scanf("%hd%hd%d", &X[i], &Y[i], &H[i]));
if(A==-1 && H[i]!=0){A=i;}
}
short CX=0, C... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181159/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181159/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int N,B[10][10],i,j;
int Ix[3][14]={{0,-1,0,1,-2,-1,0,1,2,-1,0,1,0,-9},{0,1,2,0,1,2,0,1,2,-9},{0,-1,0,1,0,-9}};
int Iy[3][14]={{0, 1,1,1, 2, 2,2,2,2, 3,3,3,4,-9},{0,0,0,1,1,1,2,2,2,-9},{0, 1,1,1,2,-9}};
int ch(int x,int y){return (x>=0&&x<10&&y>=0&&y<10&&B[y][x... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181201/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181201/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@Ix = dso_local local_unnam... |
#include<stdio.h>
#include<stdlib.h>
int main ()
{
int a,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);
if(d>=(abs(a-c))){
printf("Yes");
}
else if(d>=abs(a-b)&& d>=abs(b-c)){
printf("Yes");
}
else{
printf("No");
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181245/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181245/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(){
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
((abs(a-b)<=d&&abs(b-c)<=d)||abs(a-c)<=d)?puts("Yes"):puts("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181302/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181302/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdlib.h>
#include <stdio.h>
int main (){
int a,b,c,d,e,f,g;
scanf ("%d%d%d%d",&a,&b,&c,&d);
e=abs(a-b);
f=abs(b-c);
g=abs(a-c);
if (g<d+1){
printf ("Yes");
}
else if (e<d+1 & f<d+1){
printf ("Yes");
}
else{
printf ("No");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181346/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181346/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main()
{
int a, b, c, d;
scanf("%d %d %d %d",&a, &b, &c, &d);
if ( abs(a - c) <= d )
{
printf("Yes\n");
}
else if ( abs(a - b) <= d && abs(b - c) <= d)
{
printf("Yes\n");
}
else
{
printf("No\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181410/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181410/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int distance(int x, int y){
int dis;
dis = x-y;
if(dis>=0){
return x-y;
}else{
return y-x;
}
}
int main(){
int a, b, c, d;
scanf("%d %d %d %d", &a, &b, &c ,&d);
if(distance(a,c)<=d){
printf("Yes\n");
}else{
if((distance(a,b)<=d) && ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181461/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181461/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void)
{
int a[200][3];
int n;
int score[200];
int i, j;
int flag[101];
scanf("%d", &n);
for (i = 0; i < n; i++){
for (j = 0; j < 3; j++){
scanf("%d", &a[i][j]);
}
}
memset(score, 0, sizeof(score));
for (i = 0; i < 3; i++){
memset(flag, 0, sizeof(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181612/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181612/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
int n,k;
scanf("%d %d", &n, &k);
int a[n];
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
int answer = (n-1+k-2)/(k-1);
printf("%d\n", answer);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181656/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181656/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
void swap(int *xp, int *yp){
int temp = *xp;
*xp = *yp;
*yp = temp;
}
int main(void){
int a[4];
int s1 = 0, s2 = 0;
int i, j;
for(i = 0;i<4;i++)
scanf("%d", &a[i]);
for(i = 0;i<4-1;i++){
for(j = 0;j<4-i-1;j++){
if(a[j]>a[j+1])
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1817/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1817/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr co... |
#include <stdio.h>
int main(){
int N,k,i,x,ans=0;
scanf("%d %d",&N,&k);
ans = (N-1)/(k-1);
if( (N-1)%(k-1)>0){
ans++;
}
printf("%d",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181742/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181742/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int n, k;
int a[100000];
int i, ans=0;
scanf("%d %d", &n, &k);
for(i=0; i<n; i++)
scanf("%d", &a[i]);
if(n == k)
printf("1");
else{
for(i=n-1; i>0; i-=k-1)
ans++;
printf("%d", ans);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181786/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181786/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
#include<limits.h>
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define N 1000
int main(){
int n,i,q,com,x,y,j;
int a[N];
int mini[N];
int maxi[N];
int b;
int min=INT_MAX;
int max=INT_MIN;
scanf("%d",&n);
b=sqrt(n);
for(i=0;i<n;i++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181829/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181829/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int member_num,quorum;
int list[100];
int main(void) {
int i,j;
int date_num,date;
int max_date,max_num;
while(1) {
scanf("%d%d",&member_num,&quorum);
if(member_num==0 && quorum==0)break;
for(i=0;i<100;i++)list[i]=0;
for(i=0;i<member_num;i++) {
scanf("%d",&date_num);
for(j=0;j<dat... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181872/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181872/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int IsPrime(int n){
int i;
if(n < 2)
return 0;
else if(n == 2)
return 1;
if(n % 2 == 0)
return 0;
for(i = 3; i <= n / i; i += 2)
if(n % i == 0)
return 0;
return 1;
}
int main (){
int a,b,c,d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181915/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181915/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int a[1000001]={0};
int main(void){
int n,i,j,ans,input;
for(i=2;i<=1000000;i++){
if(a[i]==0){
for(j=2;i*j<=1000000;j++){
a[i*j]=1;
}
}
}
while(scanf("%d",&input)!=EOF){
ans=0;
for(i=2;i<=input;i++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181959/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181959/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@a = dso_local local_unname... |
#include <stdio.h>
const int MAX_V = 999999;
int prime[1000000];
int main(){
//?´???°??¨??????
int i, k;
for( i = 2; i <= MAX_V; i++) {
prime[i] = 1;
}
for( i = 2; i * i <= MAX_V; i++){
if(prime[i]) {
for( k = 2 * i; k <= MAX_V; k += i){
prime[k] = 0;
}
}
}
//?´???????????±???????
int sum[MAX_V ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182000/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182000/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@MAX_V = dso_local local_un... |
#include <stdio.h>
#define MAX 1000000
int main(void){
int prime[MAX];
int n,i,j,cnt;
prime[0]=prime[1]=0;
for(i=2;i<MAX;i++) prime[i]=1;
for(i=2;i*i<MAX;i++)
if(prime[i])
for(j=2*i;j<MAX;j+=i)
prime[j]=0;
while(scanf("%d",&n)!=EOF){
cnt=0;
for(i=2;i<=n;i++)
cnt+=prime[i];
printf("%d\n",cnt);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182044/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182044/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define MAX 1000000
int main(void){
int prime[MAX];
int i,j,n;
prime[0]=prime[1]=0;
for(i=2;i<MAX;i++)
prime[i]=1;
for(i=2;i*i<=MAX;i++){
for(j=2;;j++){
if(i*j > 999999)
break;
prime[i*j]=0;
}
}
while(scanf("%d",&n) != EOF){
int sum=0;
for(i=2;i<=n;i++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182088/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182088/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
#define MAX_SOSU 1000000
int main(void)
{
int n;
int i, j, k, f;
int sosu[MAX_SOSU];
k = 0;
sosu[0] = 0;
for( i=2; i<=MAX_SOSU; i++) {
f = 0;
for( j=2; j<=sqrt(i); j++ ) {
if ( i % j == 0 ) {
f = 1;
goto out;
}
}
out:
if ( f == 0 ) k++;
sosu[i - 1] = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182130/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182130/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int primes[1000000];
void Sieve(){
for(int i= 2; i < 1000000; i++){
primes[i] = 1;
}
primes[1] = 0;
for(int i = 2; i < 1000; i++){
if(primes[i] == 1)
for(int j=i; j*i < 1000000;j++){
primes[j*i] = 0;
}
}
}
int IsP... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182174/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182174/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@primes = dso_local local_u... |
#include <stdio.h>
#include <math.h>
int n,i,j,sqrtn,sum,flag;
char number[1000000];
int hantei(int x){
if (number[x]==1){
return 0;
}
sqrtn=(int)sqrt(x);
flag=0;
for(j=1;j*6-1<sqrtn;j++){
if(x%(j*6+1)==0 || x%(j*6-1)==0){
flag=1;
break;
}
}
if(flag==0){ /*ツ素ツ青板つカツづ。ツづ按つ「ツづ個づ可フツδ可グツづーツ猟ァツづづつュツづヲ*... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182231/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182231/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@number = dso_local local_u... |
#include <stdio.h>
#include <math.h>
#define N_MAX 999999
int main(void){
/* eratosthenes */
char a[N_MAX+1]; int i, j;
a[0]=0, a[1]=0;
for(i=2; i<=N_MAX; i++) a[i]=1;
for(i=2; i<=(int)sqrt(N_MAX); i++)
if(a[i])
for(j=2*i; j<=N_MAX; j+=i) a[j]=0;
while(~scanf("%d",&i)){
int sum=0;
for(;i>=0;i--... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182297/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182297/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int box[1000000];
int main() {
int i, j, k;
int n = 1000000;
int count = 0;
int m;
box[0] = 1;
// scanf("%d", &n);
for(i = 0; i < n; i++)
if(box[i] == 0)
for(j = 2; j * (i + 1) - 1 < n; j++)
box[j * (i + 1) - 1] = 1;
//デバッグ用
/*
for(i = 0; i < n; i++)
if(box[i] == 0)
pri... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182369/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182369/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@box = dso_local local_unna... |
#include <stdio.h>
#include <string.h>
#define MAX (1000000)
int main(void)
{
char flag[MAX + 1];
int count;
int i, j;
int input;
memset(flag, 1, MAX);
flag[0] = flag[1] = 0;
for (i = 2; i <= 1001; i++) if (flag[i]) for (j = i * 2; j <= MAX; j += i) flag[j] = 0;
while... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182411/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182411/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int sosuu[1000000],kazu,n,i,j;
while(scanf("%d",&n)!=EOF){
kazu=n-1;
for(i=2;i<=n;i++){
sosuu[i]=1;
}
sosuu[0]=0;sosuu[1]=0;
for(i=2;i<=n;i++){
if(sosuu[i]==1){
for(j=i*2;j<=n;j+=i){
if(sosuu[j]==1){
kazu--;
sosuu[j]=0;
}
}
}
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182455/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182455/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main (void)
{
int n, list[1000000];
int i, j, count;
while (scanf ("%d", &n) != EOF){
count = 0;
for (i = 0; i <= n; i++) list[i] = 0;
for (i = 2; i <= n; i++){
if(list[i] == 0){
count++;
for(j = 1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182499/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182499/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ Volume 0 Problem 0081
#include <stdio.h>
int main(void)
{
double x1, y1, x2, y2, xq, yq;
double a1, b1;
double a2, b2;
double xr, yr;
while (scanf("%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &xq, &yq) != EOF){
if (x1 == x2){
xr = xq + (x1 - xq) * 2;
yr = yq;
}
else if (y1 == y2){
xr = x... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182541/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182541/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
//set many funcs template
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<time.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){if(a<b){return a... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1826/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1826/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr co... |
#include <stdio.h>
#include <math.h>
int main()
{
int n,k,i,ans2;
float ans1;
scanf("%d", &n);
int arr[2*n];
for(i = 0;i < 2*n;i++){
scanf("%d", &arr[i]);
}
for(i = 0;i < 2*n;i+=2){
if(arr[i] == 0 && arr[i+1] == 0){
printf("0\n");
}
else{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18265/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18265/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(){
int k,a,b;
while(scanf("%d%d%d",&k,&a,&b)==3){
if(a>b) printf("%d\n",0);
else if(a!=b&&k==1) printf("%d\n",0);
else if(a==b&&k==1) printf("%d\n",1);
else printf("%lld\n",(long long)(k-2)*(b-a)+1);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182693/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182693/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <stdlib.h>
#include <stdbool.h>
#define MOD 1000000007
#define END printf("\n");return 0;
#define QS09(how_data,data) qsort(data,how_data,sizeof(long),(int (*)(const void *,const void *))qsort_09);
#define QS90(how_data,data) qsort(da... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182736/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182736/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.wdg = type { i64, i... |
#include <stdio.h>
int main()
{
int x,y,z,i,j,k,a,b,c,n,m,t;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
for(x = 0; x < n; x++)
printf("%d ",2*n + 2*x);
puts("");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18278/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18278/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main(void) {
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
for(int i=4*n;i>n*2;i=i-2)
{
printf("%d ",i);
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18283/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18283/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int check(int *ball, int n, int l, int r)
{
if (n == 0)
return 1;
if (*ball > l && check(ball+1, n-1, *ball, r))
return 1;
if (*ball > r && check(ball+1, n-1, l, *ball))
return 1;
return 0;
}
int main()
{
int N, ball[10], i;
scanf("%d", &N);
while (N--) {
for (i = 0; i < 10; i ++)
sc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182880/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182880/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define N 10
#define MAX 1024
void dec_to_bin(int n,int BIT[]){
int i;
for (i=N-1;i>=0;i--){
BIT[i]=n%2;
n/=2;
}
}
int tamaire(int A[],int data[],int BIT[],int c){
int i,j=0;
for (i=0;i<N;i++)
if (BIT[i]==c){
data[j++]=A[i];
}
return j;
}
int judge(int data[],int n... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182945/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182945/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
enum direction {left, right};
int main(void)
{
int ball[10], fall[2][10] = {0};
int i, leftheight, rightheight, data, j;
scanf("%d", &data);
while (data--){
for(j = 0; j < 10; j++) fall[left][j] = 0;
for(j = 0; j < 10; j++) fall[right][j] = 0;
for(i = 0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182989/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182989/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int ta[200010],nt[400010],to[400010],cc[400010];
long long u[200010],ANS[200020],ans[200020];
int mbk(long long a,int n,int m){return n?(mbk((a*a)%m,n/2,m)*(n%2?a:1))%m:1;}
int inv(int a,int m){return mbk((long long)a,m-2,m);}
long long pp[200010],ip[200010],M=1e9+7;
int f(int s){//printf("!%d\n",s);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183038/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183038/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@M = dso_local local_unname... |
#include <stdio.h>
typedef struct {
char *grade;
int m500;
int m1000;
} DATA;
int main(void)
{
DATA data[] = {
{"AAA", 3550, 7100},
{"AA", 3750, 7700},
{"A", 4000, 8300},
{"B", 4300, 8900},
{"C", 5000, 10500},
{"D", 5500, 11600},
{"... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183089/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183089/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.DATA = type { ptr, ... |
#include <stdio.h>
int main()
{
int N;
scanf("%d", &N);
if (N % 10 == 9 || N / 10 == 9) printf("Yes\n");
else printf("No\n");
fflush(stdout);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183139/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183139/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
int tc;
scanf("%d", &tc);
while (tc-- > 0) {
int n;
scanf("%d", &n);
long long sum = 0;
for (int i = 0; i < n; i++) {
int a;
scanf("%d", &a);
sum += a;
}
long long m = sum % n;
printf("%lld\n", m * (n - m));
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18319/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18319/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(void){
int num[2]={};
scanf("%1d%1d",&num[0],&num[1]);
if(num[0]==9||num[1]==9)printf("Yes");
else printf("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183232/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183232/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include "stdio.h"
int main(int argc, char const *argv[]) {
int N;
scanf("%d", &N);
if (N%10==9 || (N/10)%10==9) {printf("Yes");
}else{printf("No");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183276/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183276/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int a;
int flag;
while(scanf("%d",&a)!=EOF)
{
flag=0;
while(a!=0)
{
if(a%10==9)
{
flag=1;
break;
}
a=a/10;
}
if(flag)
printf("Yes\n");
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183319/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183319/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int t;
scanf("%d", &t);
while (t--)
{
long long int a, b;
scanf("%lld %lld", &a, &b);
long long int maxExc = 0;
long long int minMoves = 0;
if (a == b)
{
maxExc = 0;
minMoves = 0;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18337/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18337/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main()
{
int t;
scanf("%d",&t);
while(t--){
long long int n,sum=0,rem=0,k=0;
scanf("%lld",&n);
long long int arr[n];
for(int i=0;i<n;i++){
scanf("%lld",&arr[i]);
sum += arr[i];
}
if(sum >= n){
rem = sum%n;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18342/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18342/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main() {
char ar[105], ray[105];
scanf("%s %s", ar, ray);
printf("%s%s\n",ray,ar);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183463/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183463/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
//#include <string.h>
int main(void){
char s[101], t[101];
scanf("%s %s", s, t);
printf("%s%s", t, s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183506/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183506/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int t;
scanf("%d",&t);
long long int a, b;
long long int maxGCD;
long long int countForMoves, excitement;
long long int minMove, decreases, increases;
long long int x;
for (int i = 1;i<=t;i++){
scanf("%lld %lld", &a,&b);
x = a - b;
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18355/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18355/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main()
{
char inputA[100];
char inputB[100];
scanf("%s%s", &inputA, &inputB);
printf("%s%s \n", &inputB, &inputA);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183593/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183593/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main()
{
char a[102],b[102];
int i,sum1=0,sum2=0,j;
scanf("%s",a);
scanf("%s",b);
for(i=0; a[i]!='\0'; i++){
sum1=sum1+a[i];
}
for(j=0; a[j]!='\0'; j++){
sum1=sum1+a[j];
}
if(sum1<sum2){
printf("%s%s\n",a,b);
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183636/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183636/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#define MAX 100000
#define MAX_A 1000000000
typedef long long ll;
ll A[MAX];
int n;
int compare(const void* a,const void* b)
{
ll X = *(ll*)a;
ll Y = *(ll*)b;
if(X < Y)return 1;
if(X == Y)return 0;
return -1;
}
int check(ll val)
{
int i;
ll superviso... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18368/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18368/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@n = dso_local global i32 0, ... |
#include <stdio.h>
int main(){
char s[100];
char t[100];
scanf("%s %s",s,t);
printf("%s%s",t,s);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183722/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183722/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#define REP(i,n) for(i=0;i<n;i++)
#define ll long long
//prototype declaration
int iin();
long long llin();
double din();
char cin();
void stin(char *s);
void iout(int i);
void llout(long long i);
void dout(double i);
voi... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183766/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183766/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
//set many funcs template
//Ver.20190820
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<time.h>
#include<assert.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a,int b){if(a>b){return a;}return b;}
int... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183809/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183809/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.sd = type { i32, i3... |
#include <stdio.h>
#include <stdlib.h>
int main(void){
int n,c,i,o,r,p=0;
int b[100][100]={0};
scanf("%d%d",&n,&c);
int *a;
int memo[100]={0};
a = calloc(c,sizeof(int));
for(i=0;i<c;i++)
scanf("%d",&a[i]);
for(i=0;i<c;i++){
for(o=0;o<n;o++){
scanf("%d",&b[i][o]);
}
for(r=0;r<n;r++){
if(a[i] == b[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183852/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183852/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define fr(i,n,m) for(ll i=n;i<m;i++)
int main()
{
ll n, k;
scanf("%lli %lli",&n, &k);
ll c=0,ch=0;
fr(i,1,n+1){
if (i%k == 0) {
c++;
}
}
fr(i,1,n+1){
if (i%k == k/2 && k%2 == 0) {... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183896/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183896/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(int argc, char const *argv[])
{
long n, k, k1, a, c, c1=0, c2=0;
scanf("%ld%ld", &n, &k);
k1=k/2;
if ((k+2)%2==0)
{
a=n-k1;
if (a>=0) c1=a/k+1;
}
a=n;
c2=a/k;
c=c1*c1*c1+c2*c2*c2;
printf("%ld\n", c);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183939/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183939/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183982/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183982/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int a[45];
int b[45];
int c[45];
int dp[41][415][415];
int gcd(int x, int y);
int min(int a, int b);
int main() {
int i, j, k;
for (i = 0; i <= 40; i++) {
for (j = 0; j <= 400; j++) {
for (k = 0; k <= 400; k++) {
dp[i][j][k] = 114514;
}
}
}
int N, Ma, Mb;
scanf("%d %d %d",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_184039/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_184039/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@dp = dso_local local_unnam... |
# include<stdio.h>
#include<stdlib.h>
int main()
{
int n,cases,fifty=0,twentyfive=0,flag=1;
scanf("%d",&cases);
flag=1;
while(cases--)
{ scanf("%d",&n);
//printf("%d",cases);
if(flag==1)
{
if(n==25)
{
tw... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18409/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18409/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(void){
long int a,b,c,d;
long long max;
scanf("%ld",&a);
scanf("%ld",&b);
scanf("%ld",&c);
scanf("%ld",&d);
max=a*c>b*d?a*c:b*d;
max=max>a*d?max:a*d;
max=max>b*c?max:b*c;
printf("%lld",max);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_184132/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_184132/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
typedef long long ll;
int main(){
ll a,b,c,d;
ll ans[5];
scanf("%lld%lld%lld%lld",&a,&b,&c,&d);
ans[0] = a*c;
ans[1] = a*d;
ans[2] = b*c;
ans[3] = b*d;
int i,j;
ll swap;
for(i=0;i<4;i++){
for(j=i+1;j<4;j++){
if(ans[i] > ans[j]){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_184176/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_184176/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
long long a, b, c, d;
scanf("%lld", &a);
scanf("%lld", &b);
scanf("%lld", &c);
scanf("%lld", &d);
long long x[4];
x[0] = a*c;
x[1] = a*d;
x[2] = b*c;
x[3] = b*d;
long long max = x[0];
for(int i=0;i<4;i++){
if(max<x[i]){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_184219/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_184219/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){long long int a,b,c,d,j,g[5],max;
scanf("%lld%lld%lld%lld",&a,&b,&c,&d);
g[0]=a*c;
g[1]=a*d;
g[2]=b*c;
g[3]=b*d;
max=g[0];
for(j=0;j<4;j++)
{
if(max<g[j])
max=g[j];
}
printf("%lld",max);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_184262/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_184262/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
void F(double *x, double *y, double a, double b, double c, double d, double e, double f);
double SQ(double x){ return x * x; }
double SQS(double x, double y){ return SQ(x) + SQ(y); }
int main(void)
{
int N;
double x1, x2, x3, y1, y2, y3, px, py, l, m, n, r;
scanf("%d", &N);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_184305/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_184305/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.