Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); switch(a){ case 5 : if( (b == 7 && c ==5) || (b == 5 && c == 7) ){ printf("YES\n"); }else{ printf("NO\n"); } brea...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363881/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363881/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 == 5 && b == 5 && c == 7){ printf("YES\n"); }else if(a == 5 && c == 5 && b == 7){ printf("YES\n"); }else if(b == 5 && c == 5 && a == 7){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363924/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363924/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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==5 && B==5 && C==7){ printf("YES\n"); }else{ if(A==5 && B==7 && C==5){ printf("YES\n"); }else{ if(A==7 && B==5 && C==5){ printf("YES\n"); }else{ printf("NO\n"); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363968/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363968/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 S[10]; int main() { int A, B, C; scanf("%d %d %d",&A,&B,&C); S[A]++; S[B]++; S[C]++; if (S[5] == 2 && S[7] == 1) { printf("YES\n"); } else { printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364017/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364017/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 nextInt(); int med3(int x, int y, int z); void quickSort(int a[], int left, int right); void sort(int a[], int size); int N, A[100000], B[100000], a[100000], mnum, i; long long int minus, plus; int main(){ N=nextInt(); for(i=0; i<N; i++){ A[i]=nextInt(); } for(i=0; i<N; i++){ B[i]=next...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364068/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364068/source.c" target datalayout = "e-m:e-p270: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 local_unname...
#include <stdio.h> #include <stdlib.h> #define int long long #define ms_valtype pair typedef struct { int num; int val; }pair; //比較関数 int compare_ms(ms_valtype a, ms_valtype b){ return b.val - a.val; } //昇順 void sort_sub(ms_valtype *origin, int left, int right, ms_valtype *tmp){ if(right - left > 1){ int i, j,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364132/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364132/source.c" target datalayout = "e-m:e-p270: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.pair = type { i64, ...
#include <stdio.h> int main(void){ char c[11]; int n,k,i,m; scanf("%d",&n); scanf("%s",c); scanf("%d",&k); m=c[k-1]; for(i=0;i<n;i++){ if(c[i]!=m){ c[i]='*'; } printf("%c",c[i]); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364176/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364176/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int N,K; char S[11]; scanf("%d %s %d",&N,S,&K); for (int i = 0; i < N; i++) { if (S[i] == S[K-1]){ putchar(S[K-1]); }else{ putchar('*'); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364219/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364219/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int N, K; char S[11]; char c; scanf("%d\n%s\n%d", &N, S, &K); c = S[K - 1]; for (int i = 0; i < N; i++) { if (S[i] == c) { printf("%c", c); } else { printf("*"); } } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364262/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364262/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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) { // your code goes here int n,k,i; scanf("%d",&n); char str[n]; scanf("%s",str); scanf("%d",&k); for(i=0;i<strlen(str);i++) { if(str[i]!=str[k-1]) str[i]='*'; } printf("%s",str); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364305/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364305/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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> typedef char Key[21]; typedef struct record { int value; struct record *next; } record; typedef struct node { void **pointers; Key *keys; struct node *parent; int is_leaf; int num_keys; struct node *next; } node; int order = 32; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364349/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364349/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_STONE_MAX 200005 // 最大石数 // 内部変数 static FILE *szpFpI; // 入力 static char sc1Stone[D_STONE_MAX]; // 石 static int siSCnt; // 石数 stat...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364392/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364392/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #define RED 'R' #define WHITE 'W' char stone_int_array[200000]; int main() { int n, exchange_num = 0; char not_stone; char scan_stone; int left_counter, right_counter; scanf("%d", &n); scanf("%c", &not_stone); for (int i = 0; i<n; i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364435/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364435/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; int b; char op; while(1){ scanf("%d %c %d", &a, &op, &b); if (op == '+'){ printf("%d\n", a + b); } else if(op == '-'){ printf("%d\n", a - b); } else if(op == '*'){ printf("%d\n", a * b); } else if(op == '/'){ printf("%d\n", a / b); } else{...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364479/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364479/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, const char * argv[]){ int a[100],b[100],result[100]; //???a,???b,?????? char op[100]; //????????? int i=0,num=0; //???????????¨,?????° while(1){ //??\??? scanf("%d %c %d",&a[num],&op[num],&b[num]); //?????????????????? ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364521/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364521/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 = 0; int b = 0; char op; for(;;) { scanf("%d %c %d",&a , &op, &b); if(op == '+') printf("%d\n", a+b); else if(op == '-') ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364565/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364565/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int a; char op; int b; while(1){ scanf("%d",&a); scanf(" %c",&op); scanf(" %d",&b); if(op=='+'){ a=a+b; printf("%d\n",a); } else if(op=='-'){ a=a-b; printf("%d\n",a); } else if(op=='*'){ a=a*b; printf("%d\n",a); } else if(op=='/'){ a=a/b; printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364615/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364615/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; int a,b; int result; char op; while(1){ scanf("%d %c %d",&a, &op, &b); if(op=='+'){ result=a+b; } if(op=='-'){ result=a-b; } if(op=='*'){ result=a*b; } if(op=='/'){ result=a/b; } if(op=='?')break; printf("%d\n",result); } return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364666/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; char op; while(1){ scanf("%d %c %d",&a,&op,&b); if(op=='?'){ break; } else if(op=='+'){ printf("%d\n",a+b); } else if(op=='-'){ printf("%d\n",a-b); } else if(op=='*'){ printf("%d\n",a*b); } else if(op=='/'){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364716/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364716/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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,ans,t1,t2; scanf("%d",&n); if(n>0) { printf("%d\n",n); } else { ans=n/10; t1=(n*-1)%10; t2=(n/100)*10-t1; if(t2>ans)ans=t2; printf("%d\n",ans); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36476/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36476/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<string.h> int main() { int i,n,m,l,r; char s[100005]; scanf("%s",s); n = strlen(s); int a[n + 1]; a[0] = 0; for (i = 0; i < n - 1; i++) { if (s[i] == s[i + 1]) { a[i + 1] = a[i] + 1; } else { a[i + 1] = a[i]; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36481/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36481/source.c" target datalayout = "e-m:e-p270:32:32-p271: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){ char s[10]; scanf("%s",s); if(s[0]=='Y'&&s[1]=='A'&&s[2]=='K'&&s[3]=='I') {printf("Yes");return 0;} printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364853/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364853/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 i, j; char str[20]; char orig[] = "YAKI"; scanf("%s", &str); if (strstr(str, orig) == str) { printf("Yes"); } else { printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364903/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364903/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 SIZE 200000 int main(void){ int i=0, count=0; char a[SIZE], b[SIZE]; scanf("%s", a); scanf("%s", b); while(1){ if(a[i] != b[i]) count++; i++; if(a[i] == '\0' || b[i] == '\0') break; } printf("%d\n", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364947/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364947/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 = 0; int i; char buf[2*1000000]; char buf2[2*1000000]; fgets(buf, sizeof(buf),stdin); fgets(buf2, sizeof(buf2),stdin); i = 0; while(buf[i] != '\0'){ n++; i++; } int count = n; for (i=0; i<count;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364990/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364990/source.c" target datalayout = "e-m:e-p270: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){ char s[200005], t[200005]; scanf("%s %s", s, t); int ans = 0; int i = 0; while(s[i] != '\0'){ if(s[i] != t[i]) ans++; i++; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365032/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365032/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main() { char s[200001],t[200001]; int l,i,count=0; scanf("%s%s",s,t); l=strlen(s); for(i=0;i<l;i++) { if(s[i]==t[i]) { continue; } count++;} printf("%d\n",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365083/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365083/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 main(){ char palavra1[200001], palavra2[200001]; int cont=0; scanf("%s %s", palavra1, palavra2); for(int i=0; i < strlen(palavra1); ++i){ if(palavra1[i]!= palavra2[i]) cont++; } printf("%d\n", cont); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365133/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365133/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(){ char s[200001], t[200001]; int count, l; count = 0; scanf("%sn", s); scanf("%sn", t); l = strlen(s); for(int i=0; i<l; i++){ if(s[i] != t[i]){ count += 1; } } printf("%d\n", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365199/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<string.h> int main() { char s[300000],t[300000]; int c=0,i,x; scanf("%s%s",s,t); for(i=0;i<strlen(s);i++) { if(s[i]!=t[i]) c++; } printf("%d\n",c); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365249/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365249/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 t,n,x,max=0,min=0,sum=0; long long a[100000]={0}; scanf("%d",&t); for(int i=0;i<t;i++){ scanf("%lld %lld",&n,&x); for(long long s=0;s<n;s++){ scanf("%lld",&a[s]); } for(long lo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_3653/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_3653/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <stdlib.h> int main() { long long ans; int n; scanf("%d", &n); if (n == 0) ans = 1; else { ans = n; while (--n > 1) ans *= n; } printf("%lld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365342/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365342/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ long long int a=1; int n; int i; scanf("%d",&n); for(i=1;i<=n;i++){ a=a*i; } printf("%lld\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365393/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365393/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { long long n,res=1,i; scanf("%lld",&n); if(n<=20) { for(i=1;i<=n;i++) res=res*i; printf("%lld\n",res); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365443/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365443/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 i; long long int k = 1; int j; scanf("%d",&i); j = i; while(i > 0){ k *= i; i--; } printf("%lld\n",k); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365487/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365487/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> long long factorial(int n) { return n != 2 ? n * factorial(n-1) : 2; } int main(void) { int n; scanf("%d", &n); printf("%lld\n", factorial(n)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365537/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365537/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 size=1; char *a; int multiply(int m){ int carry=0, i=0; while(carry>0 || size>i){ if(i==size) a=realloc(a,++size), a[i]=0; carry=a[i]*m+carry; a[i]=carry%10, carry/=10; i++; } } int main(void){ int n, i; a=malloc(sizeof(int)); a[0]=1; scanf("%d",&n); for(i=1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365601/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365601/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @size = dso_local local_unn...
#include <stdio.h> #define ABS(a) ((a) < 0 ? (0 - (a)) : (a)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define TRUE 1 #define FALSE 0 #define getchar_unlocked() getchar() #define INF 2000000009 #define MAXN 200005 long long fast_in() { static long long j_fast; static char ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36566/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36566/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @fast_in.j_fast = internal un...
#include <stdio.h> long long int factrial(int n) { if(n == 1) return 1; return n*factrial(n-1); } int main(void) { int n; scanf("%d\n", &n); printf("%lld\n", factrial(n)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365753/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365753/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main() { int n,t,c=0,r,i; char a[100]; scanf("%d",&n); scanf("%s",a); if(n%2!=0) { printf("No"); } else { r=n/2; for(i=0,t=r; i<r,t<n; i++,t++) { if(a[i]==a[t]) { c++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365797/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365797/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main() { int n,m; int x; scanf("%d %d",&n,&m); int i = 1 , j = 1; int arr[n+1][m+1]; int result = 0; for(j = 1 ; j <= n ; i = 1){ while( i <= m && scanf("%d", &arr[j][i++]) == 1 ); j++; } for( i = 1 ; i <= n ; i++) fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36584/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36584/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 n,i; char s[110]; scanf("%d%s",&n,s); if(n%2==1){ printf("No\n"); } else{ for(i=0;i<n/2;i++) if(s[i]!=s[n/ 2+i]){ printf("No\n"); return 0; } printf("Yes\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365883/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365883/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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<time.h> #include<ctype.h> char ch[201]; int main(){ int n, i, j, cnt=0, a; scanf("%d", &n); scanf("%s", &ch); if(n%2==0){ for(i=0, j=(n/2);i<(n/2),j<n;i++,j++){ if(ch[i]==ch[j]){ cnt++;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365933/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365933/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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, ans = 1; char s[101]; scanf("%d", &n); scanf("%s", s); if(n % 2) ans = 0; for(int i = 0; i < n / 2; ++i){ if(s[i] != s[i + n / 2]) ans = 0; } if(ans) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365984/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365984/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 strlen; char *str; int i; scanf("%d", &strlen); if(strlen % 2 == 1){ printf("No"); return 0; }else if((str = (char *)malloc(strlen * sizeof(char))) == NULL){ printf("No"); return 0; } scanf("%s", str); for(i=0; i < strlen/2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366026/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 unsigned u; char B[100][100],c; int main() { u r,n,i,j,k;scanf("%u",&n);k=n-2; for(r=i=0;i<n;i++)for(j=0;j<n;j++) { while((c=getchar())<=' '); if(c=='#')r++; B[i][j]=c; } for(i=0;i<k;i++)for(j=0;j++<k;)if(B[i][j]=='#') if(B[i+1][j]=='#'&&B[i+2][j]=='#') if(B[i+1][j-1]=='#'&&B[i+1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36607/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36607/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<math.h> #include<stdbool.h> #include<string.h> int gcd(int a , int b) { if(a%b==0) return b; else return gcd(b,(a%b)); } int main() { int n,i,a,b; scanf("%d",&n); scanf("%d",&a); for(i=1;i<n;++i) { scanf("%d",&b); a = gcd(a,b); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36612/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36612/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 n; char s[1000]; scanf("%d", &n); scanf("%s", s); char ans[1000]; if (n == 1) { printf("No\n"); return 0; } else { int cnta = 0; for (int i = 0; i < n / 2; i++) { ans[i] = s[i]; } for (int i = n / 2 ; s[i] != '\0'; i++){ if (ans[cnta++] != s[i]) { pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366163/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 num,i,b; b=1; scanf("%d",&num); char a[num]; scanf("%s",a,num); for(i=0;i<num-1;++i) { if(a[i]!=a[i+1]) b++; } printf("%d",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366206/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366206/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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,i,g=1; scanf("%d",&n); char s[n+1]; scanf("%s",s); for(i=1;i<n;i++){ if(s[i]!=s[i-1]) g++; } printf("%d\n",g); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366264/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366264/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 N, i, ans = 0; char temp = 0; char *S; scanf("%d", &N); S = (char *)malloc(sizeof(char) * (N+1)); scanf("%s", S); for(i = 0; i < N; i++) if(temp != S[i]) { temp = S[i]; ans++; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366307/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366307/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 n, i, size = 0; char a, *b, c; scanf("%d", &n); b = (char *)malloc((n + 1) * sizeof(char)); for (i = 0; i <= n; i++) { scanf("%c", &a); b[i] = a; } for (i = 1; i <= n; i++) { c = b[i]; size++; while (b[i + 1] == c) { i+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366365/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 num = 0; char * pS = NULL; int i; char b = '\0'; int count = 1; //memset(s, 0, sizeof(s)); // スペース区切りの整数の入力 scanf("%d",&num); pS = malloc(num); memset(pS, 0, num); scanf("%s",pS); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366408/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366408/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> int main(){ int n; scanf("%d", &n); char str[n]; scanf("%s", str); int count=1; for(int i=1; i<n; i++){ if(str[i] != str[i-1]){ count++; } } printf("%d\n", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366451/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366451/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 s,i,a[1000]; scanf("%d",&s); a[0]=s; for(i=1;i>0;i++){ if(a[i-1]%2==0) a[i]=a[i-1]/2; else a[i]=a[i-1]*3+1; for(int j=0;j<i;j++) if(a[i]==a[j]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366495/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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[100000] = {}; int n,i,s,m,j; scanf ("%d",&s); a[0] = s; n = 0; for (i = 0;i < 1000;i++) { if (a[i]%2 != 0) { a[i+1] = (3*a[i])+1; } else { a[i+1] = a[i]/2; } } for (i = 0;i < 1000;i++) { for (j = i+1;j < 1000;j++) { if (a[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366538/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366538/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 s; long long m; int a[1000000] = {}; scanf("%d", &s); for (m = 0; m < 1000000; m++) { if (a[s] == 1) break; a[s]++; if (s % 2) s = 3*s+1; else s = s/2; } printf("%lld\n", m+1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366581/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366581/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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(void) { int s, a[1000000], flag = 1, ans; if(scanf("%d", &s) == 1); a[0] = s; for(int i = 1; i < 1000000 && flag == 1; i++) { if(a[i-1] % 2 == 0) { a[i] = a[i-1] / 2; } else { a[i] = a[i-1] * 3 + 1; } for(int j = 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366624/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366624/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 s; scanf("%d",&s); int a[10000]; a[1]=s; for(int i=2;i<200;i++) { if((a[i-1])%2==0) { a[i]=a[i-1]/2; } else { a[i]=a[i-1]*3+1; } } int flag=1; for(int i=2;i<200...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366668/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// Aizu Vol-0 0068: Enclose Pins with a Rubber Band // 2017.8.10 #include <stdio.h> #include <math.h> typedef double data; #define SIZE 105 #define EPS 1e-8 int size; data x[SIZE], y[SIZE]; int convexHull(int pn, data *x, data *y); data distance(data x1, data y1, data x2, data y2); double theta(data x1, data y1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366710/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366710/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> char s[65536]; char t[65536]; int main(void) { int n; while(scanf("%d", &n), n){ int i; char* str = s; char* tmp = t; scanf("%s", s); for(i=0; i<n; ++i){ int m = strlen(str); int read = 0; int write = 0; while(read<m){ char num = str[read]; int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366769/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366769/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 num,ten,hundred,limit,coin[100][2],i,left=0; scanf("%d %d %d %d",&num,&ten,&hundred,&limit); for (i=0; i<num; i++) scanf("%d %d",&coin[i][0],&coin[i][1]); i=0; while (coin[i][0]!=0||coin[i][1]!=0) { if (coin[i][0]!=0) { coin[i][0]--; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366826/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366826/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #define df 0 int dc=10000; int d[10]; int search(int n); int check(int n); int main(){ int n,k; scanf("%d%d",&n,&k); int i; for(i=0;i<10;i++){ d[i]=1; } for(i=0;i<k;i++){ int a; scanf("%d",&a); d[a]=0; } if(df){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366912/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366912/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dc = dso_local local_unnam...
#include<stdio.h> int main() { int A,B,X,Y; scanf("%d %d %d",&X,&A,&B); Y=(X-A)%B; printf("%d",Y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366963/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366963/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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, B; int dounatu; if (scanf("%d", &X) != 1) return 1; if (scanf("%d", &A) != 1) return 1; if (scanf("%d", &B) != 1) return 1; dounatu = (X - A) / B; printf("%d\n", X - A - B * dounatu); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367012/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367012/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; scanf("%d%d%d", &x, &a, &b); printf("%d\n", (x - a) % b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367056/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 v_max, v_min, p_max, p_min; scanf("%d%d%d%d", &v_max, &p_max, &v_min, &p_min); int v, p; int ans = 0; for(v = v_min; v <= v_max; v++) { for(p = p_min; p <= p_max && p < v; p++) ans++; } printf("%d\n", ans); for(v = v_min; v <=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_3671/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_3671/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 GetGCD(int *arr, int len) { int iMax = arr[0], iCurr, iRemainder,i; for(i = 1; i < len; i++) { iCurr = arr[i]; if (iMax < iCurr) { iMax ^= iCurr; iCurr ^= iMax; iMax ^= iCurr; } iRemainder =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36715/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36715/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include <stdlib.h> int main (int argc,char **argv) { int x = 0,a = 0,b = 0; int i = 0, k = 0,l = 0; scanf("%d\n %d\n %d",&x,&a,&b); if(((1 <= a)&&(b <= 1000)) && ((a + b <= x)&&(x <= 10000))) { i = x - a; k = i / b; l = i - k * b; printf("%d\n",l); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367193/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; scanf("%d", &x); scanf("%d", &a); scanf("%d", &b); x -= a; x -= (x/b) * b; printf("%d\n", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367236/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 num, a, b; scanf("%d\n", &num); scanf("%d\n", &a); scanf("%d", &b); num -= a; printf("%d\n", num % b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367287/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367287/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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> int main() { int n;int A[100];int y=0;int sec=0; scanf("%d",&n); int x=0; for(x=0;x<n;++x) scanf("%d",&A[x]); int equals=0;int c=0,sum=0; while(equals==0) { c=0; for(x=0;x<n;++x) { // printf(" x ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36733/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36733/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ double a; while(scanf("%lfn", &a)!=EOF){ if(a<=48.00){printf("light fly\n");} else if(a>48.00 && a<=51.00){printf("fly\n");} else if(a>51.00 && a<=54.00){printf("bantam\n");} else if(a>54.00 && a<=57.00){printf("feather\n");} else if(a>57.00 && a<=60.00){printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367373/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367373/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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> char *flag(float n) { if(n>48) { if(n>51) { if(n>54) { if(n>57) { if(n>60) { if(n>64) { if(n>69) { if(n>75) { if(n>81) { if(n>91) return "heavy"; else return "light heavy"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367416/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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(){ double w; while(scanf("%lf",&w) != EOF){ if(w <= 48.0){ printf("light fly\n"); }else if(w <= 51.0){ printf("fly\n"); }else if(w <= 54.0){ printf("bantam\n"); }else if(w <= 57.0){ printf("feather\n"); }else if(w <= 60.0){ printf("light\n"); }else if(w <= 64.0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367474/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367474/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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> char prime[10000001]; void SetPrime(int max) { int i, j; for (i = 4; i <= max; i += 2){ prime[i] = 1; } for (i = 3; i * i <= max; i += 2){ if (prime[i] == 0){ for (j = i * 2; j <= max; j += i){ prime[j] = 1; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367524/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367524/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @prime = dso_local local_un...
#include <stdio.h> int const M = 998244353; int i, n, x, c[7 << 14]; int power(int a, int b) { int r = 1; for(; b; b >>= 1) { if(b & 1) r = (long long) r * a % M; a = (long long) a * a % M; } return r; } int main() { scanf("%d%d", &n, &x); int r = 0; if(x == 0) { for(i = 0; ++i < n;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367597/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367597/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @M = dso_local local_unname...
#include<stdio.h> char train[27]; int head; int tail; int main(){ int i,n,j,now,tr; char str[1025]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",str); now=j=head=tail=0; while(str[j]){ train[now]=str[j]; if(str[j+1]=='\0') break; if(str[j+1]=='-'){ if(now==tail){ tail=(tail+1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367654/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367654/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 INF 999999 int x,y,t,n,m,route[2][20][20]; int i,j,k,l; int main(){ while(scanf("%d",&m)*m){ n=0; for(i=0;i<11;i++){ for(j=0;j<11;j++){ if(i!=j)route[0][i][j]=INF; } } for(i=0;i<m;i++){ scanf("%d %d %d",&x,&y,&t); if(x+1>n)n=x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367704/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367704/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//set many funcs template //Ver.20181228 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367748/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367748/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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() { long N,K,X,Y,z,pro; scanf("%ld %ld %ld %ld",&N,&K,&X,&Y); if(K<=N) { z=K*X; pro=(N-K)*Y; printf("%ld\n",z+pro); } else{z=N*X; printf("%ld\n",z); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367799/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367799/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n,k,x,y; scanf("%d %d %d %d",&n,&k,&x,&y); int ans; if(n-k>=0) { ans=x*k+y*(n-k); } else { ans=x*n; } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367841/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367841/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int a,b,c,d,n,m; while(~scanf("%d",&a)) { scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); if(a<=b) { printf("%d\n",a*c); } else { printf("%d\n",b*c+(a-b)*d); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367885/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367885/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int N, K, X ,Y; scanf("%d %d %d %d", &N, &K, &X, &Y); if (N <= K){ printf("%d\n", N*X); } else if (N > K){ printf("%d\n", K*X+(N-K)*Y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367928/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367928/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n,k,x,y; scanf("%d\n%d\n%d\n%d",&n,&k,&x,&y); if(n<=k){ printf("%d\n",n*x); }else{ printf("%d\n",k*x+(n-k)*y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367979/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367979/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n,k,f,s,ans; scanf("%d",&n); scanf("%d",&k); scanf("%d",&f); scanf("%d",&s); if(k==n) { ans=n*f; } else if(n>k) { ans=((k*f)+(n-k)*s); } else if(n<k) { ans=n*f; } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368020/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368020/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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,y,m,k,x; scanf("%d%d%d%d",&n,&k,&x,&y) ; int temp=n-k; int s=x*k; if(n<k) s=x*n; else s=s+y*temp; printf("%d",s); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368064/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368064/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int N,K,X,Y; int total; scanf("%d %d %d %d",&N,&K,&X,&Y); if(N>K) { total = K*X + (N-K)*Y; } else total = N*X; printf("%d",total); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368107/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368107/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int N, K, X, Y; scanf("%d%d%d%d", &N, &K, &X, &Y); if (K < N) { printf("%d\n", K * X + (N - K) * Y); } else { printf("%d\n", N * X); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368150/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368150/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 swap( x, y ) do { double tmp; tmp = x; x = y; y = tmp; } while ( 0 ) int rel_s_s( double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3, double *x, double *y ) { double a, b, c, d; int rel; if ( x1 < x0 ) { swap( x0, x1 ); swap( y0, y1 ); } if ( x3...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368194/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368194/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int A,B,c,d; scanf("%d%d",&A,&B); c=B*2; d=(A-c); if(A<=c) { printf("0"); } else { printf("%d",d); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368244/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368244/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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",&a,&b); c=a-b*2; if(c>0) printf("%d\n",c); else printf("0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368288/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368288/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; scanf("%d%d",&a,&b); if(a<=2*b){ printf("0"); } else{ printf("%d\n",a-2*b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368338/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368338/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 = 0, b = 0, sum = 0; scanf("%d %d", &a, &b); sum = a - b * 2; if (sum > 0) { printf("%d", sum); } else { printf("0"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368389/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; scanf("%d %d",&A,&B); if(A<=B){ printf("0"); } else if(A<=2*B){ printf("0"); } else{ printf("%d",A-2*B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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, a; scanf("%d %d",&A,&B); if(A-2*B>0){ printf("%d",A-2*B); }else{ printf("0"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368475/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; scanf("%d %d",&A,&B); (A>2*B)?printf("%d\n",A-2*B):printf("%d\n",0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368525/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; scanf("%d%d", &a, &b); if(a>2*b){ printf("%d\n", a-2*b); }else{ printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368576/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368576/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; scanf("%d %d",&a,&b); b *= 2; if(a - b > 0){ printf("%d",a - b); }else{ printf("0"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368619/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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; if (scanf("%d%d", &A, &B) != 2) return 1; printf("%d\n", B + B >= A ? 0 : A - (B + B)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368662/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...