Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main(){ double a,b; int ans,t; scanf("%lf %lf",&a,&b); t=a; ans=b; ans=t%ans; t=a/b; printf("%d %d %lf\n",t,ans,a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122616/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122616/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=1; int a; int b; scanf("%d %d",&a,&b); printf("%d %d %.7f\n",a/b,a%b,1.0*a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122667/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122667/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d,r; double f; scanf("%d%d",&a,&b); d = a / b,r = a % b,f = 1.0 * a / b; printf("%d %d %f\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122717/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122717/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 const *argv[]) { int x, y; scanf("%d %d", &x, &y); printf("%d %d %f\n", x / y, x % y, 1. * x / y); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122760/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122760/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); printf("%d %d %f",a/b,a%b,1.0*a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122810/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122810/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int a,b,c,d; double e; scanf("%d %d",&a,&b); c = a / b; d = a % b; e = (double)a / (double)b; printf("%d %d %.5lf\n",c,d,e); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122861/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122861/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <stdlib.h> #include <stdbool.h> #define MOD 1000000007 #define INFTY 2147400000 #define END printf("\n");return 0; #define QS09(how_data,data) qsort(data,how_data,sizeof(long),(int (*)(const void *,const void *))qsort_09); #define QS9...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122926/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122926/source.c" target datalayout = "e-m:e-p270: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._GD = type { i64, i...
#include<stdio.h> int main() { int c,r,i,j; scanf("%d %d",&c,&r); for(i=1;i<=c;i++) { if(i%2!=0) { for(j=1;j<=r;j++) { printf("#"); } printf("\n"); } else if((i%2==0) && (i%4!=0)) { for(j=1;j<=r-1;j++) { printf("."); } printf("#"); printf("\n"); } else if((i%2==0)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12297/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12297/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[4]; int one = 0, nine = 0, seven = 0,four = 0; for (int i = 0; i < 4; ++i) { scanf("%d",&n[i]); if (n[i] == 1){ one++; }else if(n[i] == 9){ nine++; }else if(n[i] == 7){ seven++; }else if(n[i] == 4){ four++; } } if (one == 1&&nine == 1&&seven == 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123019/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123019/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main() { int i, a[4]; for (i = 0; i < 4; i++) scanf("%d", &a[i]); qsort(a, 4, sizeof(int), compare_int); if (a[0] == 1 && a[1] == 4 && a[2] == 7 && a[3] == 9) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123062/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123062/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h,w,n,i,j,num=0; scanf("%d%d%d",&h,&w,&n); int a,mass[h+1][w+1]; for(i=0;i<n;i++){ scanf("%d",&a); while(a!=0){ if((num/w)%2==0) mass[num/w][num%w]=i+1; else mass[num/w][w-1-num%w]=i+1; a--; num++; } } for(i=0;i<h;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123105/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123105/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdint.h> // uint64_t #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) > (b) ? (b) : (a)) int get_int(void) { int num; scanf("%d", &num); return num; } int64_t get_long(void) { int64_t num; scanf("%lld", &num); return num;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123149/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123149/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 start, ans, diff; int i; int s, t; char S[1000], T[1000]; scanf("%s", S); scanf("%s", T); s = strlen(S); t = strlen(T); ans = 1001; for (start = 0; start <= s - t; start++) { diff = 0; fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123192/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123192/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void) { char S[1000],T[1000]; long int s,t,i,j,count = 0,kekka = 100000000; scanf("%s %s",S,T); s = strlen(S); t = strlen(T); for(i = 0 ; i <= s - t ; i++) { count = 0; for(j = i ; j <= i + t - 1 ; j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123235/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123235/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 STR_MAX 1001 int main(void) { unsigned i, j, ans, best_ans = STR_MAX; char S[STR_MAX], T[STR_MAX]; scanf("%s\n%s", S, T); for (i = 0; i <= strlen(S) - strlen(T); i++) { ans = 0; for (j = 0; j < strlen(T); j++) { if (S[i + j] != T[j]) ans++; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123279/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123279/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ll long long #define SIZE 1e+200000 int main(void) { char s[1001], t[1001]; scanf("%s%s", s, t); int i, j, k; int min = 10000; int count = 0; int slen = strlen(s); int tlen = strlen(t); for (i = 0; i < s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123321/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123321/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]; scanf("%s",s); for(int i = 0; i < strlen(s); i++) { printf("x"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123365/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 readInt(int *x) { scanf("%d", x); return; } void readInts(int n, int arr[]) { int i; for (i=0;i<n;i++) { readInt(&arr[i]); } } void readChar(char *x) { scanf("%c", x); return; } void readChars(char x[]) { scanf("%s", x); return; } void printInts(int n, int *arr) {...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123408/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123408/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]; scanf("%s",&s); for(int i=0;i<strlen(s);i++){ printf("x"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123451/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123451/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[99]; printf("\n"); scanf("%s", a); for(int i=0; i<strlen(a); i++) { printf("x"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123495/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str.1 = private unnamed_a...
#include<stdio.h> #include<string.h> int main() { int i, j; char m[1000], y[1000]; scanf("%s", m); i = strlen(m); for (j = 0; j < i; j++) { printf("x"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123538/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123538/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]; scanf("%s", S); char T[100]; for(int i=0; S[i] != '\0'; i++){ T[i] = 'x'; T[i+1] = '\0'; } printf("%s", T); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123581/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123581/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int i=0; char a[200]; scanf("%s",a); while(a[i]!='\0'){ printf("x"); i++; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123624/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123624/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[101]; int i=0; scanf("%s",s); while(s[i]!='\0'){ s[i]='x'; i++; } i=0; while(s[i]!='\0'){ printf("%c",s[i]); i++; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123668/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[256]; int len; scanf("%s", S); len = strlen(S); char output[256]; int i; for (i = 0; i < len; i++){ output[i] = 'x'; } output[i] = '\0'; printf("%s\n", output); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123718/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123718/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[200]; scanf("%s", s); for (i = 0; s[i]; i++) printf("x"); printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123761/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123761/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <ctype.h> #include <math.h> int main() { int a, b; scanf("%d %d", &a, &b); int mysum; if (a == b) { mysum = a * 2; } else if (a > b) { mysum = a + (a - 1); } else { mysum = b + (b - 1); } pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123811/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123811/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>b) printf("%d",a+a-1); else if(a==b) printf("%d",a*2); else printf("%d",b+b-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123855/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123855/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0; scanf("%d %d", &A, &B); if (A -B>0) { ans= A*2 - 1; } else { if (A - B < 0) { ans = B * 2 - 1; } else { if (A = B) { ans = B * 2; } } } printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123899/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123899/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int sum=0; scanf("%d",&a); scanf("%d",&b); if(a>=b){ sum=sum+a; a=a-1; }else{ sum=sum+b; b=b-1; } if(a>=b){ sum=sum+a; a=a-1; }else{ sum=sum+b; b=b-1; } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123949/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123949/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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==b) printf("%d\n",a + b); else if(b>a) printf("%d\n",b + (b - 1)); else printf("%d\n",a + (a - 1)); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123992/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123992/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int max=0; int i; scanf("%d",&a); scanf("%d",&b); for(i=0;i<2;i++){ if(a>=b) { max=max+a; a=a-1; }else{ max=max+b; b=b-1; } } printf("%d",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124034/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124034/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); if(A < B){ C = B + (B-1); }else if(A > B){ C = A + (A-1); }else{ C = A + B; } printf("%d", C); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124078/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124078/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// AtCoder124-1.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include<stdio.h> #include<string.h> #include<stdlib.h> int main() { int a, b, c; int sum = 0; char input[10001]; char temp; fgets(input, 10000, stdin); a = atoi(strtok(input, " ")); b = atoi(strtok(NULL," ")); sum=a+b; if (a+(a - 1) > sum) { su...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124120/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124120/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include<stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); int total = 0; if(a < b) total += 2 * b - 1; if(a > b) total += 2 * a - 1; if(a == b) total += a + b; printf("%d\n", total); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124164/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124164/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 large_a=0; int large_b=0; int min_1=0; int min_2=0; int max=0; scanf("%d %d",&large_a,&large_b); min_1=large_a-large_b; if(min_1>0) { min_2=min_1-1; if(min_2>0) { max=large_a*2-1; }else { max=large_a+large_b; } }else { min_...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124214/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124214/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int max=0; scanf("%d %d",&a,&b); if(a>=b){ max+=a; if(max-1>b){ max+=max-1; } else if(max-1<=b){ max+=b; } } else if(a<=b){ max+=b; if(max-1>a){ max+=max-1; } else if(max-1<=a){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124258/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124258/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,max=0,i=0,t=0 ; scanf("%d %d",&A,&B); for(i=0;i<2;i++) { if(A>B) { t=A; A=A-1; } else { t=B; B=B-1; } max=max+t; } printf("%d\n",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124300/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124300/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int count=0; scanf("%d %d",&a,&b); for(int i=0;i<2;i++){ if(a>=b){ count+=a; a--; }else{ count+=b; b--; } } printf("%d\n",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124344/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124344/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 intsort(const void *a, const void *b){ return *(int*)a - *(int*)b; /*qsort(a,aの配列数,sizeof(int),intsort);*/ /*} int longsort(const void *a, const void *b){ long *A=(long *)a; long *B=(long *)b; if(*A>*B) return -1; if(*A<*B) return 1;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124388/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124388/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 struct Words { char word[31]; int page[100]; } WORDS; WORDS wordArray[100]; WORDS* printMinWord(WORDS*); WORDS* printMinPage(WORDS*); int main() { char tempWord[31]; int tempPage; int wordCnt; int pageCnt; int inputC...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124430/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124430/source.c" target datalayout = "e-m:e-p270: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.Words = type { [31 ...
#include<stdio.h> #include<math.h> int cplc(int p0[2],int p1[2],int p2[2],int r,double s[2],double t[2]){ int x1=p1[0]-p0[0],y1=p1[1]-p0[1],x2=p2[0]-p0[0],y2=p2[1]-p0[1]; long long a=x1*x1+y1*y1,b=x1*x2+y1*y2,c=x2*x2+y2*y2-r*r; double d=sqrt(b*b-a*c); if(d<0)return 0; s[0]=p0[0]+x1*(b+d)/a; s[1]=p0[1]+y1*(b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124481/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124481/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 1000002 void initary( int * ary, int num ) { int i = 0; for ( i = 0 ; i < num ; i++ ) { *(ary+i) = -1; } } int main() { int p = 0, q = 0, i = 0, j = 0; int extra[MAX]; while ( scanf( "%d %d\n", &p, &q ) != EOF ) { initary( extra, MAX ); // extraには余りの出現した位置を格納するため, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124539/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <stdlib.h> #define REP(i,n) for(i=0;i<(int)(n);++i) #define SIZE 3010//文字列の長さの最大値 int i,j;//for文の添字 int max(int a,int b){//a,bのうち大きい方を返す if(a>b)return a; else return b; } int main(){ //変数の初期化 char s1[SIZE],s2[SIZE]; int ls1=0,ls2=0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124582/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <inttypes.h> #include <stdbool.h> uint64_t P = 1000000007; /* ---------------------------------------------------------------- */ #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <inttypes.h> #include <stdbool.h> #include <string....
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124625/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124625/source.c" target datalayout = "e-m:e-p270: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.llrb_tree_element_t...
#include<stdio.h> int main() { int n,m,a[101],i,j,d; scanf("%d%d", &n, &m); for (i = 1; i <= n; i++) scanf("%d", &a[i]); for (i = 1; i <= m; i++) { for (j = 1; j <= n - 1; j++) { if (a[j] % i > a[j + 1] % i) { d = a[j]; a[j] = a[j + 1]; a[j + 1] = d; } } } for (i = 1; i <= n; i++)printf("%d\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124669/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124669/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sl(x) scanf("%ld", &x) #define ss(x) scanf("%s", x) #define pl(x) printf("%ld\n", x) #define ps(x) printf("%s\n", x) #define INF 100000000000 #define MOD 1000000007 #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124719/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124719/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @path = dso_local local_unn...
#include <stdio.h> #include <stdlib.h> #include <math.h> int main(void){ int N; int c; scanf("%d",&N); int *L=(int*)calloc(N*sizeof(int),N); int count=0; for(int i=0;i<N;i++){ scanf("%d",&c); if(c>0){ for(int j=0;j<count;j++){ if(c==L[j]){ printf("%d\n",i+1); return 0; } } L[cou...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124777/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124777/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> typedef struct WORDBOOK { char word[5000][21]; int count[5000]; int wordcount; } WORDBOOK; WORDBOOK wordbook[26]; void init_words(WORDBOOK *words); void sort_dictionary(WORDBOOK *words, int j); void display_word(WORDBOOK *words, int num); int main(void) { char ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124878/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124878/source.c" target datalayout = "e-m:e-p270: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.WORDBOOK = type { [...
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define FOR(n) for(int i=0;i<n;i++) #define FORJ(n) for(int j=0;j<n;j++) #define PRN(n) printf("%d\n",n) #define PRF(n) printf("%lf\n",n) #define PRL(n) printf("%lld\n",n) #define PRS(s) printf("%s\n",s) #define PRC(c) printf("%c",c) #define INF 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124920/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124920/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int main(){ int t; scanf("%d", &t); if(t>=30)printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124964/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124964/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>=30) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125006/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125006/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 arr[1000]; int main() { int n,s=0,e=0,p=0,c,i,k=0; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&arr[i]); for(i=0;i<n;i++) { if(arr[i]==1) { s=i; break; } } for(i=n-1;i>=0;i--) { if(arr[i]==1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12505/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%d", &n); if( n >= 30 ){ printf("Yes"); } else { printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125093/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125093/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>=30) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125136/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125136/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, j, count; scanf("%d", &n); int a[n]; count=0; for(i=0; i<n; i++) { scanf("%d", &a[i]); } for(i=0; i<n; i++) { if(a[i]==1) count++; if(a[i]==0 && a[i+1]!=0 && a[i-1]!=0 && i!=0 && i!=n-1) count++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12518/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12518/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf ("%d",&a); if(a>=30){ printf("Yes"); }else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125222/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125222/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int X; scanf("%d",&X); if(X>=30) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125266/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125266/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> void main(){ int x; scanf("%d",&x); if(x >=30)printf("Yes\n"); else printf("No\n"); return; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125309/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125309/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int X; scanf("%d", &X); if(X >= 30) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125352/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125352/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int a; scanf("%d", &a); if (a >= 30) printf("Yes\n"); else printf("No\n"); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125396/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125396/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 bubble_sort(int *data, int *num, int n) { int i, j; for (i = 0; i < n - 1; i++){ for (j = 0; j < n - i - 1; j++){ if (data[j] < data[j + 1]){ data[j] ^= data[j + 1]; data[j + 1] ^= data[j]; data[j] ^= data[j + 1]; num[j] ^= num[j + 1]; num[j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125468/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125468/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#pragma region kyopuro_templates #pragma GCC optimize("Ofast") #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> #include<assert.h> #include<time.h> #include<ctype.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125510/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125510/source.c" target datalayout = "e-m:e-p270: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_AVL_set = type...
#include<stdio.h> int main() { int N,M,A[1005],B,i,j,V[1005]={0}; scanf("%d%d",&N,&M); for(i=0;i<N;i++)scanf("%d",&A[i]); for(i=0;i<M;i++) { scanf("%d",&B); for(j=0;A[j]>B;j++); V[j]++; } for(i=B=0;i<N;i++)B=V[i]>V[B]?i:B; printf("%d\n",B+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125561/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125561/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,M,i,j,k,l,m,n,comp,A[1000],B[1000],V[1000],Max=0; scanf("%d %d",&N,&M); for(i=0;i<N;i++) scanf("%d",&A[i]); for(j=0;j<M;j++) scanf("%d",&B[j]); for(k=0;k<N;k++) V[k]=0; for(l=0;l<M;l++){ for(m=0;m<N;m++){ if(A[m]<=B[l]) {V[m]++;break;} } } for(n=0;n<N;n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125619/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define ll long long //gcdやり直す void swap (int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } /*** * pivotを決め、 * 全データをpivotを境目に振り分け、 * pivotの添え字を返す ***/ int partition (int array[], int left, int right) { int i,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125662/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a, b, c, d; char str[1001]; fgets(str, 1001, stdin); a = 0; for (a = 0; str[a] != '\0'; a++) { if (str[a] == 'a' && str[a + 1] == 'p' && str[a + 2] == 'p' && str[a + 3] == 'l' && str[a + 4] == 'e') { str[a] = 'p'; str[a + 1] = 'e'; str[a + 2] = 'a'; str[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125712/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125712/source.c" target datalayout = "e-m:e-p270: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> #define N 1010 int main(void){ int i,num; char ch[N]; for(i=0;scanf("%c",&ch[i])==1;i++){} num=i; for(i=0;i<num;i++){ if(ch[i]=='a' && ch[i+1]=='p' && ch[i+2]=='p' && ch[i+3]=='l' && ch[i+4]=='e'){ ch[i]='p'; ch[i+1]='e'; ch[i+2]='a'; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125770/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125770/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[11]; scanf("%s", s); int flag = 0; for (int i = 0; i < strlen(s); i++) { if (strlen(s) %2== 1) { printf("No"); return 0; } if (i % 2 == 0) { if (s[i] != 'h') { printf("No"); return 0; } } else if (s[i] != 'i') { printf("No"); retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125813/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[10]; scanf("%s",s); if((strcmp(s,"hi")==0)) printf("Yes\n"); else if((strcmp(s,"hihi")==0)) printf("Yes\n"); else if((strcmp(s,"hihihi")==0)) printf("Yes\n"); else if((strcmp(s,"hihihihi")==0)) printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125857/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<limits.h> #include<math.h> #include<string.h> #include<time.h> typedef long long int ll; int int_comp(const void*a,const void*b){return *(int*)a-*(int*)b;} void yes(){printf("Yes\n");} void no(){printf("No\n");} int main(void) { char s[11]; int flg=0; int cnt=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125907/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125907/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str.2 = private unnamed_a...
#include <stdio.h> int main(void) { int N,Y,i,j,a = 0; scanf("%d%d",&N,&Y); for(i = 0;i <= N;i++){ for(j = 0;j + i <= N;j++) if((N-i-j)*1000 + i*10000 + j*5000 == Y){ printf("%d %d %d",i,j,N-i-j); a = 1; break; } if(a == 1)break; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125950/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125950/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d%d", &n, &y); y /= 1000; for (int i = 0; i <= n; i++) { for (int j = 0; j <= n-i; j++) { if (9 * i + 4 * j == y - n) { printf("%d\t%d\t%d", i, j, n - i - j); return 0; } } } printf("-1 -1 -1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125994/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d",&n,&y); int a = -1; int b = -1; int c = -1; int i,j; int x_man,y_thou,z_thou; for(i=0;i<=n;i++){ x_man = i * 10000; for(j=0;j<=n;j++){ y_thou = j * 5000; z_thou = (int)(y - x_man - y_thou)/1000; if(z_thou >= 0){ if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126036/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126036/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 prime[15] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47}; int n,m,i; scanf("%d %d",&n,&m); for(i=0;i<14;i++){ if(prime[i] == n && prime[i+1] == m){ printf("YES\n"); return 0; } } printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12608/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12608/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> enum STATUS {NOTFIN, FIN}; int main(){ int n, y; enum STATUS s = NOTFIN; int result[3], p0, p1, p2; scanf("%d %d", &n, &y); if(n < 1 || 2000 < n || y < 1000 || 20000000 < y || (y%1000)) return 1; for(p0 = 0; p0 <= n + 1; p0++){ if(s == NOTFIN){ for(p1 = 0; p1 <= n - p0; p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126122/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126122/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int n,y; int main() { int i,j,k; scanf("%d%d",&n,&y); for(i=0;i<=n;i++) for(j=0;j<=n;j++) for(k=0;k<=n,i+j+k<=n;k++) if(i+j+k==n&&i*10000+j*5000+k*1000==y) {printf("%d %d %d\n",i,j,k); return 0;} printf("-1 -1 -1 \n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126166/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Y, N, y, r, a, b, c, A[100], B[100], C[100], i = 1; scanf("%d %d", &N, &Y); A[1] = -1; if(Y % 1000 != 0){ printf("-1 -1 -1\n"); } else{ y = Y / 1000; r = y % 5; for(c = r; c <= N; c = c + 5){ a = (y + 4 * c) / 5 - N; b = 2 * N - (y + 9 * c) / 5; if(a >= 0 ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126216/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126216/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h ,w ; int mx[] = { 1 ,1 ,1 ,-1 ,-1 ,-1 ,0 ,0 } ; int my[] = { 1 ,-1 ,0 ,1 ,-1 ,0 ,1 ,-1 } ; char castle[ 1000 ][ 1000 ] ; char castles[ 1000 ][ 1000 ] ; char sand[ 1000 ][ 1000 ] ; int del[ 999 * 999 ][ 2 ] ; int DEL ; #define x j + mx[ k ] #define y i + my[ k ] #define dy [ 0 ] #defin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126281/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126281/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mx = dso_local local_unnam...
#include<stdio.h> int main(void){ int n,i,j; int a[101]; long long dp[101][21]={0}; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); dp[0][a[0]] = 1; for(i=1;i<n-1;i++){ for(j=0;j<21;j++){ if(j-a[i]>=0) dp[i][j] = dp[i-1][j-a[i]]; } for(j=0;j<21-a[i];j++){ dp[i][j] += dp[i-1][j+a[i]]; } }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126324/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126324/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 m,n; int i,j; int a[100010]; int b[100010]; scanf("%d%d",&m,&n); for(i=1;i<=m;i++) { scanf("%d",&a[i]); } for(i=1;i<=m;i++) { scanf("%d",&b[i]); } if(a[1]==0)printf("NO\n"); else { if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12639/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 gcd(int a,int b) { int r=a%b; while(r!=0){ a=b; b=r; r=a%b; } return b; } int main(void) { int k,h,i,j,t=0; scanf("%d", &k); for(h=1;h<=k;h++){ for(i=1;i<=k;i++){ for (j=1;j<=k;j++){ t+=gcd(gcd(h,i),j); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126432/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126432/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int K; scanf("%d",&K); long int ans = 0; for(int a = 1;a <= K;a++){ for(int b = 1;b <= K;b++){ for(int c = 1;c <= K;c++){ int r,tmp; //a,b int a_copy = a,b_copy = b,c_copy; int g_ab; if(a_copy < b_copy){ tmp = a_copy; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126476/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126476/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int gcd(int a,int b){ if(b==0) return a; return gcd(b,a%b); } int gcd2(int a,int b,int c){ int t; t=gcd(a,b); return gcd(t,c); } int main(void){ int n,i,j,k,t=0; scanf("%d",&n); for(i=1;i<=n;i++){ for(j=1;j<=n;j++){ for(k=1;k<=n;k++){ t+=gcd2(i,j,k); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126519/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126519/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define lop(i, n) for(i=0; i<n; i++) int gcd( int a, int b ) { int temp; if( a < b ) { temp = a; a = b; b = temp; } if( b < 1 ) return -1; if( a % b == 0 ) return b; return gcd( b, a % b ); } int main() { int k, a, b, c; long int sum=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126577/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126577/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <assert.h> #include <limits.h> #include <math.h> #include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main() {int n,s,c=0; scanf("%d%d",&n,&s); int a[n],b[n]; for(int i=0;i<n;i++) scanf("%d",&a[i]); for(int i=0;i<n;i++) scanf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12662/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> typedef long long int64; int gc(int a, int b) { int tmp, r; if (a < b) { tmp = a; a = b; b = tmp; } r = a % b; while (r != 0) { a = b; b = r; r = a % b; } return b; } int gcd(int a, int b, int c) { return gc(a, gc(b,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126663/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126663/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int gcd(int x, int y) { int t; while (y != 0) { t = x % y; x = y; y = t; } return x; } int main(){ int k; long sum; scanf("%d",&k); sum = 0; for(int a=1;a<=k;a++){ for(int b=1;b<=k;b++){ for(int c=1;c<=k;c++){ sum+=gcd(gcd(a,b),c); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126706/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126706/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main() { int n,i,j,count1,count2,b[100]; char a[100][100]; while(~scanf("%d",&n)){ getchar(); memset(b,0,sizeof(b)); for(i=0;i<n;i++){ for(j=0;j<n;j++) scanf("%c",&a[i][j]); getchar(); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12675/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12675/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,*p; unsigned long sum_time,inclusive_sum; int i,j,temp; while (1) { scanf("%d",&n); if (n == 0)break; int wait_time[n]; inclusive_sum = 0; sum_time = 0; p = wait_time; for (i = 0; i < n; i++) scanf("%d",&wait_time[i]); for (i = 0; i < n; i++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126793/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126793/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <assert.h> typedef int64_t ll; typedef uint64_t ull; 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)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126836/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126836/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cmp(const void *p, const void *q) { return *(long *)p - *(long *)q; } long Abs(long); int main (void){ long N,i,j,tmp; long b=0; long ans=0; scanf("%ld",&N); long A[N]; for(i=0;i<N;i++){ scanf("%ld",&tmp); tmp -= (i+1); A[i] = tmp; } qsort(A,N,sizeof(long),...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126908/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126908/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// AOJ 099: Surf Smelt Fishing Contest II // 2019.9.29 bal4u #include <stdio.h> #include <stdlib.h> #if 1 int getchar_unlocked(void); int putchar_unlocked(int c); #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #define gc() getchar() #define pc(c) putchar(c) #endif int in() { // 整数の入力 int n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126959/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126959/source.c" target datalayout = "e-m:e-p270: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.QUE = type { i32, i...
#include <stdio.h> int main(void) { int i=0; char s[10001000]; scanf("%s",s); if(s[0]==' ') return 0; while(s[i]!='\0') { printf("%c",s[i]); i=i+2; } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127000/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127000/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[110000],t[55000]; scanf("%s", s); int ind=0; for(int i=0;s[i]!='\0';i+=2){ t[ind]=s[i]; ind++; } printf("%s\n",t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127044/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127044/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n=0; char s[100000]; scanf("%s",s); while(s[n]!='\0'){ n++; } for(i=0;i<n;i=i+2){ printf("%c",s[i]); } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127095/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127095/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define inf 1072114514 #define llinf 1145141919810364364 #define mod 1000000007 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int zt(int a,int b){return max(a,b)-min(a,b);} int round(int a,int b){if((a%b)*2 >=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127145/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127145/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100001]; int n; int i; scanf("%s", s); n = strlen(s); for ( i=0; i<n; i+=2 ) { putchar(s[i]); } putchar('\n'); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127196/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127196/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c[100005]; int asc(const void *a, const void *b) { return c[*(int *)b] - c[*(int *)a]; } int main() { int n; scanf("%d", &n); int i; int a[100005], b[100005]; for (i = 0; i < n; i++) scanf("%d %d", &a[i], &b[i]); for (i = 0; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127239/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127239/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @c = dso_local local_unname...
#include<stdio.h> #include<string.h> #include<math.h> int main() { int i,r,c,j,cnt=0; int col[50]={0}; int row[50]={0}; int mat[50][50]; char temp[50]; int l; scanf("%d%d",&r,&c); for(i=0;i<r;i++) { scanf("%s",temp); for(j=0;j<c;j++) { mat[i][j]=t...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12729/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12729/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...