Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include<stdio.h>
int main(){
int n,t[100],a,c,i,j,b,m;
while(1){
scanf("%d",&n);
if(!n)break;
int h[201]={0};
for(i=0;i<n;i++){
scanf("%d",&t[i]);
h[t[i]]=1;
for(j=i;j;j--){
if(t[j-1]>t[j]){
m=t[j-1];
t[j-1]=t[j];
t[j]=m;
}
}
}
b=0;
i=0;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110448/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110448/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 c,i;
int lefttime(int x);
int main(){
int N,M; //飯盛山行きのバスはN本 鶴ヶ城行きのバスはM本
int h[101],m[101]; //飯盛山行きh時m分発
int k[101],g[101]; //鶴ヶ城行きk時g分発
for(c=0;c<101;c++){ //エラー防止のために中身を最大値に
h[c]=24;
m[c]=60;
k[c]=24;
g[c]=60;
}
scanf("%d"... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110499/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110499/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"
@c = dso_local local_unname... |
#include <stdio.h>
int main(void)
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(c >= a)
{
if(c <= b) printf("Yes");
else printf("No");
}
else printf("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110541/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110541/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;
scanf("%d%d%d",&a,&b,&c);
if((a<=c)&&(c<=b)){
printf("Yes");
}else{
printf("No");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110585/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110585/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;
scanf("%d %d %d", &a, &b, &c);
if(a<=c&&c<=b)
printf("Yes\n");
else
printf("No\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110628/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110628/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... |
/*
* abc061a_c.c
*
* Created on: 2019/05/08
* Author: ktaka
*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int main(void){
char tango[100],*ch;
int val[10];
int i=0,j=0;
fgets(tango,sizeof(tango),stdin);
//printf("%s\n",tango);
ch = strtok(tango," ");
val[i] = atoi(ch... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110679/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110679/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 <math.h>
#include <stdlib.h>
#define SWAP(type,a,b) { type temp = a; a = b; b = temp; }
int main(void) {
// your code goes here
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(c>=a&&c<=b) printf("Yes\n");
else printf("No\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110729/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110729/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;
scanf("%d %d %d",&a,&b,&c);
if (c>=a && c<=b)
{
printf("Yes\n");
}
else
{
printf("No\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110772/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110772/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;
scanf("%d%d%d",&a,&b,&c);
if(c>=a&&c<=b)printf("Yes\n");
else printf("No\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110822/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110822/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;
scanf("%d%d%d",&a,&b,&c);
if(a<=c&&c<=b)printf("Yes");
else printf("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110866/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110866/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;
scanf("%d%d%d",&a,&b,&c);
if(a<=c&&c<=b){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110909/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110909/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 min(a, b) ((a) < (b) ? (a) : (b))
long long f(long long b, long long n){
long long ret = 0;
while(n){
ret += n % b;
n /= b;
}
return ret;
}
int main(){
long long n, s;
scanf("%lld%lld", &n, &s);
long long ans = -1;
if(n == s) ans = n + 1;
for(long long b = 2; b ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110952/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110952/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(){
char numbers[3000];
char x;
char one[5] = {'.',',','!','?', ' '};
char two[3] = {'a','b','c'};
char three[3] = {'d','e','f'};
char four[3] = {'g','h','i'};
char five[3] = {'j','k','l'};
char six[3] = {'m','n','o'};
char seven[4] = {'p','q','r','s'};
char ei... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111001/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111001/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.main.one = private... |
#include <stdio.h>
#include <string.h>
int main(void) {
int flag,i,j,num,count,maxcount[10]={0,4,2,2,2,2,2,3,2,3};
char key[10][6]={"",".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"},input[1025];
scanf("%d",&num);
for (j=0; j<num; j++) {
scanf(" %s",input);
flag=0,count=0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111052/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111052/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.main.maxcount = pr... |
#include <stdio.h>
int main(void)
{
int a,b,c,n,tmp,i,s;
scanf("%d%d%d%d",&a,&b,&c,&n);
if(a<b) {tmp=a; a=b; b=tmp;}
if(a<c) {tmp=a; a=c; c=tmp;}
for(i=0;i<n;i++)
a=a*2;
s=a+b+c;
printf("%d\n",s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111102/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111102/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;
int K;
int asumisu;
if (scanf("%d%d%d", &A, &B, &C) != 3) return 1;
if (scanf("%d", &K) != 1) return 1;
asumisu = A;
if (asumisu < B) asumisu = B;
if (asumisu < C) asumisu = C;
printf("%d\n", A + B + C + (asumisu << K) - asumisu);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111146/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111146/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);
while(t--)
{
int n, m;
scanf("%d%d", &n, &m);
int pro = m*n;
if(pro % 2 == 0)
printf("%d\n", pro/2);
else
printf("%d\n", (pro/2)+1);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11119/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11119/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<math.h>
int main(){
int a,b,c,d,m=0;
scanf("%d %d %d %d",&a,&b,&c,&d);
if(a>=b&&a>=c) printf("%d",a*(int)pow(2,d)+c+b);
else if(b>=a&&b>=c) printf("%d",b*(int)pow(2,d)+c+a);
else if(c>=b&&c>=a) printf("%d",c*(int)pow(2,d)+a+b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111232/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111232/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)
{
int A,B,C,K;
int ans;
scanf("%d",&A);
scanf("%d",&B);
scanf("%d",&C);
scanf("%d",&K);
ans=pow(2,K)*A+B+C;
if(A+pow(2,K)*B+C>ans) ans= A+pow(2,K)*B+C;
if(A+B+pow(2,K)*C>ans) ans= A+B+pow(2,K)*C;
printf("%d",ans);
return ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111276/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111276/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 <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <stdint.h>
#include <string.h>
int main(void) {
uint32_t a, b, c;
uint32_t k;
uint32_t *max = &a;
scanf("%"PRIu32" %"PRIu32" %"PRIu32"\n%"PRIu32, &a, &b, &c, &k);
if (*max < b) {
max = &b;
}
if (*max < c) {
max = &c... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111326/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111326/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>
typedef long long int lli;
int comp(const void *a, const void *b){
return *(const int *)a-*(const int *)b;
}
void solve(){
lli n, *nums,onground=0,transit=1;
scanf("%lld",&n);
nums=(lli*)malloc(n*sizeof(lli));
for(int i=0;i<n;i++)
scanf("%lld",&n... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11137/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11137/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>
#include<string.h>
#define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};}
//pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define SWAP(type, x, y) do { type tmp =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111412/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111412/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,j,h,w,a,s=0,mi,d[10][10],c[20],u[20]={};
scanf("%d %d",&h,&w);
for(i=0;i<10;i++){
for(j=0;j<10;j++)scanf("%d",&d[i][j]);
c[i]=1e9;
}
c[mi=1]=0;
for(i=0;i<10;i++){
u[mi]=1;
for(j=0;j<10;j++){
if(c[j]>c[mi]+d[j][mi])c[j]=c[mi]+d[j][mi];
}
mi=1;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111463/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111463/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,A,B,C,D,a,b,c;
scanf("%d%d%d%d%d",&L,&A,&B,&C,&D);
a=A/C;
if(A%C!=0){a++;}
b=B/D;
if(B%D!=0){b++;}
if(a>b){
c=L-a;
}else{
c=L-b;
}
printf("%d\n",c);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111506/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111506/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>
// Merges two subarrays of arr[].
// First subarray is arr[l..m]
// Second subarray is arr[m+1..r]
void merge(long arr[], long l, long m, long r)
{
long i, j, k;
long n1 = m - l + 1;
long n2 = r - m;
/* create temp arrays */
long L[n1], R[n2];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11155/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11155/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,j,k,L,A,B,C,D,max;
scanf("%d",&L);
scanf("%d",&A);
scanf("%d",&B);
scanf("%d",&C);
scanf("%d",&D);
max=(A/C >= B/D)?A/C : B/D;
if(A/C >= B/D){
if(A%C>0){
max+=1;
}
}
else if(A/C < B/D){
if(B%D>0){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111593/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111593/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 n,a,b;
char s[100];
while(scanf("%lld %lld %lld",&n,&a,&b),n){
a--;
b--;
s[n]=0;
while(n--){
s[n]=(a%2==b%2)?'L':'R';
a=(a<(1LL<<n))?(1LL<<n)-a-1:a-(1LL<<n);
b/=2;
}
printf("%s\n",s);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111665/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111665/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,a,b,c,d,ans;
while(scanf("%d",&n)!=EOF){
ans=0;
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n){
ans++;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111708/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111708/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,b,c,d;
int i;
while(scanf("%d",&n)!=EOF){
i=0;
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n){
i++;
}
}
}
}
}
printf("%d\n",i);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111751/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111751/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... |
//Sum of Integers
#include<stdio.h>
#define MAX_N 10
int main(void){
int i, j, k, l;
int n;
while(scanf("%d", &n) != EOF){
int count = 0;
//??¨??¢?´¢
for(i = 0; i < MAX_N; i++)
for(j = 0; j < MAX_N; j++)
for(k = 0; k < MAX_N; k++)
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111801/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111801/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,calc,cnt,i,j,k,l;
while (scanf("%d", &n) != EOF) {
cnt = 0;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (i + j + k + l == n) {
cnt++;
}
}
}
}
}
printf("%d\n", cnt... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111845/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111845/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 0008
#include <stdio.h>
int c;
void combination(int n, int depth)
{
int i;
if (n < 0){
return;
}
if (depth == 1){
if (n <= 9){
c++;
}
return;
}
for (i = 0; i <= 9; i++){
combination(n - i, depth - 1);
}
}
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111960/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111960/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"
@c = dso_local local_unname... |
#include<stdio.h>
int main(void){
int a,b,c,d,n,r;
while(scanf("%d",&n)!=EOF){
r=0;
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n)
r++;
}
}
}
}
printf("%d\n",r);
}
return(0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112017/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112017/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 m;
int a,b,c,d;
int result;
while(scanf("%d",&n)!=EOF){
result = 0;
if(n>36){
printf("0\n");
}else{
if(n>9){
m = 10;
}else{
m = n+1;
}
for(a=0;a<m;a++){
for(b=0;b<m;b++){
for(c=0;c<m;c++){
for(d=0;d<m;d++){
if(a+b+c+d==n){... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112060/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112060/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, n, cnt;
while ( scanf("%d", &n) != EOF )
{
cnt = 0;
for (a = 0; a <= 9; a++)
{
for (b = 0; b <= 9; b++)
{
for (c = 0; c <= 9; c++)
{
for (d = 0; d <= 9; d++)
{
if(a+b+c+d == n)
{
cnt++;
}
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112103/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112103/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,a,b,c,d,cnt;
while(scanf("%d",&x)==1){
cnt=0;
for(a=0;a<=9;a++){
for(b=0;b<=9;b++){
for(c=0;c<=9;c++){
for(d=0;d<=9;d++)
if((a+b+c+d==x))
cnt++;
}
}
}
printf("%d\n",cnt);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112147/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112147/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, a, b, c, d;
int count;
while (scanf("%d", &n) != EOF) {
count = 0;
if (n > 36) {
printf("%d\n", count);
} else {
for(a = 0 ; a <= 9 ; a++)
for(b = 0 ; b <= 9 ; b++)
for(c = 0 ; c <= 9 ; c++)
for(d = 0 ; d <= 9 ; d++)
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112190/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112190/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
#include<stdio.h>
int sum2(int);
int sum3(int);
int sum2(int n){
if(n >= 0 && n <= 18){
if(n <= 9)
return n+1;
else
return 19-n;
}
else
return 0;
}
int sum3(int n){
int i;
if(n >= 0 && n <= 27){
int ans = 0;
for(i=0; i<=9; i++){
if(i <= n)
ans += sum2(n-i);
}
return ans;
}
e... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112233/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112233/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, n, count;
while(scanf("%d", &n)!=EOF){
count = 0;
for(a=0; a<=9; a++){
for(b=0; b<=9; b++){
for(c=0; c<=9; c++){
for(d=0; d<=9; d++){
if(a+b+c+d == n){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112284/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112284/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);
if (N%2){
printf("%d", N/2+1);
} else {
printf("%d", N/2);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112327/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112327/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);
if(N%2==0)printf("%d",N/2);
else printf("%d",N/2+1);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112370/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112370/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);
if(n % 2 == 1)
printf("%d\n",(n+1)/2);
else
printf("%d\n",n/2);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112413/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112413/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 <stdbool.h>
#pragma warning(disable : 4996) //_CRT_SECURE_NO_WARNINGS
int main(void) {
int N;
scanf("%d", &N);
printf("%d", (N / 2) + (N % 2));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112457/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112457/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){
int testcases = 0;
scanf("%d ", &testcases);
int m = 0, n= 0, out = 0;
int i=0;
for(i=0;i<testcases;i++){
scanf("%d %d" ,&m,&n);
out = m*floor(n/2.0);
out += (n%2==1)?(ceil(m/2.0)):0;
printf("%d\n", out);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11250/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11250/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;
scanf("%d",&N);
printf("%d",(N/2)+N%2);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112543/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112543/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);
printf("%d",N/2 +N%2);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112587/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112587/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);
if (n%2==0){
printf("%d\n",n/2);
}
else {
printf("%d\n",n/2+1);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112637/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112637/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()
{
int N,num=0;
scanf("%d",&N);
if(N%2==1)
{
num=num+1;
}
num=num+N/2;
printf("%d",num);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112680/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112680/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,n1;
scanf("%d",&N);
if(N%2==0){
n1=N/2;
}
else{
n1=N/2+1;
}
printf("%d",n1);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112723/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112723/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);
if(n%2 == 0){
printf("%d", n / 2);
return 0;
}else{
printf("%d", n / 2 + 1);
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112767/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112767/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, k;
int i, j, l;
char a[302][302];
for (; t > 0; t--)
{
scanf("%d %d", &n, &k);
if (k % n > 0)
printf("2\n");
else
printf("0\n");
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
a[i][j] = '0';
for (i = 0; i < n; i++)
a[i][n] =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11281/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11281/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 N 1000
#define X(i) (x[(i)] - '0')
int main (void){
char x[N+1];
int i,sum;
while(scanf("%s",x),sum=0,X(0)){
for(i=0;x[i]!='\0';i++){
sum+=X(i);
}
printf("%d\n",sum);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112853/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112853/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 i, tmp=0, x=0;
int n[1001];
char num[1001];
while(1){
scanf("%s",num);
if(!strcmp(num,"0")){
break;
}else{
for(i=0;i<strlen(num);++i){
n[i] = num[i]-'0';
x += n[i];
}
}
printf("%d\n",x);
x = 0;
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112897/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112897/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) {
char str[1001];
int i, sum;
while(1) {
sum = 0;
scanf("%s", str);
if(str[0] == '0') break;
for(i = 0; str[i] != '\0'; i++) {
sum += str[i] - '0';
}
printf("%d\n", sum);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112947/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112947/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 sum,cnt=0;
char c[1005];
while(1){
scanf("%s",c);
if(c[0]=='0') break;
for(;c[cnt]!='\0';cnt++) sum+=c[cnt]-'0';
printf("%d\n",sum);
cnt=0;sum=0;
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112990/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112990/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[200001];
scanf("%s", s);
int length = strlen(s);
long white = 0;
long score = 0;
for (int i = 0; i < length; i++) {
if (s[i] == 'W') {
white++;
score += i;
}
}
white = white*(white-1)/2;
printf("%ld\n", score-white);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113054/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113054/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[200010];
long long int ans = 0, cnt = 0;
scanf("%s",s);
for(long long int i = 0; s[i] != '\0' ; i++)
{
if(s[i] == 'W'){
cnt++;
ans += i;
}
}
for(long long int i = 0; i < cnt; i++)
{
ans -= i;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113098/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113098/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(){
int n;
scanf("%d", &n);
char a[n+1][3];
char b[n+1][3];
char c[n+1][3];
getchar();
for(int i = 0; i < n; i++){
scanf("%s", a[i]);
strcpy(b[i], a[i]);
strcpy(c[i], a[i]);
}
for(int i = 0; i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113148/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113148/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 {
char suit;
int value;
} Card ;
void swap_Card(Card *x, Card *y)
{
Card temp = *x;
*x = *y;
*y = temp;
}
int main()
{
int N;
scanf("%d\n", &N);
int i,j;
Card BC[36];
Card SC[36];
for (i = 0; i < N; i++) {
Card c;
scanf("%c", &c.suit);
scanf("%d ", &c.... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113191/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113191/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.Card = type { i8, i... |
#include<stdio.h>
#include<string.h>
typedef struct{
int value;
char pattern;
}Card;
void BubbleSort(Card *, int);
void SelectionSort(Card *, int);
int main(void){
int n,i,flagb=1,flags=1;
Card cb[36],cs[36];
char tmp;
scanf("%d%c",&n,&tmp);
for(i = 0 ; i < n ; i++)
scanf("%c%d%c",&cb[i].pattern... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113234/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113234/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.Card = type { i32, ... |
#include<stdio.h>
#include<stdlib.h>
#define CARD_NUM 36
typedef struct {
int value;
char mark;
} card ;
void print_card(int N,card *card){
int i;
for(i = 0;i < N-1;i++){
printf("%c",card[i].mark);
printf("%d ",card[i].value);
}
printf("%c",card[N-1].mark);
printf("%d\n",card[N-1].value);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113278/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113278/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.card = type { i32, ... |
#include<stdio.h>
#define N 101
struct card{
char suit;
char value;
};
int main()
{
struct card C1[N],C2[N],C;
int i,j,n,min,flag=0;
char cha;
scanf("%d%c",&n,&cha);
for(i=0;i<n;i++){
scanf("%c%c%c",&C1[i].suit,&C1[i].value,&cha);
}
for(i=0;i<n;i++){
C2[i]=C1[i];
}
for(i=0;i<=n-1;i++){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113320/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113320/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.card = type { i8, i... |
#include <stdio.h>
void BubbleSort(int);
void SelectionSort(int);
typedef struct{
char mark;
int number;
} card;
card Bubble[100];
card Select[100];
card in[100];
int main()
{
int i,j,N,flag = 0,a,b;
char n;
scanf("%d ",&N);
for(i = 0;i < N;i++){
scanf("%c",&in[i].mark);
scanf("%d",&in[i].numb... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113364/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113364/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.card = type { i8, i... |
#include <stdio.h>
#include <string.h>
#define N 36
int isStable(char in[N][2],char out[N][2],int n);
int main(){
int i,n,j,min;
char a[N][2],b[N][2],c[N][2],change[3];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s",a[i]);
strncpy(b[i],a[i],2);
strncpy(c[i],a[i],2);
}
for(i=0;i<n;i++){
for... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113414/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113414/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>
struct C {
char a;
int b;
};
int N;
int isStable(struct C b[], struct C s[]){
int i;
for(i = 0; i < N; i++){
if(b[i].a != s[i].a) return 0;
}
return 1;
}
void BubbleSort(struct C c[]){ //??????
int i, j;
struct C k;
for(i = 0; i < N; i++){
for(j = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113458/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113458/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.C = type { i8, i32 ... |
#include<stdio.h>
struct Card{
char suit;
char value;
};
int main(){
struct Card C1[101], C2[101],CC;
int n, i,j,mini,flag=0;
char ch;
scanf("%d%c", &n, &ch);
for ( i = 0; i < n; i++ ){
scanf("%c%c%c", &C1[i].suit, &C1[i].value, &ch);
}
for(i=0;i<n;i++) C2[i]=C1[i];
//BubbleSort
for(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113508/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113508/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.Card = type { i8, i... |
#include<stdio.h>
typedef struct Card{
char name;
int number;
}card;
void bubbleSort(card [],int);
void selection(card [],int);
void phyouzi(card [],int);
int isStable(card [],card [],int);
int main(){
card c1[100],c2[100];
int i,n;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf(" %c%d",&c1[i].name,&c1[i]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113601/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113601/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.Card = type { i8, i... |
#include<stdio.h>
//Card's struct
typedef struct{
char c;
int n;
}Card;
int main()
{
int N;
Card card1[36], card2[36], card3[36];
Card copy;
char c;
int mini;
int i, j, k;
//Read N and Cards
scanf("%d\n", &N);
for(i=0; i<N; i++)
{
scanf("%c%d", &card1[i].c, &card1[i].n);
//this... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113645/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113645/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.Card = type { i8, i... |
#include<stdio.h>
#define N 36
struct Card{
char suit;
char value;
};
void BubbleSort(struct Card * ,int);
void SelectionSort(struct Card * ,int);
void HKK();
int main(){
struct Card C1[101], C2[101],trnp[N];
int n, i,hantei=0;
char ch;
scanf("%d%c", &n, &ch);
for ( i = 0; i < n; i++ ){
scanf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113696/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113696/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.Card = type { i8, i... |
#include <stdio.h>
typedef struct { char suit, value; } Card;
void bubble(Card A[], int N) {
int i,j;
Card t;
for(i = 0; i<N; i++) {
for(j = N-1; j >= i; j--) {
if(A[j].value < A[j-1].value) {
t = A[j]; A[j] = A[j-1]; A[j-1] = t;
}
}
}
}
void selection(Card A[], int N) {
int i,j... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113746/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113746/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.Card = type { i8, i... |
#include<stdio.h>
int main()
{
long long int t,n,r,i;
scanf("%lld",&t);
for(i=1;i<=t;i=i+1)
{
scanf("%lld %lld",&n,&r);
long long int p;
if(n>r)
{
p=(r*(r+1))/2;
printf("%lld\n",p);
}
else
{
p=(n*(n-1))/2;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11379/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11379/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>
typedef struct{
char suit;
int value;
}Card;
void bubble(Card A[], int N){
int i,j;
Card t;
for(i=0;i<N;i++){
for(j=N-1;j>i;j--){
if(A[j].value<A[j-1].value){
t = A[j];
A[j] = A[j-1];
A[j-1] = t;
}
}
}
}
void selection(Card A[], int N){
int i,minj,j;
Card t;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113832/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113832/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.Card = type { i8, i... |
#include<stdio.h>
int main(){
char cm[36],sm[36],a,e[3];
int n,i,j,c,m,d,f=0;
int cn[36],sn[36];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s",e);
cm[i] = e[0];
cn[i] = e[1] - '0';
}
for(i=0;i<n;i++){
sn[i]=cn[i];
sm[i]=cm[i];
}
for(i=0;i<n;i++){
for(j=n-1;j>i;j--){
if(c... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113876/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113876/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 36
typedef struct{
char gara[N];
int num[N];
}Trump;
Trump bubble(Trump, int);
Trump select(Trump,int);
int main(){
int n = 0, flag = 0;
int i = 0;
Trump tru, tru2, tru3;
scanf("%d",&n);
for(i = 0; i < n; i++){/*scan*/
scanf(" %c%d",&tru.gara[i],&tru.num[i]);
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113919/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113919/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.Trump = type { [36 ... |
#include<stdio.h>
#include<stdlib.h>
void bubble(int *a,char *b,int n){
int x,flag=1;
char y;
while(flag!=0){
flag=0;
for(int i=n-1;i>0;i--){
if(a[i]<a[i-1]){
x=a[i];
y=b[i];
a[i]=a[i-1];
b[i]=b[i-1];
a[i-1]=x;
b[i-1]=y;
flag=1;
}
}
}
//出力
for(int i=0;i<n;i++){
printf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113962/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113962/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 { char suit, value; } Card;
void bubble(Card A[], int N) {
int i,j;
Card t;
for(i = 0; i<N; i++) {
for(j = N-1; j >= i + 1; j--) {
if(A[j].value < A[j-1].value) {
t = A[j]; A[j] = A[j-1]; A[j-1] = t;
}
}
}
}
void selection(Card A[], int N) {
int... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114004/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114004/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.Card = type { i8, i... |
/* トランプのカードをソートするプログラム
4つの絵柄(S,H,C,D)と1-9までの数字を組み合わせた36枚の
カードを使う。
N枚のカードを昇順に並び替える。
その際、バブルソートと選択ソートのアルゴリズム2つを使う。
更にそれらのソートの出力が安定的であるかどうか出力する。
入力:
一行目にカードの枚数N
二行目に絵柄と数字与えられる。隣り合うカードはひとつの空白が与えられる。
出力:
一行目にバブルソートの結果
二行目に出力が安定であるかどうか出力(Stable か Not stable)
三行目に選択ソートの結果
四行目に出力が安定的であ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114048/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114048/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.card = type { i8, i... |
#include <stdio.h>
struct Card {
char suit, value;
};
void swap(struct Card *A , int a, int b )
{
struct Card temp ;
temp = A[a] ;
A[a] = A[b] ;
A[b] = temp ;
}
void bubble(struct Card *A, int N){
int i,j;
for(i=0; i<N; i++){
for(j=N-1;j>=i;j--){
if(A[j].value<A[j-1].value){... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114091/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114091/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.Card = type { i8, i... |
#include <stdio.h>
#include <string.h>
int dict[128][128];
int sort_bub[36][2];
int sort_sel[36][2];
void selection_sort(int arr[][2], int len)
{
int tmp[2];
for (int i = 0; i < len; i++)
{
int min = i;
for (int j = i+1; j < len; j++)
{
if (arr[min][1] > arr[j][1])
{
min = j;
}
}
if (i != min... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114134/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114134/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>
struct card {
char color;
int value;
};
int getNumberOfCards();
struct card* creatDeckThroughNumberOfCards(int numberOfCards);
void printCard(struct card* deck, int numberOfCards);
void copyDeck(struct card* source, struct card* target, int numberOfCards);
void swapCard(struct... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114178/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114178/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.card = type { i8, i... |
#include<stdio.h>
#include<string.h>
#define N 36
typedef struct{
char mark;
int value;
}Card;
void BubbleSort(Card *, int);
void SelectionSort(Card *,int);
void print(Card *,int);
int judge(Card *, Card *, int);
int main()
{
Card c1[N+1], c2[N+1];
int i, n;
scanf("%d", &n);
for(i=0;i< n;i++){
sca... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114220/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114220/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.Card = type { i8, i... |
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#define P 1000000007
int comp(const void *a, const void *b){return *(int*)a-*(int*)b;}
int main(void){
int n, m;
scanf("%d%d", &n, &m);
int ans = (m*1900 + (n-m)*100)*(1<<m);
p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114293/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114293/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 X,Y,i,d=1;
scanf("%d %d",&X,&Y);
for(i=1;i<=Y;i++) d=d*2;
printf("%d\n",(100*X+1800*Y)*d);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114343/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114343/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 gcd(int a, int b)
{
if (a > b) {
a += b;
b = a - b;
a -= b;
}
if (b % a == 0) return a;
else return gcd(b % a, a);
}
int main()
{
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
int g = gcd(A, B);
if (C % g == 0) printf("YES\n");
else printf("NO\n");
fflush(stdout);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114400/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114400/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,cnt;
scanf("%d %d %d", &a, &b, &c);
for(int i=1; i<=b; i++){
if(c==(a*i)%b)
cnt++;
}
if(cnt!=0){
printf("YES\n");
}
else{
printf("NO\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114444/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114444/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,i,flag = 0;
scanf("%d %d %d",&a,&b,&c);
for(i = 1;i <= 100;i++)
{
if((c % b) == (a * i) % b)
{
flag = 1;
break;
}
}
if(flag == 0)
printf("NO\n");
else
printf("YES\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114488/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114488/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 a,b,c;
scanf("%d%d%d",&a,&b,&c);
int mod = c%b;
int i;
for(i = 1; i <= 1000; i++){
if(mod==a*i%b){
printf("YES\n");
return 0;
}
}
printf("NO\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114538/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114538/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 b;
int c;
int i;
int x=0;
long z=0;
scanf("%d%d%d",&a,&b,&c);
for(i=1;i<100;i++){
z=a*i;
//printf("%d\n",z);
if(z%b==c){
printf("YES\n");
x++;
break;
}
}
if(x==0){
printf("NO\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114581/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114581/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 NUMBER 100
void print_array(int array[],int num){
int i;
for(i = 0; i < num - 1; i++)
printf("%d ", array[i]);
//スペースを出力したくないので最後の要素だけfor文外で出力
printf("%d\n", array[i]);
}
void insertionSort(int array[],int num){
int i, j, v;
for(i = 1; i <= num - 1 ; i++){
v = array[i];
j = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114624/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114624/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 trace(int A[],int N){
int i;
for(i=0;i<N;i++){
if(i>0){
printf(" ");
}
printf("%d",A[i]);
}
printf("\n");
}
void insertionSort(int A[], int N){
int i,j,v;
for(i=1;i<N;i++){
v=A[i];
j=i-1;
while(j>=0 && A[j] > v... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114668/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114668/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_a... |
#include <stdio.h>
int main(void){
int n,a[101],i,j,key,k;
scanf("%d",&n);
for (i=0; i<n; i++)
scanf("%d",&a[i]);
for (k=0; k<n; k++){
printf("%d",a[k]);
if(k==n-1)
break;
printf(" ");
}
printf("\n");
for (i=1; i<n; i++) {
key=a[i];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114710/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114710/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[100],n,i,j,v;
scanf("%d",&n);
for (i=1;i<n+1;i++){
scanf("%d",&a[i]);
if(i!=n) printf("%d ",a[i]);
else printf("%d",a[i]);
}
printf("\n");
for (j=2;j<=n;j++){
v=a[j];
i=j-1;
while ( i>0 && a[i]>v){
a[i+1] = a[i];
i--;
}
a[i+1] = v;
fo... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114761/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114761/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 i, j, v, k;
int A[100];
scanf("%d", &N);
for(i = 0; i < N; i++){
scanf("%d", &A[i]);
}
for(k = 0; k < N - 1; k++){
printf("%d ", A[k]);
}
printf("%d\n", A[N - 1]);
for(i = 1; i < N; i++){
v = A[i];
j = i - 1;
while(j >= 0 && A[j] > v){
A[j + 1] =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114826/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114826/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,count,n,A,B;
scanf("%d\n",&t);
for(count=0;count<t;count++){
scanf("%d\n",&n);
if(n%2==0){
A=n/2;
printf("%d\n",A);
}
if(n%2!=0){
B=(n/2)+1;
printf("%d\n",B);}
}
return 0;}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11487/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11487/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()
{
long long int t,i;
scanf("%lld",&t);
for(i=1;i<=t;i++)
{
long long int n;
scanf("%lld",&n);
if(n%2==0)
{
printf("%lld\n",n/2);
}
else if(n%2!=0)
{
printf("%lld\n",(n/2)+(n%2));
}
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11492/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11492/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, tmp, i, j ,k;
//Input
scanf("%d",&n);
int a[100];
for( i = 1; i <= n; i++)scanf("%d",&a[i]);
//Algo
for( i = 1; i <= n; i++){
tmp = a[i];
j = i-1;
while( j > 0 && a[j] > tmp){
a[j+1] = a[j];
j--;
}
a[j+1] = tmp;
//Prin... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114963/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114963/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,j,i,k,v;
int A[1000];
scanf("%d",&n);
for(j=0;j<n;j++){
scanf("%d",&A[j]);
}
for(i=1;i<=n-1;i++){
for(k=0;k<n-1;k++){
printf("%d ",A[k]);
}
printf("%d",A[n-1]);
printf("\n");
//
v=A[i];
j=i-1;
while(j>=0 && A[j]>v){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_115005/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_115005/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;
int A[1000];
int insertion(int a[], int b);
int print(int d[], int c);
int main(){
int i = 0;
scanf("%d", &N);
for (i = 0; i < N; i++){
scanf("%d", &A[i]);
}
print(A, N);
insertion(A, N);
}
int insertion(int a[], int b){
int v;
int i;
int j;
for (i = 1; i <= N - 1; i+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_115049/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_115049/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 trace(int A[], int N)
{
int i;
for(i=0; i<N; i++) {
if(i>0) printf(" ");
printf("%d", A[i]);
}
printf("\n");
}
void insertionSort(int A[], int N)
{
int j, i, v;
for (i=1; i<N; i++) {
v = A[i];
j = i-1;
while (j>=0 && A[j]>v) {
A[j+1] = A[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_115092/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_115092/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_a... |
#include <stdio.h>
#define SIZE 100
int main(void){
int array[SIZE], *p, i, j, work, index, N;
char str[6];
fscanf(stdin, "%d", &N);
p = array;
while (p < (array + N)) fscanf(stdin, "%d", p++);
// output stdout
p = array;
while (p < array +N -1) fprintf(stdout, "%d ", *p++);
fprintf(stdout, "%d\n", *p);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_115135/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_115135/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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.