Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #define MAX 2000000 #define INFTY (1<<30) int h, a[MAX+1]; void maxHeapify(int i){ int l, r, largest, tmp; l = 2 * i; r = 2 * i + 1; if(l <= h && a[l] > a[i]){ largest = l; } else { largest = i; } if(r <= h && a[r] > a[largest]){ largest = r; } if(largest != i){ tmp = a[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362325/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362325/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @h = dso_local local_unname...
#include<stdio.h> #define MAX 2000000 #define INFTY (1<<30) int H, A[MAX+1]; void maxHeapify(int i){ int l, r, largest,t; l = 2 * i; r = 2 * i + 1; //左の子、自分、右の子で値が最大のノードを選ぶ if(l <= H && A[l] > A[i]) largest = l; else largest = i; if(r <= H && A[r] > A[largest]) largest = r; if(largest != i){ t ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362376/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362376/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local local_unname...
#include <stdio.h> #define ORDERMAX 2000000 #define MAX 2000000001 #define NIL -1073741824 void insert(int); int extractMax(void); void scan(void); void swapping(int *,int *); void perfecttree(int); int A[MAX],H; int main(){ scan(); return 0; } void scan(void){ char order[8]; int key; while(1){ sca...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362419/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362419/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ int pow= 1<<n/2; printf("%d",pow); } else printf("0"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36247/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36247/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 present [101], input, i, n; scanf ("%d", &n); for (i = 1; i <= n; i++) { scanf ("%d", &input); present[input] = i; } for (i = 1; i <= n; i++) printf ("%d ", present[i]); printf ("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36252/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <inttypes.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define BUF_SIZE 0x10 #define EXPR_BUF_SIZE (BUF_SIZE*2) int toint(char ch) { return ch - '0'; } void print_expr(const char* buf) { for(size_t i = 0; i < strlen(buf); i += 2) { putchar(buf[i]); switch(buf[i+1]) { case ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362563/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362563/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stderr = external local_un...
#include<stdio.h> int main(){ int i=1, maxmin; for(i;i <=7;i++){ int a, b; scanf("%d%d",&a,&b); maxmin=a-b; printf("%d\n",maxmin); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362606/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362606/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 tab[101]; int n,i,x; scanf("%d",&n); for (i=1; i<n+1; ++i){ scanf("%d",&x); tab[x]=i; } for (i=1; i<n+1; ++i){ printf("%d ", tab[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36265/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36265/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, i; for ( i = 0; i < 7; i++ ) { scanf("%d %d", &a, &b); printf("%d\n", a - b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362693/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362693/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[7],i; for(i=0;i<7;i++){ scanf("%d %d",&a,&b); c[i]=a-b; } for(i=0;i<7;i++){ printf("%d\n",c[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362736/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362736/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 current,expected,required; do{ scanf("%d",&current); }while(current<0); do{ scanf("%d",&expected); }while(expected>4500); required = (2*expected) - current; printf("%d",required); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362895/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362895/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); printf("%d\n",2*b-a); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362938/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362938/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=b*2; c=c-a; printf("%d",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362981/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362981/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 R,G; scanf("%d%d",&R,&G); printf("%d\n",R+(G-R)*2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363023/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363023/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 R,G; scanf("%d", &R); scanf("%d", &G); printf("%d", 2*G-R ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363067/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363067/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <math.h> #include <stdlib.h> #include <limits.h> #define MOD 1000000007 int MIN (int a,int b) { return (a < b ? a : b); } int MAX (int a,int b) { return (a > b ? a : b); } int GCD (int a,int b) { if (a % b == 0) { return a; } else { return GCD(b,a % b); } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36311/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36311/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 R,G; int C; scanf("%d%d",&R,&G); C=G*2.0-R; printf("%d",C); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363153/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363153/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define BIG 2000000007 #define MOD 1000000007 typedef unsigned long long ull; typedef signed long long sll; #define N_MAX 200000 #define M_MAX 100 typedef struct { int a; int b; } hw; typedef struct { sll a; sll b; } hwll; co...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363197/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363197/source.c" target datalayout = "e-m:e-p270: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.hw = type { i32, i3...
#include<stdio.h> #include<math.h> int main() { char c; int i,n=-1,sum=0,a[5]={0}; while(scanf("%c",&c)!=EOF) { if(c>=48 && c<=57) { n++; a[n]=c-48; } else if(n!=-1) { for(i=0;i<=n;i++) { sum+=a[n-i]*(int)(pow(10.0,i)); } n=-1; } } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363269/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> typedef struct{ long long st; long long fi; long long kr; }rs; typedef struct{ long long st; long long kz; }mkj; int sortfnc(const void *a,const void *b){ if(((rs*)a)->st == ((rs*)b)->st){return 0;} if(((rs*)a)->st < ((rs*)b)->st){return -1;} return 1; } void...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363319/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363319/source.c" target datalayout = "e-m:e-p270: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.rs = type { i64, i6...
#include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> #define rad M_PI/3 #define N 2147483647 #define Max 500000 #define NTL -1 #define min(a,b) ((a>b)?b:a) int main(){ int n,i,x=0,y=0,tmp,count,p=1; scanf("%d",&n); for(i=0;i<n;i++){ int ch,ok=0; scanf("%d",&ch); for(x=1;x*x<ch...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363377/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363377/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3]; scanf("%d %d %d",&a[0],&a[1],&a[2]); for(int i=0;i<2;i++){ for(int j=2;j>i;j--){ if(a[j-1]>a[j]){ int temp=a[j]; a[j]=a[j-1]; a[j-1]=temp; } } } if(a[0]==5&&a[1]==5&&a[2]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363427/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363427/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, char *argv[]) { int a,b,c; scanf("%d %d %d", &a, &b, &c); if(a==5) { if(b==7) { if(c==5) printf("YES"); else printf("NO"); } else if(b==5) { if(c==7) printf("YES"); else printf("NO"); } } else if(a==7) { if(b==5) { if(c==5) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363478/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363478/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0,B=0,C=0; scanf("%d %d %d",&A,&B,&C); if((A==7)&&(B==5)&&(C==5)){ printf("YES\n"); }else if((A==5)&&(B==7)&&(C==5)){ printf("YES\n"); }else if((A==5)&&(B==5)&&(C==7)){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363520/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363520/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 STR_LEN 16 int main(void) { char str[STR_LEN]; int chk[3] = {0}; int i; char *p; int five=0,seven=0; p = fgets(str, STR_LEN, stdin); for(i=0;i<STR_LEN;i++){ if(str[i] == ' '){ str[i] = '\0'; if(chk[0]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363564/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363564/source.c" target datalayout = "e-m:e-p270: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 num1,num2,num3; scanf("%d %d %d",&num1,&num2,&num3); if(num1+num2+num3==17){ if((num1==5&&num2==5)||(num2==5&&num3==5)||(num3==5&&num1==5)){ printf("YES"); }else{ printf("NO"); } }else{ printf("NO"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363607/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363607/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0; int b = 0; int c = 0; scanf("%d%d%d", &a, &b, &c); if (a + b + c == 17) { printf("YES"); } else { printf("NO"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363700/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363700/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c5=0, c7=0, b; for(int i=0; i<3; i++){ scanf("%d", &b); if(b == 5) c5++; if(b == 7) c7++; } if(c5 == 2 && c7 == 1){printf("YES");} else{printf("NO");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363744/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363744/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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)||(a==5&&b==7&&c==5)||(a==7&&b==5&&c==5)){printf("YES");} else{printf("NO");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363788/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363788/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(( a==5&&b==5&&c==7)||( a==5&&b==7&&c==5)||(a==7&&b==5&&c==5)) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363852/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363852/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i , j; i = 0; j = 0; scanf("%d %d %d", &a, &b, &c); if (a == 5) i++; if (b == 5) i++; if (c == 5) i++; if (a == 7 || b == 7 || c == 7) j++; if (i == 2 && j == 1) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363902/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363902/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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+b+c ==17) { if (a == 5) { if (b == 5 && c == 7 || b == 7 && c == 5) { printf("YES\n"); } else { printf("NO\n"); } } else if (a == 7) { if (b==5&&c==5) { printf("YES\n"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363946/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363946/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int flag; flag = 0; scanf("%d %d %d", &A, &B, &C); if (A == 5) { if (B == 5) { if (C == 7) { flag = 1; } } else if (B == 7) { if (C == 5) { flag = 1; } } } else if (A == 7) { if (B == 5) { if (C == 5) { flag = 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363997/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> typedef long long ll; #define rep(i,n) for(ll i=0; i<(ll)(n); i++) #define max(l,r) ((l)>(r)?l:r) #define min(l,r) ((l)<(r)?l:r) #define swap(l,r) {ll tp=l;l=r;r=tp;} const ll MOD = 1000000007; int upcmpii(const void *a, c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364039/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364039/source.c" target datalayout = "e-m:e-p270: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() { int t; scanf("%d", &t); int arr[t][2]; for (int i = 0; i < t; i++) { scanf("%d%d", &arr[i][0], &arr[i][1]); } for (int i = 0; i < t; i++) { if ((arr[i][0] + arr[i][1]) % 2 != 0) printf("-1 -1\n"); else if (((arr[i][0] ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36409/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> int main (void) { int n,k; char s[10]; scanf("%d",&n); scanf("%s",s); scanf("%d",&k); for(int i=0;i<n;i++) { if(s[i]!=s[k-1]) { s[i]='*'; } } printf(s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364154/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364154/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ char S[11]; int i,N,K; char target; scanf("%d",&N); scanf("%s",S); scanf("%d",&K); target = S[K-1]; //printf("%c\n",target); //printf("%d\n",strlen(S)); for(i=0;i<strlen(S);i++){ if(S[i] != target){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364198/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364198/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int i,N,K; scanf("%d",&N); char moji[N],S; scanf("%s",moji); scanf("%d",&K); S = moji[K-1]; for(i=0;moji[i] != '\0';i++){ if(moji[i] != S)moji[i] = '*'; } printf("%s",moji); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364240/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364240/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ // Your code here! int N; scanf("%d", &N); char S[N+1]; scanf("%s", S); int K; scanf("%d", &K); char target = S[K-1]; int i; for(i = 0; i < N; i++){ if(target != S[i]){ putchar('*'); }else{ putchar(S[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364284/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364284/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void){ int n,k; scanf("%d",&n); char s[n + 1]; scanf("%s %d",&s,&k); for(int i = 0;i < n;i++){ if(s[i] == s[k - 1]){ printf("%c",s[i]); }else{ printf("*"); } } return 0; } //scanf("%d",&); //printf("%d\n",);
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364327/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364327/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 1073741824 int min(const int a, const int b){return a>b?b:a;} int n, l, i, j, k; int m; int a[1000], b, c; int key[1000]; int d[4096]; int main(void){ scanf("%d%d", &n, &m); for(i=0; i<m; i++){ scanf("%d%d", a+i, &b); for(j=0; j<b; j++){ scanf("%d", &c); key[i] |= 1<<(c-1); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364370/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364370/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <math.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define PI acos(-1) typedef long long int ll; typedef long double ld; int main(void) { ll answer; int scan; ll n; char *s; answer = 0; scan = scanf("%lld", &n); s = (char *)malloc(sizeof(char) * (n +...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364413/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364413/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, rn, wn, lp, rp; char str[200005]; int i, j, ans; scanf("%d", &n); scanf("%s", str); rn = wn = 0; for (i = 0; i < n; i++) { if (str[i] == 'R') rn++; else wn++; } if (rn == 0 || wn == 0) printf("0\n"); else if (rn == 1 || wn == 1) printf("1\n"); else { ans...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364457/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364457/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int n,l,r; scanf("%d %d %d",&n,&l,&r); //int max[1000],min[1000]; int p=1,ndiff=1; int mins=0,maxs=0; for(int i=0;i<n;i++) { mins+= p; if(ndiff<l) { p*=2; ndiff++; } else if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36450/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36450/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; 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); } el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364543/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364543/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; for(;;){ scanf("%d %c %d", &a, &op, &b); if(op=='?'){break;} else if(op=='+'){a=a+b;} else if(op=='-'){a=a-b;} else if(op=='*'){a=a*b;} else if(op=='/'){a=a/b;} printf("%d\n",a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364594/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364594/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char op; while (scanf("%d %c %d", &a, &op, &b)){ if (op == '?'){ break; } 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(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364637/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364637/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=='+'){ printf("%d\n",a+b); } else if(op=='-'){ printf("%d\n",a-b); }else if(op=='*'){ printf("%d\n",a*b); }else if(op=='/'){ p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364688/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364688/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); switch(op){ case '?': { return 0; } case '+': { printf("%d\n",a+b); break; } case '-': { printf("%d\n",a-b); break; } case '*': { printf("%d\n",a*b); break; } case '/': { printf("%d\n",a/b); break; } } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364738/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364738/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,ans; char op; while(1){ scanf("%d %c %d", &a, &op, &b); if(op == '+'){ ans = a+b; }else if(op == '-'){ ans = a-b; }else if(op == '*'){ ans = a*b; }else if(op == '/'){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364781/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364781/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char op; while(1) { scanf("%d %c %d",&a,&op,&b); if(op=='?') break; else switch(op) { case '+': printf("%d\n",a+b);break; case '-': printf("%d\n",a-b);break; case '*': printf("%d\n",a*b);break; default: printf("%d\n",a/b);break; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364831/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364831/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { char a, b, c, d; scanf("%c%c", &a, &b); if(b == '\n') { printf("No"); return 0; } scanf("%c", &c); if(c == '\n') { printf("No"); return 0; } scanf("%c", &d); if(d == '\n') { printf("No"); return 0; } if( a == 'Y' && b == 'A' && c == 'K' && d == 'I' ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364882/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364882/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void) { char s[200001], t[200001]; scanf("%s", s); scanf("%s", t); int n = strlen(s); int ans = 0; for(int i=0; i<n; i++){ if(s[i] != t[i]){ ans++; } } printf("%d", ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364925/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364925/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { char S[200001]; char T[200001]; int i, j; int num = 0; scanf("%s", &S); scanf("%s", &T); for(i=0; S[i]!='\0'; ++i); for(j = 0; j <= i; j++){ if(S[j] != T[j]){ num++; } } printf("%d", num); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364969/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364969/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <string.h> int main(){ int i, n, ans=0; char s[200001], t[200001]; scanf("%s",s); scanf("%s",t); n=strlen(s); for(int i=0;i<n;i++){ if(s[i]!=t[i]) ans++; } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365010/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365010/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ char s[200001], t[200001]; scanf("%s%s", s, t); int i, count=0; for(i=0; s[i]!='\0' ; i++){ if(s[i]!=t[i]) count++; } printf("%d\n", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365054/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365054/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str1[200001],str2[200001]; int i,n,t=0; scanf("%s%s",str1,str2); n=strlen(str1); for(i=0;i<n;i++) if(str1[i]!=str2[i]) t++; printf("%d\n",t); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365111/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365111/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void) { int a=0;int b=0; char x[2000000]; char y[2000000]; scanf("%s",x); scanf("%s",y); for(a=0;a<strlen(x);a++){ if(x[a]!=y[a]){ b++; } } printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365155/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int a[100005],b[100005]; int main() { int j,i,l,r; char s[100005]; scanf("%s",s); int m; scanf("%d",&m); for(i=1,j=2;s[i]!='\0';i++,j++) { if(s[i]==s[i-1]) { if(s[i]=='.') { a[i]=a[i-1]+1; b[i]=b[i-1]; } else { b[i]=b[i-1]+1; a[i]=a[i-1]; } } else { a[i]=a[i-1]; b[i]=b[i-1]; } } b[i]=b[i-1]; a[i]=a[i-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36522/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36522/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<math.h> #include<stdlib.h> int main() { char s[200001],t[200001]; int a=0; int i; int l; scanf("%s",s); scanf("%s",t); l=strlen(s); for(i=0;i<l;i++){ if(s[i]!=t[i]) a++; } printf("%d",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365278/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365278/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 long long ll; typedef long l; int return_max(int a,int b){ if(a>b){ return a; }else{ return b; } } int return_min(int a,int b){ if(a<b){ return a; }else{ return b; } } int main(void) { char s[200010]; char t[200010]; scanf("%s %s",s,t); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365320/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365320/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; long ans = 1; scanf("%d", &n); for (i = n; i > 0; i--){ ans = ans * i; } printf("%ld\n", ans); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365364/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365364/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int factorial (int n); int main () { int n; while (scanf ("%d", &n) != EOF) { printf ("%ld\n", factorial (n)); } return 0; } long int factorial (int n) { if (n > 1) { return n * factorial(n-1); } else if (n == 1) { return n; } else { return 0; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365414/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365414/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a){ int i; long long fac = 1; for(i=a; i>0; i--){ fac = fac * i; } return fac; } int main(void) { int n; scanf("%d",&n); printf("%lld\n",factorial(n)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365465/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365465/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> unsigned long long Kaijo(int n) { if (n == 1)return 1; else return Kaijo(n - 1)*n; } int main() { int N; unsigned long long ans; scanf("%d", &N); ans = Kaijo(N); printf("%lld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365515/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365515/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ unsigned long long int n, fac; scanf("%llu", &n); if(n>=1 && n<=20){ fac = n; fac = fac * (n-1); n = n-2; while(n>1){ fac = fac * n; n = n-1; } printf("%llu\n", fac); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365566/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365566/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 fact(int); long long fact(int n) { if (n == 0) { return 1; }; return n * fact(n - 1); } int main() { int n; scanf("%d", &n); printf("%lld\n", fact(n)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365623/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365623/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n,i; double ans=1.0; scanf("%d",&n); for(i=n;i>1;i--) ans*=i; printf("%.0lf\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365689/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365689/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0; long long i = 0; long long a = 0; scanf("%d",&N); a = (long long)N; for(i = N; i != 1; i--){ a = a * (i-1); } printf("%lld\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365731/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365731/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; long long sum; sum=1; scanf("%d",&n); while(n){ sum=(long long)sum*n; n--; } printf("%lld\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365775/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365775/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void) { int n,i,a; char s[100],p[100] = "0",q[100] = "0"; scanf("%d %s",&n,s); for(i = 1 ; i <= n / 2 ; i++) { strncpy(p,s,i); strncpy(q,s,i); p[i] = '\0'; q[i] = '\0'; strcat(p,q); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365818/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365818/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #define max 1000 int main(){ int len; char str[max]; scanf("%d", &len); scanf("%s", str); if(len % 2 == 1){ printf("No\n"); return 0; }else{ int i; int n = len/2; int count = 0; for(i = 0; i < n; i++){ if(str[i] == str[i+n]){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365861/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365861/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 <string.h> #include <stdio.h> int main(void) { int N; scanf("%d",&N); char S[N+1]; scanf("%s",S); if(N%2) {printf("No");return 0;} N/=2; if(!memcmp(&S[0],&S[N],N)) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365911/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365911/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//B - Echo #include <stdio.h> int main(void){ int n, i; char s[100], t[100]; scanf("%d", &n); if(n%2==1){ puts("No"); return 0; } scanf("%s", s); for(i=0; i<n/2; i++){ if(s[i] != s[(n/2)+i]){ puts("No"); return 0; } } puts(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_365962/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_365962/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ABC145_B */ #include <stdio.h> int main(void){ int N = 0; char S[101] = ""; scanf("%d",&N); scanf("%s",S); int i; if(N%2 == 1){ printf("No"); return 0; } int h = N/2; for(i=0;i<h;i++){ if(S[i]!=S[i+h]){ break; } if(i+1==h){ printf("Yes"); return 0; } } printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366004/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366004/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <limits.h> #include <math.h> int acs(const void *a, const void *b) { return *(int *)a - *(int *)b; } /* 1,2,3,4.. */ int des(const void *a, const void *b) { return *(int *)b - *(int *)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366048/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Check(int N){ char S[N]; int i; scanf("%s", S); if(N % 2 != 0) return 0; for(i = 0;i < N / 2;i++) if(S[i] != S[N/2+i]) return 0; return 1; } int main(void){ int N; scanf("%d", &N); if(Check(N) == 1) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366099/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366099/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[102]; scanf("%d %s",&n,s); if(n%2!=0){ printf("No"); return 0; }else{ for(int i=0;i<n/2;i++){ if(s[i]!=s[i+n/2]){ printf("No"); return 0; } } } printf("Yes"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366141/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366141/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char S[100010]; int i; scanf("%d",&N); scanf("%s",S); int a=1; for(i=1;i<N;i++){ if(S[i]!=S[i-1]){ a=a+1; } } printf("%d",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366185/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366185/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int n; scanf("%d",&n); char s[n+1]; scanf("%s",&s); int ans=n; for(int i=0;i<n-1;i++){ if(s[i]==s[i+1]){ while(s[i]==s[i+1]){ ans--; i++; } } } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366235/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366235/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n,i,m=1,p=1; scanf("%d\n",&n); char a[n]; for(i=0;i<n;i++){ a[i]=getchar(); } while(m<n){ if((int)(a[m-1])!=(int)(a[m])){ p++; }; m++; }; printf("%d",p); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366286/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366286/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); char s[n+1]; scanf("%s", s); int ans = 1; char c = s[0]; for (int i=1; i<n; i++) { if (c == s[i]) continue; ans++; c=s[i]; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366343/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366343/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sum = 0; scanf("%d", &N); char s[N]; scanf("%s", s); for (int i = 0; i < N - 1; i++) { if (s[i] == 0) continue; char a = s[i]; for (int j = i + 1; j < N; j++) { if (a == s[j]) { s[j] = 0; } else { break; } } sum++; } if (s[N - 1] != 0)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366387/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366387/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { unsigned char c[101][101]; int i,j,n; scanf("%d ",&n); for(i=0;i<n;i++){ for(j=0;j<n;j++){ if(j==n-1)scanf("%c ",&c[i][j]); else scanf("%c",&c[i][j]); } } for(i=0;i<n;i++){ for(j=0;j<n;j++){ if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36643/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36643/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <ctype.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <math.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366473/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366473/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m=1; int a[1000001]; scanf("%d",&s); a[s]=1; while(s!=0){ if(s%2==0) s=s/2; else s=s*3+1; m++; if(a[s]==0) a[s]=1; else{ printf("%d",m); return 0; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366516/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366516/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[105],c[105][105]; #include<stdio.h> void radix_sort(long long x[], long long n) { long long i, b[n+1], m = 0, exp = 1; for (i = 0; i < n; i++) { if (x[i] > m) m = x[i]; } while (m / exp > 0) { long long box[10] = {0,0,0,0,0,0,0,0,0,0}; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36656/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36656/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, i; scanf("%d", &a); if (a == 1 || a == 2 || a == 4){ printf("%d", 4); } else { for (i = 1; i < 1000000; i++){ if (a % 2 == 0) a = a / 2; else a = 3 * a + 1; if (a == 4){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366602/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366602/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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],i; scanf("%d",&a[0]); for(i=0; i<100000; i++){ if(a[i]%2==0) a[i+1]=a[i]/2; else a[i+1]=3*a[i]+1; for(int j=0; j<i; j++){ if(a[j]==a[i]){ printf("%d",i+1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366646/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366646/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 gcd(int a,int b) { if(b==0) return a; return gcd(b,a%b); } int main() { int i,n;scanf("%d",&n); int ar[n]; for(i=0;i<n;i++) scanf("%d",&ar[i]); //qsort(ar,n,sizeof(int),comp); int first=ar[0]; for(i=1;i<n;i++) { first=gcd(first,ar[i]); } printf("%d\n",first*n); return 0; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36669/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36669/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> char in[100000], out[100000]; int main(void) { // char in[10000]; int n; int i, j; // char out[10000]; char tmp[10]; int p, m, l; while (1){ scanf("%d", &n); if (n == 0){ break; } scanf("%s"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366747/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366747/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #define MAX_STRING ( 65536 ) void sortStr( char* input, char* output ); int main( void ) { char string[ MAX_STRING + 1 ]; char output[ MAX_STRING + 1 ]; int n; int i; while( 1 ) { if( scanf( "%d", &n ) == EOF )break;; if( n == 0 )break; scanf( "%s", string ); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366798/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 #define p (int)(1e9 + 7) signed main(){ int N, i, ans, prev; scanf("%lld", &N); char *S1 = (char *)malloc(sizeof(char) * (N + 1)); char *S2 = (char *)malloc(sizeof(char) * (N + 1)); scanf("%s", S1); scanf("%s", S2); if(S1[0] == S2[0]){ ans = 3; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366848/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366848/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> void minimize(int * N, int digit, int min){ int i; for(i = 0; i <= digit; i++){ N[i] = min; } } void calc(int * N, int K, int * D, int digit, int digit_max, int * moveup, int min, int max){ if(digit > 0 && N[digit] <= max) calc(N, K, D, digit-1, digit_max,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366891/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366891/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ok[10]; int good(int n) { return n == 0 ? 1 : good(n / 10) && ok[n % 10]; } int main() { int n, k; scanf("%d%d", &n, &k); memset(ok, 1, sizeof ok); while (k-- > 0) { int d; scanf("%d", &d); ok[d] = 0; } while (!good(n)) n++; printf("%d\n", n); return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366934/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ok = dso_local local_unnam...
#include<stdio.h> int main(void) { int a,b,x; scanf("%d %d %d",&x,&a,&b); x-=a; do{ x-=b; }while(x>=b); printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366985/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366985/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x,j,i=0,count; scanf("%d",&x); scanf("%d",&a); scanf("%d",&b); j=x-a; while(1){ j=j-b; if(j<b) break; } printf("%d\n",j); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367034/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367034/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c,d; scanf("%d",&x); scanf("%d",&a); scanf("%d",&b); c=x-a; d=c%b; printf("%d",d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367078/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367078/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void){ int A,B,X; scanf("%d %d %d",&A,&B,&X); printf("%d",(A-B)%X); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367128/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367128/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 X,A,B,ans; scanf("%d",&X); scanf("%d",&A); scanf("%d",&B); ans = X - A; ans = ans % B; printf("%d",ans); return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367171/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...