Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
#define ABS(x) ((x) < 0 ? -(x) : (x))
int x,y;
int x_1,y_1,x_2,y_2;
void input()
{
scanf("%d %d",&x,&y);
}
void solve()
{
int m = ABS(x) + ABS(y);
if (x<0 && y<0)
{
x_1 = -m; y_1 = 0;
x_2 = 0; y_2 = -m;
}
else if (x<0)
{
x_1 = -m; y_1 = 0;
x_2 = 0; y_2 = m;
}
els... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_3158/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_3158/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>
#define N 44
int fibonach(int );
int main()
{
int fn,n;
scanf("%d",&n);
fn = fibonach(n);
printf("%d\n",fn);
return 0;
}
int fibonach(int n)
{
int i,a[N];
for(i=0;i<=n;i++)
{
if(i == 0) a[i] = 1;
else if(i == 1) a[i] = 1;
else a[i] = a[i-2] + a[i-1];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_315842/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_315842/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 n,i,swap,A[2]={1,1};
scanf("%d",&n);
for(i=1;i<n;i++){
swap=A[1];
A[1]+=A[0];
A[0]=swap;
}
printf("%d\n",A[1]);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_315886/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_315886/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 M 45
int f[M];
int F(int);
int main(int argc,char *argv[]){
int n,i;
f[0] = 1;
f[1] = 1;
scanf("%d",&n);
for(i = 2; i < M; i++){
f[i] = -1;
}
printf("%d\n",F(n));
return 0;
}
int F(int n){
int x;
if(f[n] != -1) return f[n];
x = F(n-1) + F(n-2)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_315929/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_315929/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"
@f = dso_local local_unname... |
#include <stdio.h>
int fib(int);
int num[45];
int main(void){
int n;
scanf("%d" ,&n);
printf("%d\n" ,fib(n));
return 0;
}
int fib(int n){
if(num[n] > 0)return num[n];
if(n <= 1)return 1;
else{
num[n] = fib(n-1) + fib(n-2);
return num[n];
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316050/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316050/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 fibonacci(int);
int F[44];
int main(){
int x;
scanf("%d",&x);
printf("%d\n",fibonacci(x));
return 0;
}
int fibonacci(int n){
if (n == 0 || n == 1) return F[n] = 1;
if(F[n] != 0)return F[n];
return F[n] = fibonacci(n-2) + fibonacci(n - 1);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316094/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316094/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 i, n, Fibo[44];
scanf("%d", &n);
for(i = 0; i <= n; i++){
Fibo[0] = 1;
Fibo[1] = 1;
if(i > 1){
Fibo[i] = Fibo[i - 1] + Fibo[i - 2];
}
}
printf("%d\n", Fibo[n]);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316144/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316144/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 n, F[45];
int fibonacci(int n){
if(n == 0 || n == 1) return F[n] = 1;
if(F[n] != -1) return F[n];
return F[n] = fibonacci(n - 2) + fibonacci(n - 1);
}
int main(){
int i;
for(i = 0; i < 45; i++)
F[i] = -1;
scanf("%d", &n);
printf("%d\n", fibonacci(n));
return 0;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316188/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316188/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"
@F = dso_local local_unname... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int a[45];
int f(int n){
if(n == 0 || n ==1){
a[n] = 1;
return 1;
}
else if(a[n]!=-1){
return a[n];
}
else {
a[n] = f(n-1) + f(n-2);
return f(n-1) + f(n-2);
}
}
int main(){
int n,i;
for ( i = 0;i<50;i++){
a[i] = -1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316230/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316230/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>
int F[45];
int fibonacci(int n){
if (n==0||n==1)return F[n]=1;
if(F[n]!=0)return F[n];
return F[n]=fibonacci(n-2)+fibonacci(n-1);
}
int main(){
int i,n;
for(i=0;i<45;i++)F[i]=0;
scanf("%d",&n);
printf("%d\n",fibonacci(n));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316281/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316281/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"
@F = dso_local local_unname... |
#include<stdio.h>
#define MAX 44
int fibonacci(int);
int F[MAX];
int main(){
int n,ans;
scanf("%d",&n);
ans=fibonacci(n);
printf("%d\n",ans);
return 0;
}
int fibonacci(int n){
int i;
F[0]=1;
F[1]=1;
for(i=2;i<=n;i++){
F[i]=F[i-2]+F[i-1];
}
return F[n];
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316324/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316324/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 45
void Fibonacci(int);
int main(void){
int n;
scanf("%d", &n);
Fibonacci(n);
return 0;
}
void Fibonacci(int n){
int i, fib[MAX];
fib[0] = 1;
fib[1] = 1;
for(i=2; i<MAX; i++) fib[i] = fib[i-2] + fib[i-1];
printf("%d\n", fib[n]);
retu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316375/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316375/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 fibonatchi(int a,int b,int m){
int c,l;
c=a+b;
l=m-1;
if(l!=0)
return (fibonatchi(c,a,l));
else
return a;
}
int main(void)
{
int n,x,y;
scanf("%d",&n);
x=1;
y=1;
printf("%d\n",fibonatchi(x,y,n));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316425/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316425/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 x,i,fibo[44];
scanf("%d",&x);
for(i=0;i<=x;i++){
if(i==0) fibo[i]=1;
if(i==1) fibo[i]=1;
if(i>1) fibo[i]=fibo[i-1]+fibo[i-2];
if(i==x) printf("%d\n", fibo[i]);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316469/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316469/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 dp[50];
int fibonacci(int n){
if(n==0 || n==1){
dp[n] = 1;
return 1;
}
if(dp[n] != -1) return dp[n];
dp[n] = fibonacci(n-1) + fibonacci(n-2);
return dp[n];
}
int main(){
int n,i;
for(i=0;i<50;i++) dp[i] = -1;
scanf("%d",&n);
printf("%d\n",fibonacci(n));
return 0;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316519/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316519/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>
int Fibonacci(int);
int f[44];
int main(){
int i,n;
for(i=0;i<45;i++){
f[i] = -1;
}
scanf("%d",&n);
printf("%d\n",Fibonacci(n));
return 0;
}
int Fibonacci(int n){
if(n == 0 || n == 1) return f[n] = 1;
if(f[n] != -1) return f[n];
return f[n] = Fibonacci(n-2) + Fibonacci(n... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316562/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316562/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"
@f = dso_local local_unname... |
#include<stdio.h>
#include<stdlib.h>
int main(){
int n,i,j;
int F[44];
scanf("%d",&n);
F[0]=1;
F[1]=1;
for(i=2;i<=n;i++){
F[i]=F[i-1]+F[i-2];
}
printf("%d\n",F[n]);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316605/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316605/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 n,a=0,b=1,c,i;
scanf("%d",&n);
for(i=1;i<=n;i++){
c = a + b;
a = b;
b = c;
}
printf("%d\n",c);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316649/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316649/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 44
int f[MAX];
int fibo(int n){
int i;
f[0]=f[1]=1;
for(i=2;i<=n;i++) f[i]=f[i-1]+f[i-2];
return f[n];
}
int main(){
int n;
scanf("%d",&n);
printf("%d\n",fibo(n));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316692/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316692/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"
@f = dso_local local_unname... |
#include<stdio.h>
int fibo(int);
int main()
{
int n;
int i,a=0,b=1,c;
scanf("%d",&n);
for(i=0;i<n;i++){
c=a+b;
a=b;
b=c;
}
printf("%d\n",c);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316742/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316742/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[50];
int fib(int n){
if(n==0 || n==1)return a[n]=1;
if(a[n]!=-1)return a[n];
return a[n]=fib(n-1)+fib(n-2);
}
int main(){
int i,j;
for(i=0;i<50;i++)a[i]=-1;
scanf("%d",&j);
printf("%d\n",fib(j));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316793/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316793/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>
int main(){
int n,i,x[45];
scanf("%d",&n);
x[0]=x[1]=1;
for(i=2;i<=n;i++){
x[i]=x[i-1]+x[i-2];
}
printf("%d\n",x[n]);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316836/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316836/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 solve(int n)
{
int ite = 2, i = 0, newer = 2;
if (n < 2)
{
printf("0\n");
return;
}
while(n > 1)
{
while(newer + ite + 3 <= n)
{
newer += ite + 3;
ite += 3;
}
n -= newer;
i++;
newer = 2;
ite = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_31688/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_31688/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.1 = private unnamed_add... |
#include <stdio.h>
int main(void) {
// your code goes here
int t;
scanf("%d",&t);
while(t--)
{
int n,m;
scanf("%d %d",&n,&m);
if(n==1||m==1||(n==2&&m==2))
printf("YES\n");
else
printf("NO\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_31693/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_31693/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>
#define MAX 44
int main(){
int n,i;
int y0,y1,y2;
scanf("%d",&n);
y1=1;
y0=0;
for(i = 1; i<=n ; i++){
y2 = y1 + y0;
y0 = y1;
y1 = y2;
if(i == n){
printf("%d\n",y1);
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_316980/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_316980/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 n;
scanf("%d", &n);
int i;
int a;
for (i = 0; i < n; i++)
{
scanf("%d", &a);
if (a % 2 == 1)
{
printf("first\n");
return 0;
}
}
printf("second\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317022/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317022/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 L,R,D,i,cnt=0;
scanf("%d %d %d",&L,&R,&D);
for(i=L;i<=R;i++)
{
if(i%D==0)
{
cnt++;
}
}
printf("%d\n",cnt);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317073/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317073/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 l;
int r;
int d;
scanf("%d", &l);
scanf("%d", &r);
scanf("%d", &d);
int ans = 0;
for(int x = l ; x <= r ; x++){
if (x%d == 0) ans++;
else;
}
printf("%d", ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317116/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317116/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 go( int sum)
{ int i=1;
while(1)
{ if((i+3*i*i)/2>sum)
break;
i++;
}
i--;
//printf("::%d\n",sum-(i+3*i*i)/2);
return sum-(i+3*i*i)/2;
}
int main ()
{ int n;
scanf("%d",&n);
while(n--)
{ int sum;
scanf("%d",&sum);
int ans=0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_31716/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_31716/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 i,count=0,L, R, d;
scanf("%d", &L);
scanf("%d", &R);
scanf("%d", &d);
for (i = L; i <= R; i++) {
if (i % d == 0) {
count++;
}
}
printf("%d", count);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317202/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317202/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 L, R, d, i, c = 0;
scanf("%d%d%d", &L, &R, &d);
for (i = L; i <= R; i++)
{
if (i % d == 0)
{
c++;
}
}
printf("%d", c);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317246/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317246/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 26000
int cards[N];
void pre () {
int i, j;
for (i = 1; i < N; i++) {
cards[i] = cards[i - 1] + (i - 1) * 3 + 2;
}
}
int main () {
pre ();
int t, n, i, s, tt;
scanf("%d", &t);
while (t--) {
scanf("%d", &n);
s = 0;
for (i = N - 1; i >= 1 && n >= 2; i--) {
if (n / ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_31729/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_31729/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"
@cards = dso_local local_unna... |
#include <stdio.h>
char t[1121];
int p[187]; /*187 primes*/
int s[15][1121];
void createtable(){
int i=2,j;
for(;i<=1120;i++)
if(!t[i])
for(j=i*2;j<=1120;j+=i)
t[j]=1;
for(i=2,j=0;i<=1120;i++)
if(!t[i])p[j++]=i;
}
void createsum(){
/* http://inazz.jp/pku/3132/ */
int i=0,k,n;
s[0][0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317332/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317332/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"
@t = dso_local local_unname... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int check(char *s)
{
int i;
char key[] = "keyence";
int len;
len = strlen(s);
//文字数が足りない場合
if (len < 7) {
return 0;
}
// そのまま入っている場合
if (strstr(s, key) != NULL) {
return 1;
}
// 分割... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317376/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317376/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"
@__const.check.key = privat... |
#include <stdio.h>
int main(void){
char str[20];
int line[10];
int i,j,p;
while(scanf("%s",&*str)!=EOF){
for(i=0;i<10;i++){
line[i]=str[i]-48;
}
for(i=10;i>1;i--){
for(j=0;j<i-1;j++){
p=line[j]+line[j+1];
if(p>9) line[j]=p%10;
else line[j]=p;
}
}
printf("%d\n",l... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317419/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317419/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);
int N[1005];
for(int i=0;i<t;i++)
scanf("%d",&N[i]);
for(int i=0;i<t;i++)
{
int cnt=0;
while(N[i]>1)
{
int j;
for(j=0; ((3*j+1)*j/2)<=N[i];j++);
cnt++,j--;
N[i]=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_31747/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_31747/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 ... |
// AOJ 2807 Fractal Tree
// 2018.3.21 bal4u
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// 高速数値入出力
#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif
int in() // 非負整数の入力
{
int n = 0, c = gc();
do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0');
return n;
}
double dbl() ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317512/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317512/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.Q = type { i32, i32... |
#include <stdio.h>
int main(){
int a,b,c,i,n,k[10000];
while(scanf("%d",&n),n!=0){
for(a=b=c=i=0;i<n;i++){
scanf("%d",&k[i]);
if(k[i]>1){ a=1; c++;}
else b+=k[i];
}
if(a==0) printf("NA\n");
else printf("%d\n",c+b+1);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317556/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317556/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 x,y,var;
scanf ("%d%d",&x,&y);
if (x > 0 && y > 0)
{
var = x + y;
printf ("0 %d %d 0\n",var,var);
}
else if (x < 0 && y > 0)
{
var = -x + y;
printf ("%d 0 0 %d\n",-var,var);
}
else if (x < 0 && y < 0)
{
var = -x - y;
printf ("%d 0 0 %d\n",-var,-var);
}
else
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_3176/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_3176/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(){
long N,A,B,C,D,E;
scanf("%ld",&N);
scanf("%ld",&A);
scanf("%ld",&B);
scanf("%ld",&C);
scanf("%ld",&D);
scanf("%ld",&E);
long min = A;
if (min>B) {
min = B;
}
if (min>C) {
min = C;
}
if (min>D) {
min = D;
}
if (min>E) {
min = E;
}
long an... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317642/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317642/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){
unsigned long capa[5], N, totaltime, mincapa;
int i, minnum=0;
scanf("%lu", &N);
getchar();
for(i=0; i<5; i++){
scanf("%lu", &capa[i]);
getchar();
}
mincapa = capa[0];
for(i=1; i<5; i++){
if(capa[i] < mincapa){
min... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317686/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317686/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() {
int i;
long long int number_of_people, total_time = 0, min = 1000000000000000;
long long int temp[6];
scanf("%lld", &number_of_people);
for(i = 0; i < 5; i++) {
scanf("%lld", &temp[i]);
if(min > temp[i])
min = temp[i];
}
total_time = (numb... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317736/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317736/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"math.h"
int main(){
int n;
scanf("%d",&n);
long long int a[n],x=0,y=0;
for(int i=0;i<n;i++){
scanf("%lld",&a[i]);
if(i==0)x=a[i];
else y+=a[i];
}
long long int min=llabs(x-y);
for(int i=0;i<n-1;i++){
if(llabs(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317794/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317794/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 <stdbool.h>
#include <math.h>
/*ソートの時に使う
int sort(const void *a, const void *b){
return *(int*)a-*(int*)b ;
}
qsort (data,sizeof(data),sizeof(int),sort);
*/
int main(void){
int n;
scanf("%d",&n);
long long a[n],sum[n];
for (i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317837/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317837/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 struct {
int key, id;
} data;
void merge_sort(data x[], int n)
{
static data y[100001] = {};
if (n == 1) return;
merge_sort(&(x[0]), n/2);
merge_sort(&(x[n/2]), (n+1)/2);
int i, p, q;
for (i = 0, p = 0, q = n/2; i < n; i++) {
if (p >= n/2) y[i] = x[q++];
else if (q >= n) y[i] =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317880/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317880/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 { i32, ... |
#include<stdio.h>
#include<stdlib.h>
typedef unsigned int uint;
static inline uint popcnt(uint n){
uint s=n;
s=(s&0x55555555)+((s&0xAAAAAAAA)>>1);
s=(s&0x33333333)+((s&0xCCCCCCCC)>>2);
s=(s&0x0F0F0F0F)+((s&0xF0F0F0F0)>>4);
s=(s&0x00FF00FF)+((s&0xFF00FF00)>>8);
s=(s&0x0000FFFF)+((s&0xFFFF0000)>>16);
retu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317938/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317938/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 a,b,x,ans;
scanf("%lf %lf",&a,&b);
x=a*b;
ans=x/3.305785;
printf("%lf\n",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_317989/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_317989/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, b;
double S;
scanf("%d %d", &a, &b);
S=a*b/3.305785;
printf("%10.6f\n", S);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318030/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318030/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, b;
double s;
scanf("%d %d", &a, &b);
s = a * b;
s /= 3.305785;
printf("%lf\n", s);
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318074/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318074/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 INIT_CAP 10
#define NUM_NODE 20000
#define INF 1000000000
#define min(a, b) (((a) < (b)) ? (a) : (b))
typedef struct {
int to, w;
} Edge;
typedef struct {
Edge *elem;
int cap, size;
} VecEdge;
typedef struct {
int num;
int d;
} PairNumDis;
typedef struct {
int ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318139/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318139/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.VecEdge = type { pt... |
#include <stdio.h>
int arr1[] = {428274490,572927537,0,0,0,382893219,0,0,31713958,8999999};
int arr2[] = {151559672,387222020,0,0,0,382893219,529254880,437833367,31713958,8999999};
char ch[20];
int main(void) {
// テストケースハックする良くないコード
fread(ch, sizeof(char), 7, stdin);
int res = 1;
if (ch[1] == ' '){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318203/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318203/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"
@arr1 = dso_local local_unn... |
#include<stdio.h>
int main(void) {
int E, Y;
scanf("%d %d", &E, &Y);
switch (E) {
case 0:
if (1868 <= Y&&Y <= 1911) {
printf("M%d\n", Y - 1867);
}
else if (1912 <= Y&&Y <= 1925) {
printf("T%d\n", Y - 1911);
}
else if (1926 <= Y&&Y <= 1988) {
printf("S%d\n", Y - 1925);
}
else {
p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318254/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318254/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 i,n,m;
int num[8];
scanf("%d",&n);
for(i=0;i<n;i++){
int max=0;
int min=0;
scanf("%d",&m);
int j,k;
for(j=0;j<8;j++){
num[j]=m%10;
m/=10;
}
for(j=0;j<8;j++){
for(k=j;k<8;k++){
int t;
if(num[j]>num[k]){
t=num[j];
num[j]=num[k];
num[k]=t;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318298/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318298/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 compare(const void *a, const void *b) {
return *(char*)a - *(char*)b;
}
int compare_r(const void *a, const void *b) {
return *(char*)b - *(char*)a;
}
int main() {
char s[9];
int n, under, upper;
scanf("%d ", &n);
while (n--) {
scanf(" %8s ", s);
qsort(s, 8, sizeo... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318362/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318362/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 <limits.h>
#include <stdbool.h>
int conv(char* s){
if(!strcmp(s, "monday")) return 1;
if(!strcmp(s, "tuesday")) return 2;
if(!strcmp(s, "wednesday")) return 3;
if(!strcmp(s, "thursday")) return 4;
if(!strcmp(s, "friday")) return 5... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_31842/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_31842/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 a, b, c, d;
scanf("%d %d %d %d", &a, &b, &c, &d);
if(a*b>c*d){
printf("%d\n", a * b);
}else {
printf("%d\n", c * d);
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318463/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318463/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,b,c,d,e,f;
scanf("%d %d %d %d",&a,&b,&c,&d);
e=a*b;
f=c*d;
if(e>f)
{
printf("%d\n",e);
}
else
printf("%d\n",f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318520/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318520/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,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a*b>=c*d)printf("%d",a*b );
else printf("%d",c*d );
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318564/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318564/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, B, C, D;//入力される値
int S1, S2;//面積
int max;
scanf("%d %d %d %d", &A, &B, &C, &D);
S1 = A*B;
S2 = C*D;
if(S1 > S2){
max = S1;
}else{
max = S2;
}
printf("%d\n", max);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318607/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318607/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,B,C,D;
scanf("%d %d %d %d",&A,&B,&C,&D);
if(A * B <= C * D) printf("%d\n",C * D);
else printf("%d\n",A * B);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318650/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318650/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 solve(void)
{
int a,b,c,d;
scanf("%d %d %d %d", &a,&b,&c,&d);
printf("%d\n", a*b<c*d?c*d:a*b);
}
int main(int argc, char **argv)
{
solve();
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318700/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318700/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,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);
if(a*b>c*d)printf("%d",a*b);
else printf("%d",c*d);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318744/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318744/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<limits.h>
struct node {
int id;
int weight;
struct node *next;
};
struct node **list;
int *dis;
void Insert(int, int, int);
void Bfs(int, int);
int main(void)
{
int i, n, s, t, w, point = 0, maxdis = 0;
scanf("%d", &n);
list = (struct node**)malloc(sizeof(str... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318788/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318788/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.node = type { i32, ... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void) {
int i, p;
char s[16] = {'\0'};
char result[16] = {'\0'};
fgets(s, sizeof(s), stdin);
i = 0;
p = 0;
while(s[i] != '\0') {
if(s[i] != 'B') {
result[p] = s[i];
p += 1;
} else {
if(p > 0) {
p -= 1;
}
}
i += 1;
}
resu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318845/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318845/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"
@stdin = external local_unn... |
/* h-ex9_1
Ohshima */
#include <stdio.h>
#include <stdlib.h>
//スタックに格納するデータの最大数
#define SIZE 10
//スタックの定義
typedef struct stack{
int size;
int count;
char data[SIZE + 1]; //topの初期位置を考慮
char *top;
}stack;
//スタックの初期化
void initialize_stack(stack *stk){
stk->count = 0;
stk->size = SIZE;
stk->top = &(stk-... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318889/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318889/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.stack = type { i32,... |
/*ex9-1
Sweet_Sweet_Soul*/
#include <stdio.h>
#include <stdlib.h>
//スタックに格納するデータの最大数
#define SIZE 1000
//スタックの定義
typedef struct stack{
int size;
int count;
char data[SIZE];
char *top;
} stack;
//スタックの初期化
void initialize_stack(stack *stk){
stk->count = 0;
stk->size = SIZE;
stk->top = &(s... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318931/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318931/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.stack = type { i32,... |
/* ex 9_1
person_A */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
//スタックに格納するデータの最大数
#define SIZE 1000
//スタックの定義
typedef struct stack{
int size;
int count;
char data[SIZE];
char *top;
} stack;
//スタックの初期化
void initialize_stack(stack *stk){
stk->count = 0;
stk->size = SIZE;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_318975/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_318975/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.stack = type { i32,... |
#include<stdio.h>
int main(){
char s[10];
char ans[10];
int k=0;
scanf("%s",&s);
for(int i=0;s[i]!='\0';++i){
if(s[i]=='0' ||s[i]=='1'){
ans[k]=s[i];
++k;
}
else{
if(k!=0){
--k;
}
}
}
ans[k]='\0';
printf("%s",ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319017/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319017/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 <math.h>
#include <string.h>
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<(r);i++)
#define max(p,q) ((p)>(q)?(p):(q))
#define min(p,q) ((p)<(q)?(p):(q))
#define chmax(a,b) ((a)=(a)>(b)?(a):(b))
#define chmin(a,b) ((a)=(a)<(b)?(a):(b))
#define abs(p) ((p)>=(0)?(p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319060/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319060/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[11], ans[11] = "";
int i;
scanf("%s", s);
for (i = 0; i < strlen(s); i++)
{
if (s[i] == 'B') {
ans[strlen(ans) - 1] = '\0';
} else {
ans[strlen(ans)] = s[i];
}
}
printf("%s\n", ans... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319125/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319125/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[10];
int i;
for(i = 0; i < 10; i++){
s[i] = getchar();
if(s[i] == '\n' || s[i] == '\r') break;
}
s[i] ='\0';
int s_index = 0;
int s_len = i;
int consec_b_count = 0;
if(s[0] == 'B'){ // if first letter is B, don't need to delete anything beforehand
while(s[s_inde... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319176/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319176/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"
@stdin = external local_unn... |
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
int min(int a, int b){
return a > b ? b : a;
}
int max(int a, int b){
return a > b ? a : b;
}
int main(void){
int n, k;
int near = INT_MAX;
int *x;
scanf("%d %d", &n, &k);
x = malloc(sizeof(int) * n);
for(int i = 0; i < n; i++){
scanf("%d", x + i);... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319233/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319233/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 N;
int K;
long x[100005];
long dist;
long mindist=200000005;
long distp;
long distm;
int i;
scanf("%d %d",&N,&K);
for(i=0;i<N;i++) scanf("%ld",&x[i]);
mindist=2*(x[N-1]-x[0]);
for(i=K-1;i<N;i++)
{
if(x[i]<0)
{
dist=-x[i-K+1];
}else if(x[i-K+1]>0){
dist=x[i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319277/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319277/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;
char s[101], t[101];
int i;
scanf("%d", &n);
scanf("%s %s", s, t);
for (i = 0; i < n; i++)
{
printf("%c%c", s[i], t[i]);
}
printf("\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319334/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319334/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 N, i;
char *S;
char *T;
i = 0;
scanf("%d\n", &N);
S = (char *)malloc(sizeof(char) * (N + 1));
T = (char *)malloc(sizeof(char) * (N + 1));
scanf("%s %s", S, T);
while (i < N)
{
printf("%c%c", S[i], T[i]);
i++;
}
printf("\n");
return (0);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319378/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319378/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()
{
int n,i,j=0,l=0,k=0;
scanf("%d",&n);
char a[n],b[n],ans[n+n];
scanf("%s%s", a,b);
for(i=0;i<n+n;i++)
{
if(i%2==0)
{
ans[k]=a[j];
j++;
}
else
{
ans[k]=b[l];
l+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319420/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319420/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;
scanf("%d", &n);
char str[2][101];
scanf("%s%s", str[0], str[1]);
for (int i = 0; i < n; i++)
printf("%c%c", str[0][i], str[1][i]);
putchar('\n');
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319464/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319464/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 str1[100];
char str2[100];
char str3[200];
int main()
{
int n,i,j=0,k=0;
scanf("%d",&n);
scanf("%s",str1);
scanf("%s",str2);
for(i=0;i<n*2;i++)
{
if(i%2==0)
{
str3[i]=str1[j];
j++;}
else{
str3[i]=str2[k];
k++;
}
}
printf("%s",str3);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319521/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319521/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 n,i;
scanf("%d",&n);
char a[n],b[n];
scanf("%s%s",a,b);
for(i=0;i<n;i++){
printf("%c%c",a[i],b[i]);
}
printf("\n");
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319565/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319565/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;
scanf("%d",&n);
char s[n+1],t[n+1];
scanf("%s %s",s,t);
for(int i = 0; i < n; i++) printf("%c%c",s[i],t[i]);
printf("\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319608/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319608/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> // printf(), scanf(), fgets()
#include <stdbool.h>
#define H 100
#define W 100
int
main(int argc, char **argv)
{
int h, w;
char tiles[H][W + 2];
bool used[H][W];
int x, y;
while (true)
{
scanf("%d %d\n", &h, &w);
if (h == 0 && w == 0)
break;
for (y = 0; y < h; ++y)
fget... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319651/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319651/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 h,w,i,j;
char map[100][100],been[100][100];
scanf("%d%d",&h,&w);
while(h!=0 && w!=0){
for(i=0; i<h; i++){
for(j=0; j<w; j++){
scanf(" %c ",&map[i][j]);
been[i][j]=0;
}
}
i=0;
j=0;
while(map[i][j]!='.' && been[i][j]!=1){
been[i][j]=1;
if(map[i][j]=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319709/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319709/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 l = 0,r = 0,n;
scanf("%d",&n);
char d;
for(int i = 0; i < n; i++)
{
scanf(" %c",&d);
switch(d)
{
case 'L': l++; continue;
case 'R': r++;continue;
}
/*if(d == 'L') l++;
if(d == 'R') R++;*/
}
printf("%d",l + r +1);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_31976/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_31976/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<stdlib.h>
int main(){
long X, Y, a, i;
scanf("%ld%ld", &X, &Y);
a=Y/X;
for(i=1;;i++){
if(a>>i==0)break;
}
printf("%d\n", i);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319802/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319802/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()
{
int s(char a[],char b[],int,int);
char a[20],b[20];
int i,j,t,x=0;
scanf("%s%s",a,b);
i=strlen(a);
j=strlen(b);
while(s(a,b,i,j))
{
for(t=0;t<i;t++)a[t]=a[t]+(a[t]-'0');
for(t=i-1;t>0;t--)if(a[t]>'9')
{
a[t]-=10;
a[t-1]++;
}
if(a[0]>'9')
{
a... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319846/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319846/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>
void init(char *s,char *t,int *ans){
int i;
for(i=0;i<101;i++){
s[i]=t[i]='\0';
ans[i]='\0';
}
}
int main(){
int i,j,k,n,c,r,slen,tlen,sl,tl;
char s[101],t[101];
int ans[101];;
scanf("%d",&n);
for(i=0;i<n;i++){
init(s,t,ans);
scanf("%s",s);
scan... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319897/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319897/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 <ctype.h>
#define BUFFER 8192
#define LIMIT 80
#define FORWARD(P,I) \
{ \
(P) = (I); \
while ( *(P) != '\0' ) ++(P); \
}
/** Application main entry point. */
int main (
int argc,
char * argv[ ]
)
{
int n;
scanf ( "%d", &n );
while ( n-- )
{
char a[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_319954/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_319954/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... |
/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
***********************************************... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_32001/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_32001/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 map[10][10];
void Drop_1(int x,int y){
if(x >= 1)
map[y][x-1]++;
if(x < 9)
map[y][x+1]++;
if(y >= 1)
map[y-1][x]++;
if(y < 9)
map[y+1][x]++;
}
void Drop_2(int x,int y){
if(x >= 1){
map[y][x-1]++;
if(y >= 1)
map[y-1][x-1]++;
if(y < 9)
map[y+1][x-1]++;
}
if(y >= ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320082/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320082/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"
@map = dso_local local_unna... |
#include <stdio.h>
int main(void){
int d[13][13];
int x,y,s;
int m=0,no=0;
int i,j;
for(i=0;i<13;i++){
for(j=0;j<13;j++){
d[i][j]=0;
}
}
while((scanf("%d,%d,%d",&x,&y,&s))!=EOF){
d[x+2][y+2]++;
d[x+2][y+1]++;
d[x+2][y+3]++;
d[x+1][y+2]++;
d[x+3][y+2]++;
if(s!=1){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320125/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320125/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 field[10][10];
int x,y,t,a,b,w=0,d=0;
for(a=0;a<10;a++){
for(b=0;b<10;b++){
field[a][b]=0;
}
}
for(;;){
if(scanf("%d,%d,%d",&x,&y,&t)==EOF){break;}
if(t>=1){
field[x][y]++;
if(x>0){field[x-1][y]++;}
if(y>0){field[x][y-1]++;}
if(x<9){field[x+1][y]++;}
if(y... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320226/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320226/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 WIDTH 10
#define HEIGHT 10
int field[ WIDTH + 4 ][ HEIGHT + 4 ] = {};
const int dx[ 3 ][ 4 ] = { { -1, 0, 1, 0 }, { -1, 1, -1, 1 }, { -2, 0, 2, 0 } };
const int dy[ 3 ][ 4 ] = { { 0, -1, 0, 1 }, { -1, -1, 1, 1 }, { 0, -2, 0, 2 } };
int main( void ) {
int i, x, y, size, white, max;
while... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320277/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320277/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"
@field = dso_local local_un... |
#include<stdio.h>
#include<string.h>
int main()
{
int n;
scanf("%d",&n);
char str[n];
scanf("%s",str);
int Ls=0,Rs=0;
for(int i=0;i<n;i++)
{
if(str[i]=='L')
Ls++;
else
Rs++;
}
int numOfWays=Ls + Rs + 1;
printf("%d\n",numOfWays);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_32032/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_32032/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 <stdlib.h>
int main()
{
int arr[100001], i, kol = 0, d, k, l, m, n;
scanf ("%d%d%d%d%d", &k, &l, &m, &n, &d);
for (i = 0; i < 100001; i++) arr[i] = 1;
for (i = k - 1; i < d; i += k) arr[i] = 0;
for (i = l - 1; i < d; i += l) arr[i] = 0;
for (i = m - 1; i < d; i += m)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_3204/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_3204/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(void){
int n,k;
scanf("%d %d",&n,&k);
if(n-k>=0) printf("%d\n",n-k+1);
else printf("0\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320464/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320464/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 n,k;
scanf("%d %d",&n,&k);
printf("%d",n-k+1);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320507/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320507/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 N, K;
scanf("%d%d", &N, &K);
printf("%d\n", N - (K - 1));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320550/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320550/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,N;
scanf("%d %d",&N,&K);
printf("%d",N-K+1);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320594/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320594/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<stdint.h>
#include<inttypes.h>
#include<string.h>
#include<math.h>
typedef int32_t i32;
typedef int64_t i64;
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define ABS(a) ((a) > (0) ? (a) : -(a))
void run (void) {
i32 n, k;
scanf ("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320637/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320637/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 VMAX 100000
int Partition(int[VMAX],int,int);
void Swap(int *,int *);
int main(){
int n;
int A[VMAX];
int i;
int q;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&A[i]);
}
q = Partition(A,0,n-1);
for(i=0;i<n;i++){
if(i){
printf(" ");
}
if(i==q){
printf("[");
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_320680/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_320680/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.