Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(void){ int n; scanf("%d",&n); printf("%d\n",n*n*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_109667/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_109667/source.c" target datalayout = "e-m:e-p270: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; scanf("%d", &x); printf("%d\n",x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_109717/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_109717/source.c" target datalayout = "e-m:e-p270: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; scanf("%d",&x); x=x*x*x; printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_109760/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_109760/source.c" target datalayout = "e-m:e-p270: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; scanf("%d", &x); printf("%d\n",x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_109803/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_109803/source.c" target datalayout = "e-m:e-p270: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; int y; scanf("%d", &x); y=x*x*x; printf("%d\n", y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_109847/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_109847/source.c" target datalayout = "e-m:e-p270: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(void) { int x; //printf("x:\n"); scanf("%d", &x); // if (1 <= x && x <= 100) printf("%d\n", x * x * x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_109890/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_109890/source.c" target datalayout = "e-m:e-p270: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; scanf("%d", &x); printf("%d\n", x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_109940/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_109940/source.c" target datalayout = "e-m:e-p270: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; scanf("%d", &x); printf("%d\n", x*x*x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_109984/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_109984/source.c" target datalayout = "e-m:e-p270: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; scanf("%d", &x); printf("%d\n",x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110025/source.c" target datalayout = "e-m:e-p270: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; scanf("%d", &x); printf("%d\n", x * x * x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110069/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110069/source.c" target datalayout = "e-m:e-p270: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; scanf("%d",&X); X = X*X*X; printf("%d\n",X); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110111/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110111/source.c" target datalayout = "e-m:e-p270: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, result; scanf("%d", &x); printf("%d\n", (x * x * x)); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110155/source.c" target datalayout = "e-m:e-p270: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> #define ll long long int #define lim 100010 int MIN(int x, int y){return x<y?x:y;} int compare_longlong(const void *a, const void *b) {long long *A = (long long *)a;long long *B = (long long *)b;if (*A > *B) return 1;if (*A < *B) return -1;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110199/source.c" target datalayout = "e-m:e-p270: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.point = type { i32,...
#include<stdio.h> #include<math.h> int main(){ int n,a,t=0,i=0; scanf("%d",&n); for(;i<n;i++){ scanf("%d",&a); t+=1-a%2; } printf("%.f",pow(3,n)-pow(2,t)); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110256/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110256/source.c" target datalayout = "e-m:e-p270: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; scanf("%d",&n); int arr[n],a; int x=0,j=n-1; for(int i=0;i<n;i++) { scanf("%d",&a); if(a%2==0) arr[j--]=a; else a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1103/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1103/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include <stdio.h> #include <math.h> int main(void) { double x; double y; double angle; int kazu; int i; while(1) { scanf("%d",&kazu); if(kazu==-1)break; x=1; y=0; for(i=1;i<kazu;i++) { angle=atan2(y,x); x-=sin(angle); y+=cos(angle); } printf("%f\n%f\n",x,y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110357/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110357/source.c" target datalayout = "e-m:e-p270: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 <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_CHAR_CNT 26 // 文字種類数 // 内部変数 static FILE *szpFpI; // 入力 static char sc1Str[D_CHAR_CNT + 5]; // 文字列 static int si1Char[D_CHAR_CNT]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110421/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110421/source.c" target datalayout = "e-m:e-p270: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; char cards[201]; int n; int k; int turn; int rem[2]; while(1){ scanf("%d\n",&n); if(!n)break; for(i=0;i<=200;i++){ cards[i]=9; } for(i=1;i<=2*n;i++){ cards[i]=1; } for(i=1;i<=n;i++){ scanf("%d\n",&k); cards[k]=0; } //start turn=0; rem[0]=n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110472/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110472/source.c" target datalayout = "e-m:e-p270: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 time[24][60]; int main(void) { int i,j,h,m,f; for(i=0; i<2; ++i) { scanf("%d",&j); for(;j>0;--j) { scanf("%d %d",&h,&m); time[h][m]=1; } } f=1; for(i=0;i<24;i++) for(j=0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110515/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110515/source.c" target datalayout = "e-m:e-p270: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_110566/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110566/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { int a,b,c; while(~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_110616/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110616/source.c" target datalayout = "e-m:e-p270: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 x , y ,z ; scanf("%d%d%d",&x , &y , &z); if(z>=x && z<=y){ printf("Yes"); }else{ printf("No"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110667/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110667/source.c" target datalayout = "e-m:e-p270: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 cmp(const void *a,const void *b) { int A=*(int *)a; int B=*(int *)b; if(A<B) return -1; else if(A==B) return 0; return 1; } int main() { int n,sumB,sumW; int p[101]; scanf("%d",&n); for(int i=0;i<n/2;i++) scanf("%d",&p[i]); qsort(p,n/2,sizeof(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11071/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11071/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a <= c && b >= c) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110753/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110753/source.c" target datalayout = "e-m:e-p270: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\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110797/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110797/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #include <stdlib.h> #define ll long long int main() { int t; scanf("%d",&t); for(int i = 0;i<t;i++) { int n,m; scanf("%d %d",&n,&m); ll ans; ans = n*m +1; ans/=2; printf("%lld\n",ans);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11084/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11084/source.c" target datalayout = "e-m:e-p270: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; scanf("%d %d %d",&a,&b,&c); if((c>=a)&&(c<=b)){ printf("Yes"); } else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110883/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110883/source.c" target datalayout = "e-m:e-p270: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",&a); scanf("%d",&b); scanf("%d",&c); if(a <= c && b >= c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110933/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110933/source.c" target datalayout = "e-m:e-p270: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> #define graph_valtype int #define heap_valtype pair #define inf (1e18) typedef struct { int v_num; double dis; }pair; int compare(heap_valtype a, heap_valtype b){ if(a.dis < b.dis){ return -1; } else if(a.dis == b.dis){ return 0; } else{ return 1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_110977/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_110977/source.c" target datalayout = "e-m:e-p270: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.graph = type { i32,...
#include<stdio.h> int main(void){ char str[1024]; int n; int i,j; int count = 0; int tmp = -1; scanf("%d",&n); for(i = 0;i < n;i++){ scanf("%s",str); j = 0; while(str[j] != '\0'){ if(str[j] == '0'){ if(tmp == 49){ if(count % 5 == 0){ printf(" "); count = 0; j++; tmp = -1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111019/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111019/source.c" target datalayout = "e-m:e-p270: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, A, B, C, K; scanf("%d %d %d", &A, &B, &C); scanf("%d", &K); if (A >= B && A >= C) for (i = 1; i <= K; i++) A *= 2; else if (B >= A && B >= C) for (i = 1; i <= K; i++) B *= 2; else for (i = 1; i <= K; i++) C *= 2; printf("%d\n", A + B + C); fflush(stdout); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111077/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111077/source.c" target datalayout = "e-m:e-p270: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; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); scanf("%d", &k); if((a > b && a > c)){ a = a*pow(2, k); } else if (b > c){ b = b*pow(2, k); } else { c = c*pow(2, k); } printf("%d", a+b+c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111127/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111127/source.c" target datalayout = "e-m:e-p270: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 desc(const void *a, const void *b) { return *(int *)b - *(int *)a; } int main() { int number_k; int number[3]; scanf("%d %d %d", &number[0], &number[1], &number[2]); qsort(number, 3, sizeof(int), desc); scanf("%d", &number_k); printf("%d\n", (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111170/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111170/source.c" target datalayout = "e-m:e-p270: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> #include <math.h> int max(int x, int y) { if (x>=y) return x; else return y; } int main() { int a, b, c, k; scanf("%d%d%d", &a, &b, &c); scanf("%d", &k); int maxm = 0; maxm = max(a, max(b,c)); int tmp = max...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111213/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111213/source.c" target datalayout = "e-m:e-p270: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[3]; int max() { if (n[0] >= n[1] && n[0] >= n[2]) return 0; else if (n[1] >= n[2]) return 1; else return 2; } int main(void) { int k; for (int i = 0; i < 3; i++) { scanf("%d", &n[i]); } scanf("%d", &k); for (int i = 0; i < k; i++) { n[max()] = 2*n[max()]; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111257/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111257/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global [3 x ...
#include<stdio.h> int main(){ int a,b,c; int a2,b2,c2; int k; int i=0; int max=0; scanf("%d %d %d",&a,&b,&c); scanf("%d",&k); a2=a; for(i=k;i>0;i--){ a2=a2*2; } max=a2+b+c; b2=b; for(i=k;i>0;i--){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111307/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111307/source.c" target datalayout = "e-m:e-p270: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,n,m,in,inmax,flag,i; scanf("%d",&n); scanf("%d",&m); in = m; inmax = m; flag = 0; for(i=0;i<n;i++) { scanf("%d %d",&a,&b); in = in + a - b; if(in > inmax ) inmax = in; if(in < 0) flag = 1; } if(flag == 0) printf("%d\n",inmax); else pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111350/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111350/source.c" target datalayout = "e-m:e-p270: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 INF 1001001001 typedef long long ll; int min(int x, int y) { return x > y ? y : x; } int max(int x, int y) { return x < y ? y : x; } int main() { int h, w, dp[10][10]; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { dp[i][j] = INF; } } scanf("%d%d", &h, &w); for (i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111394/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111394/source.c" target datalayout = "e-m:e-p270: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 c[10][10],a,h,w,i,j,d[10]={0},k,s=0; scanf("%d%d",&h,&w); for(i=0;i<10;i++) for(j=0;j<10;j++){ scanf("%d",&c[i][j]); } for(i=1;i<=h;i++)for(j=1;j<=w;j++){ scanf("%d",&a); if(a>=0)d[a]++; } for(k=0;k<10;k++) for(i=0;i<10;i++) for(j=0;j<10;j++) if(c[i][j]>c[i][k]+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111437/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111437/source.c" target datalayout = "e-m:e-p270: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,i,koku,suu,ans; scanf("%d%d%d%d%d",&L,&A,&B,&C,&D); if(A%C!=0){ koku=A/C+1; } else if(A%C==0){ koku=A/C; } if(B%D!=0){ suu=B/D+1; } else if(B%D==0){ suu=B/D; } if(koku>suu){ ans=L-koku; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111480/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111480/source.c" target datalayout = "e-m:e-p270: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, l, x, y; scanf("%d",&l); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); x = a / c; if(( a % c) != 0){ x++; } y = b / d; if(( b % d) != 0){ y++; } if( x > y){ l = l - x; }else{ l = l - y; } printf("%d\n",l); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111523/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111523/source.c" target datalayout = "e-m:e-p270: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...
/*??????(Homework)*/ #include <stdio.h> int main(){ int x, y, z, A, B, C, D, L; scanf("%d %d %d %d %d", &L, &A, &B, &C, &D); if (A % C == 0) { x = A / C; } else { x = A / C + 1; } if (B % D == 0) { y = B / D; } else { y = B / D + 1; } if (x >= y){ z = L - x; } else { z = L - ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111567/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111567/source.c" target datalayout = "e-m:e-p270: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 hi,koku,suu,kokud,suud; int n=0,m=0; scanf("%d",&hi); scanf("%d",&koku); scanf("%d",&suu); scanf("%d",&kokud); scanf("%d",&suud); while(!(koku<=0)){ koku-=kokud; n++; } while(!(suu<=0)){ suu-=suud; m++; } if(n>=m){ hi-=n; } else{ hi-=m; } printf("%d\n",hi); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111617/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111617/source.c" target datalayout = "e-m:e-p270: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,s,j; scanf("%d",&l); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); if(a%c==0){ s= a / c; } else{ s= a / c + 1; } if(b%d==0){ j= b / d; } else{ j= b / d + 1; } if(s<j){ printf("%d\n",l-j); } else{ printf("%d\n",l-s); } re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111660/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111660/source.c" target datalayout = "e-m:e-p270: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 9 int count_combi(int); int main(){ int num, count; while(scanf("%d", &num) != EOF){ count = count_combi(num); printf("%d\n", count); } return 0; } int count_combi(int num){ int count = 0; int i,j,k,l; // すぐ数えれるシリーズ // 36より大きい時と36のとき if(num > 36){ return 0; // 9,9,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111703/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111703/source.c" target datalayout = "e-m:e-p270: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, a=0, b=0, c=0, d=0, e=0; while(scanf("%d", &x)!=EOF) { for (a=0;a<=x && a<=9;a++){ for (b=0;a+b<=x && b<=9;b++){ for (c=0;a+b+c<=x && c<=9;c++){ for (d=0;a+b+c+d<=x && d<=9;d++){ if(a+b+c+d==x)e+=1;}}}} prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111798/source.c" target datalayout = "e-m:e-p270: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> int count(int n){ int res=0; int i,j,k,tem,tem1; for(i=0; i<10; i++){ if(n-i<0)return res; tem=n-i; for(j=0; j<10; j++){ if(tem-j<0)break; tem1=tem-j; for(k=0; k<10; k++){ if(tem1-k<0 || tem1-k>9)continue; res++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111840/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111840/source.c" target datalayout = "e-m:e-p270: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,cnt,a,b,c,d; while(scanf("%d",&n)!=EOF){ cnt=0; if(n>36){ printf("0\n"); continue; } 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_111891/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111891/source.c" target datalayout = "e-m:e-p270: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 n; int count; while(!feof(stdin)) { scanf("%d",&n); if(feof(stdin))break; count=0; for(a=0;a<=9;a++) { for(b=0;b<=9;b++) { for(c=0;c<=9;c++) { if(a+b+c>=n-9 && a+b+c<=n)count++; } } } printf("%d\n",count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_111956/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_111956/source.c" target datalayout = "e-m:e-p270: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> int main(){ int t; scanf("%d",&t); while(t--){ int n,m; scanf("%d %d",&n,&m); int mul,mod,ans; mul=n*m; mod=mul%2; if(mod==0) ans=mul/2; else ans=(mul/2)+1; printf("%d\n",ans); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11202/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11202/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(void) { int a,b,c,d,n; int 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){ count++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112063/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112063/source.c" target datalayout = "e-m:e-p270: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,n,kai; while(scanf("%d",&n)!=EOF){ kai=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(n==a+b+c+d)kai++; printf("%d\n",kai); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112113/source.c" target datalayout = "e-m:e-p270: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,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++; } } } } printf("%d\n",cnt); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112164/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112164/source.c" target datalayout = "e-m:e-p270: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; int i, j, k, l; int count; while ((scanf("%d", &n)) != EOF){ count = 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){ count++; } } } } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112207/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112207/source.c" target datalayout = "e-m:e-p270: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,k,l,n,count; while(scanf("%d",&n)!=EOF){ count=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){ count++; } } } } } printf("%d\n",count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112250/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112250/source.c" target datalayout = "e-m:e-p270: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 1010: Dominoes Arrangement // 2017.12.15 bal4u@uu #include <stdio.h> #include <stdlib.h> #include <string.h> char f['7'], g['7']; int main() { int n, i, k, ans; char buf[60], *p; while (fgets(buf, 6, stdin) != NULL) { n = atoi(buf); memset(f, 0, sizeof(f)); memset(g, 0, sizeof(g)); fgets(p=buf, 6...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112300/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112300/source.c" target datalayout = "e-m:e-p270: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> int main() { int a; scanf("%d",&a); if(a%2==0){ printf("%d\n",a/2); } if(a%2!=0){ printf("%d\n",a/2+1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112344/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112344/source.c" target datalayout = "e-m:e-p270: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; scanf("%d",&a); printf("%d",(a+1)/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112388/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112388/source.c" target datalayout = "e-m:e-p270: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); int cnt = 0; while (N - 2 >= 0) { N = N - 2; cnt++; } if (N == 1) { cnt++; } printf("%d\n", cnt); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112430/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112430/source.c" target datalayout = "e-m:e-p270: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; scanf("%d", &a); printf("%d\n", a/2+a%2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112474/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112474/source.c" target datalayout = "e-m:e-p270: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==0){ printf("%d\n",n/2); } else{ printf("%d\n",(n/2)+1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112517/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112517/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #define REP(i,n) for(i=0;i<n;i++) #define MAX 1000000 #define MOD 1000000007 long long fac[MAX], finv[MAX], inv[MAX]; //prototype declaration int i_in(); long long ll_in(); double d_in(); char c_in(); void s_in(char *s)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112560/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112560/source.c" target datalayout = "e-m:e-p270: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",&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_112610/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112610/source.c" target datalayout = "e-m:e-p270: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_112654/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112654/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> #define ll long long const int MOD = 1000000007; int main() { int n = 0; scanf("%d", &n); n++; n /= 2; printf("%d",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112698/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112698/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @MOD = dso_local local_unna...
#include<stdio.h> int main(void){ int N,a=0; scanf("%d",&N); if(N%2==1) ++a; a+=N/2; printf("%d",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112740/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112740/source.c" target datalayout = "e-m:e-p270: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); if(n % 2 ==1) { n++; } printf("%d", n/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112784/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112784/source.c" target datalayout = "e-m:e-p270: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 1000 int main(void) { int i; while (1){ char in_str[MAX]; scanf("%s", in_str); if (in_str[0] == '0'){ break; } int sum = 0; for (i = 0; i < MAX; i++){ if (in_str[i] == '\0'){ break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112827/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112827/source.c" target datalayout = "e-m:e-p270: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 BUFMAX 1002 int main(void){ int sum,i; char buf[BUFMAX]; while(fgets(buf,sizeof(buf),stdin)!=NULL){ if(buf[0]=='0')break; for(i=0,sum=0;buf[i]!='\n';i++){ sum+=(buf[i]-'0'); } printf("%d\n",sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112885/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112885/source.c" target datalayout = "e-m:e-p270: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> int main(void) { int i, sum; char number[1001]; while (1) { i = 0; sum = 0; scanf("%s", number); if (number[0] == '0') break; while (number[i] != '\0') { sum += number[i] - '0'; i++; } printf("%d\n", sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112928/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112928/source.c" target datalayout = "e-m:e-p270: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=0,number; char num[1001]={0}; while(1){ number = 0; scanf("%s",num); if(num[0]=='0') break; for(i=0; num[i]!='\0'; i++){ //ヌル文字と会うまで繰り返す。 number += num[i]-'0'; } printf("%d\n",number); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_112971/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_112971/source.c" target datalayout = "e-m:e-p270: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[1000]={'\0'}; int i; for(;;){ int sum=0; scanf("%s",s); for(i=0;i<1000 && s[i]!='\0';i++) sum+=s[i]-'0'; if(sum==0) break; printf("%d\n",sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113020/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113020/source.c" target datalayout = "e-m:e-p270: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){ long long ans=0,tmp=0; char s[200020]; scanf("%s",s); for (int i=0; i<strlen(s); i++){ if (s[i]=='B'){ tmp++; } else { ans+=tmp; } } printf("%lld\n",ans); return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113079/source.c" target datalayout = "e-m:e-p270: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 int long long signed main(){ int N, i, now, ans = 0; char *S = (char *)malloc(sizeof(char) * 200001); scanf("%s", S); for(N = 0; S[N] != '\0'; N++); for(i = 0, now = 0; i < N; i++){ if(S[i] == 'W'){ ans += i - now; now++; } } printf("%lld\n", ans); retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113121/source.c" target datalayout = "e-m:e-p270: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 struct card{ char mark; int value; }; int n; int isStable(struct card in[],struct card out[]){ int i,j,a,b; for(i = 0; i < n; i++){ for(j = i+1; j < n; j++){ for(a = 0; a < n; a++){ for(b = a+1; b < n; b++){ if((in[i].value == in[j].value) && ((in[i].value == out[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113165/source.c" target datalayout = "e-m:e-p270: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 s(int *a,int *b){int i=*a;*a=*b;*b=i;} void c(char *a,char *b){char i=*a;*a=*b;*b=i;} void sB(int *A,char *C,int a){ int i,j; for(i=0;i<a-1;i++) for(j=a-1;j>i;j--) if(A[j]<A[j-1]){ s(&A[j],&A[j-1]); c(&C[j],&C[j-1]); } } void sS(int *A,char *C,int a){ int i,j; for(i=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113208/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113208/source.c" target datalayout = "e-m:e-p270: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> struct card{ char mark[1]; int value; }; int main(){ int N, min_j, flag=1, i, j; struct card c[36]; struct card d[36]; struct card temp; scanf("%d", &N); for(i=0; i<N; i++){ scanf("%1s%d", c[i].mark, &c[i].value); d[i] = c[i]; } //Bubble while(flag){ flag = 0; for(i=N-1; i>=1;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113266/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113266/source.c" target datalayout = "e-m:e-p270: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 { [1 x ...
#include<stdio.h> #include<string.h> int main(){ int n,i,j,min,flag=1,sum=0; char c1[36]; int c2[36]; char babble1[36]; int babble2[36]; char esc1; int esc2; scanf("%d",&n); for(i=0;i<n;i++) scanf(" %c%d",&c1[i],&c2[i]); for(i=0;i<n;i++){ babble1[i]=c1[i]; babble2[i]=c2[i]; } if(n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113309/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113309/source.c" target datalayout = "e-m:e-p270: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> typedef struct{ int val; char pattern; }Card; void BubbleSort(Card *, int); void SelectionSort(Card *, int); int main(){ int n, i, flagb=1, flags=1; char tmp; Card cb[36], cs[36]; 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_113352/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113352/source.c" target datalayout = "e-m:e-p270: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 36 int main() { int i, j; int n, minj; int flag = 0; char bcard[N][2], scard[N][2]; char temp[2]; scanf("%d", &n); for(i = 0; i < n; i++) scanf("%s", bcard[i]); for(i = 0; i < n; i++) for(j = 0; j < 2; j++) scard[i][j] = bcard[i][j]; //Bubble Sor...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113396/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113396/source.c" target datalayout = "e-m:e-p270: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, n, w[100], wb[100], ws[100], a[100], ab[100], as[100], flag=1, tmp, minj, count=0; scanf("%d", &n); for(i=0; i<n; i++)scanf(" %c%d", &w[i], &a[i]); for(i=0; i<n; i++){ ab[i]=a[i]; as[i]=a[i]; wb[i]=w[i]; ws[i]=w[i]; } while(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113439/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113439/source.c" target datalayout = "e-m:e-p270: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> #include<string.h> typedef struct{ int x; char c; }card; int main(){ int i,j,n,hantei,mini; card **A,**B,*swap; scanf("%d",&n); A=malloc(n*sizeof(card *)); B=malloc(n*sizeof(card *)); for(i=0;i<n;i++) A[i]=malloc(sizeof(card)); for(i=0;i<n;i++) B[i]=malloc(size...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113482/source.c" target datalayout = "e-m:e-p270: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> int main() { long long n,t,d,r,s; scanf("%lld",&t); while(t--) { scanf("%lld%lld",&n,&r); if(n>r) { s = (r*(r+1))/2; } else if(n<=r) { n = n-1; s = (n*(n+1))/2 + 1; } printf("%lld\n",s); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11354/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11354/source.c" target datalayout = "e-m:e-p270: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> struct Card { char suit[3]; char value; int i; }; void BubbleSort(struct Card[], int); void SelectionSort(struct Card[], int); void Stable(struct Card[], int); int main(){ int N, i; struct Card C1[36]; struct Card C2[36]; scanf("%d",&N); for( i = 0 ; i < N ; i++ ){ scanf("%s",&C...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113583/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113583/source.c" target datalayout = "e-m:e-p270: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 { [3 x ...
#include <stdio.h> #include <stdbool.h> struct card{char suit, value;} ; void bubblesort(struct card a[],int n){ for(int i=0;i<n;i++){ for(int j=n-1;j>=i;j--){ if(a[j].value<a[j-1].value){ struct card t=a[j];a[j]=a[j-1];a[j-1]=t; } } } } void selection(stru...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113633/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113633/source.c" target datalayout = "e-m:e-p270: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<stdlib.h> #include<string.h> typedef struct{ char suit; char value; }Card; void swap(Card *,Card *); int main(){ Card C1[100], C2[100]; int n, i,j,c1,c2,mini,sum=0; char a; scanf("%d%c", &n,&a); for ( i = 0; i < n; i++ ){ scanf("%c%c%c",&C1[i].suit,&C1[i].value,&a); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113691/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113691/source.c" target datalayout = "e-m:e-p270: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_113734/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113734/source.c" target datalayout = "e-m:e-p270: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<stdlib.h> #include<stdio.h> #include<stdbool.h> struct Card { char suit, value; }; void bublleSort(struct Card a[], int n) { for (int i = 0; i < n; i++) { for (int j = n - 1; j >= i + 1; j--) { if (a[j].value < a[j - 1].value) { struct Card ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113778/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113778/source.c" target datalayout = "e-m:e-p270: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 c; int value; }sort; int main() { int i,j,n,flag=0,minj; sort C1[N],C2[N],a; char emp; scanf("%d\n",&n); for(i=0;i<n;i++){ scanf("%c%d%c",&C1[i].c, &C1[i].value,&emp); C2[i]=C1[i]; } //bubble sort for(i=0;i<n;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113820/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113820/source.c" target datalayout = "e-m:e-p270: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.sort = type { i8, i...
#include <stdio.h> #include<string.h> #define N 36 #define TRUE 1 #define FALSE 0 typedef struct{ char mark; short number; short tag; }Card; void SwapCard(Card *C, int i, int j){ Card tmp; tmp = C[i]; C[i] = C[j]; C[j] = tmp; } int IsStable(Card *C,int n){ int i; for(i=1; i<n; i++){ if(C[i].n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113864/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113864/source.c" target datalayout = "e-m:e-p270: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 M[36]; int F[36]; }pre; int main(){ int i,j,N,s,mini; char c; pre inp,oup1,oup2; scanf("%d",&N); for(i=0;i<N;i++){ scanf(" %c%d",&c,&s); inp.M[i]=c; inp.F[i]=s; } oup1=inp; for(i=0;i<N;i++){ for(j=N-1;j>i;j--){ if(oup1.F[j]<oup1.F[j-1]){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113907/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113907/source.c" target datalayout = "e-m:e-p270: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.pre = type { [36 x ...
#include<stdio.h> typedef struct { char suit; int num; }card; void swap (int *x, int *y,char *a, char *b) { int temps; char tempn; temps = *x; *x = *y; *y = temps; tempn = *a; *a = *b; *b = tempn; } int bubble_sort (card A[], int n) { int i,j = 0; for (i = 0; i < n - 1; i++){ for (j = n - 1; j >=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113950/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113950/source.c" target datalayout = "e-m:e-p270: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 type; int num; } card_t; int main(void) { char flag; int i, j, N, minj; card_t cards1[36], cards2[36], cards3[36], tmp; scanf("%d", &N); for(i = 0; i < N; ++i) { scanf(" %c%d", &cards1[i].type, &cards1[i].num); cards2[i] = cards...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_113994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_113994/source.c" target datalayout = "e-m:e-p270: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_t = type { i8,...
#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_114036/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114036/source.c" target datalayout = "e-m:e-p270: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() { int t,n; scanf("%d",&t); while(t--) { 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_11408/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11408/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> typedef struct{ char a; int num; }data; //バブルソートと比較し安定か安定じゃないか確かめる int main(){ data data[36],data1[36],data2[36],tmp_data; char temp[2]; int i,j,n,minj,s=0,flag=0,flag2=0; scanf("%d",&n); for(i=0;i<n;i++){ //scanf(" %c %d",&data[i].a,&data[i].num); scan...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114122/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114122/source.c" target datalayout = "e-m:e-p270: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 { i8, i...
#include<stdio.h> typedef struct{ char suit; char num; int idx; }Card; void print(Card* A, int N){ int i; for(i = 0; i < N; i++){ if(i) printf(" "); printf("%c%c",A[i].suit,A[i].num); } printf("\n"); } void is_stable(Card* A, int N){ int i; for(i = 0; i+1 < N; i++) if(A[i].num == A[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114166/source.c" target datalayout = "e-m:e-p270: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 typedef struct{ char chara; int num; int no; } trump; int main(){ int i,j,n,flag=1,minj; trump T1[N],T2[N],tmp; scanf("%d",&n); for(i=0;i<n;i++){ while(1){ scanf("%c",&T1[i].chara); if(T1[i].chara != 'S' && T1[i].chara != 'H' && T1[i].chara != 'C' && T1[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114209/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114209/source.c" target datalayout = "e-m:e-p270: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 { i8, ...
// AOJ 1249: Make a Sequence // 2017.10.16 bal4u@uu #include <stdio.h> #include <string.h> typedef struct { int x, y; } T; T a[350]; int n, m; char peg[8][8][8]; char hi[8][8]; int dx[13] = { 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 }; int dy[13] = { 0, 1, 0, 1,-1, 0, 0, 1, 1, 1, 1,-1,-1 }; int dz[13] = { 0, 0, 1, 0, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_114252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_114252/source.c" target datalayout = "e-m:e-p270: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.T = type { i32, i32...
#include<stdio.h> #include<string.h> int main() { int t; scanf("%d",&t); for(int i=0;i<t;i++) { int n,ans ; scanf("%d",&n); if(n<=2) { ans=1; } else { if(n%2!=0) ans=n/2+1; else if(n%2==0) ans=n/2; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_11431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_11431/source.c" target datalayout = "e-m:e-p270: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 ...