Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #define num_element 256 int main(void) { int i,n,m; char array[num_element]; char a[2]; char b[2]; char input[2]; while(1) { for(i=0;i<num_element;i++) { array[i] = i; } scanf("%d",&n); if(n == 0)return 0; for(i=0;i<n;i++) { scanf("%s %s",a,b); array[a[0]] = b[0]; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175525/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ch, C; for(;;){ scanf("%c",&ch); if(ch == '\n'){ break; } else if(ch == ' '){ printf(" "); } else if('A' <= ch && ch <= 'Z'){ C = ch + 32; printf("%c",C); } else if('a' <= ch && ch <= 'z'){ C = ch - 32; printf("%c",C); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175569/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175569/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <ctype.h> int main() { int i; //Input int ch; char s[1200]; for( i = 0; (ch = getchar()); ++i ){ if( ch == '\n' ){ s[i] = '\0'; break; } else s[i] = ch; } //Processing for( i = 0; s[i]; ++i ){ if( isalpha(s[i]) ){ if( isl...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175633/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175633/source.c" target datalayout = "e-m:e-p270: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 <ctype.h> int main(void){ char c; for (;;){ scanf("%c", &c); if (isupper(c) != 0){ printf("%c", tolower(c)); }else{ printf("%c", toupper(c)); } if (c == '\n'){ break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175677/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175677/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int gcd(long long int a, long long int b) { if (a == b) return a; if (a > b) return gcd(a-b, b); return gcd(a, b-a); } int main() { long long int n, m , z; scanf("%lld %lld %lld", &n, &m, &z); long long int max = m > n ? m : n; long long int min = m < n ? m : ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17572/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17572/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <ctype.h> int main(void) { char s[1200]; int i = 0; char c; while ((c = getchar()) != EOF) { char u_c, l_c; u_c = toupper(c); l_c = tolower(c); if (c != u_c) s[i] = u_c; else if (c != l_c) s[i] = l_c; else s[i] = c; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175770/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175770/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <ctype.h> int main() { char str[1200]; char c; int i=0; while(1) { scanf("%c",&c); if(c== '\n' ) break; if(isupper(c)) str[i]=tolower(c); else { str[i]=toupper(c); } i++; } str[i] = '\0'; printf("%s\n", str); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175835/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175835/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 txt; while(1){ scanf("%c",&txt); if(txt>96 && txt<123)txt-=32; else if(txt>64 && txt<91)txt+=32; printf("%c",txt); if(txt=='\n')break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175886/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175886/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char a[1201]; fgets(a, 1200, stdin); for(x = 0; a[x] != 0x00; x++){ if(('A' <= a[x]) && (a[x] <= 'Z')){ a[x] |= 0x20; }else if(('a' <= a[x]) && (a[x] <= 'z')){ a[x] &= 0xdf; }else{ } } printf("%s", a); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_175936/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_175936/source.c" target datalayout = "e-m:e-p270: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 n, temp, i; scanf("%d", &n); int arr[n+1]; for(i = 1; i <= n; i++) scanf("%d", &arr[i]); for(i = 1; i <= n/2; i = i + 2){ temp = arr[i]; arr[i] = arr[n - i + 1]; arr[n - i + 1] = temp; } for(i = 1; i <= n; i++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17598/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17598/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 exchange(char c) { if('A' <= c && c <= 'Z') { return c + ('a' - 'A'); } /* 同様に c が小文字なら大文字に変換する条件を追加 */ else if ('a' <= c && c <= 'z') { return c - ('a' - 'A'); } return c; } int main(void) { int i, len; char s[4096]; /* 1200バイト以上 */ // scanf("%s", s) は セキ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176021/source.c" target datalayout = "e-m:e-p270: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 c; while (1) { c = getchar(); if (c == EOF) break; if ('A' <= c && c <= 'Z') putchar(c + 0x20); else if ('a' <= c && c <= 'z') putchar(c - 0x20); else putchar(c); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176065/source.c" target datalayout = "e-m:e-p270: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 <string.h> int main(){ char ch; do { scanf("%c", &ch); if(ch >= 'A' && ch <= 'Z') { ch = ch + 32; } else if (ch >= 'a' && ch <= 'z') { ch = ch - 32; } printf("%c", ch); } while (ch != '\n'); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176151/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ char str[1201] ; scanf("%[^\n]" , str) ; int p = 0 ; while(str[p] != '\0'){ p++; } for(int i = 0 ; i < p ; i++){ if(str[i] >= 'a' && str[i] <= 'z'){ str[i] = str[i] - 32; } else if(str[i] >= 'A' && str[i] <...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176195/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176195/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 word; while(scanf("%c", &word) != EOF) { if('a' <= word && word <= 'z') { word = word - 'a' + 'A'; } else if('A' <= word && word <= 'Z') { word = word - 'A' + 'a'; } printf("%c", word); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176238/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176238/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ch; //入力・変換・出力部分 while(1){ scanf("%c",&ch); if(ch>='A' && ch<='Z')ch+=32; else if(ch>='a' && ch<='z')ch-=32; printf("%c",ch); if(ch=='\n')break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176281/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176281/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1200]={}; int i=0; while(1){ scanf("%c", &a[i]); if (a[i]==0){ break; } else if (a[i]>='a' && a[i]<='z'){ a[i]=a[i]-32; } else if(a[i]>='A' && a[i]<='Z'){ a[i]=a[i]+32; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176324/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176324/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h, w, k; char map[8][8]; int i, j, mh, mw, b, ans = 0; scanf("%d%d%d", &h, &w, &k); for (i = 0; i < h; i++) { scanf("%s", map[i]); } for (mh = 0; mh < 1<<h; mh++) { for (mw = 0; mw < 1<<w; mw++) { b = 0; for (i = 0; i < h; i++) { for (j = 0; j < w;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176368/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, K; scanf("%d %d %d", &H, &W, &K); char m[H * W]; for (int i = 0; i < H * W; i++) { scanf(" %c", &m[i]); } int count = 0; for (int h = 0; h < 1 << H; h++) { for (int w = 0; w < 1 << W; w++) { int black = 0; for (int i = 0; i < H; i++) { for (int j = 0; j < ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176410/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176410/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]; scanf("%s",s); if(s[0]!=s[1] && s[0]!=s[2] && s[1]!=s[2]) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]; int a=0,b=0,c=0,i; scanf("%s",s); for(i=0;i<3;i++){ if(s[i]=='a') a++; if(s[i]=='b') b++; if(s[i]=='c') c++; } if(a==1&&b==1&&c==1) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176504/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176504/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 judge=0; char s[3]; scanf("%s",s); if(s[0]=='a'){ if(s[1]=='b'){ if(s[2]=='c') judge=1; }else if(s[1]=='c'){ if(s[2]=='b') judge=1; } }else if(s[0]=='b'){ if(s[1]=='a'){ if(s[2]=='c') judge=1; }else if(s[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176548/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176548/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x[10]; scanf("%s",x); if(x[0] == x[1] || x[1] == x[2] || x[2] == x[0]){ printf("No"); }else{ printf("Yes"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176591/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]; scanf("%s",s); int l[3]={0}; for(int i=0;i<3;i++){ l[s[i]-'a']++; } printf("%s\n",(l[0]==1 && l[1]==1 && l[2]==1)?"Yes":"No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176634/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176634/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Ac=0,Bc=0,Cc=0,i; char S[3]; scanf("%s",S); for(i=0;i<3;i++){ if(S[i] == 'a') Ac++; if(S[i] == 'b') Bc++; if(S[i] == 'c') Cc++; } if(Ac==1 && Bc==1 && Cc==1){ printf("Yes\n"); }else{ printf("No\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176685/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176685/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3]; int a = 0, b = 0, c = 0; scanf("%s\n", s); if(s[0] == 'a') a++; if(s[0] == 'b') b++; if(s[0] == 'c') c++; if(s[1] == 'a') a++; if(s[1] == 'b') b++; if(s[1] == 'c') c++; if(s[2] == 'a') a++; if(s[2] == 'b') b++; if(s[2] == 'c') c++; if(a == 1 &...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176735/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 asc(const void *n, const void *m){ return *(long long*) n-*(long long*)m; } long long gcd(long long x,long long y){ if(x%y==0) return y; else return gcd(y,x%y); } int main(void){ long long n,i,j; scanf("%lld",&n); long long a[n]; for(i=0;i<n;i++) sc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176786/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176786/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 gdc(int a, int b){ if(a==0 || b==0){ return (a+b); } if(a>b){ return gdc(a%b, b); }else{ return gdc(a, b%a); } } int main(){ int N; int A[100000]; int i, j; int a,b; scanf("%d", &N); for(i=0; i<N; i++){ scanf("%d", &A...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176829/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176829/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int main(void) { int N; int ans; int A[100000]; scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d",&A[i]); } for (int i = 0; i < N - 1; i++) { ans = gcd(A[i], A[i + 1]); A[i + 1] = ans; } printf("%d\n",ans); return 0; } int gcd(int a,int b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176872/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176872/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cnt; int N; int A; int i; int min = 0; int tmp; cnt = scanf("%d", &N); cnt = scanf("%d", &min); for (i=1; i<N; i++) { cnt = scanf("%d", &A); while(1) { if (min > A) { tmp = min; min = A; A = tmp; } if ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176915/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176915/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 df 0 typedef struct{ int x; int y; }pair; int c(const void* a,const void* b){ if(((pair*)a)->x>((pair*)b)->x) return 1; if(((pair*)a)->x<((pair*)b)->x) return -1; if(((pair*)a)->y>((pair*)b)->y) return 1; if(((pair*)a)->y<((pair*)b)->y) return -1; return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176966/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176966/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pair = type { i32, ...
#include<stdio.h> #include<string.h> int main(void){ int i; int a=-1, b=-1; int len; char str[100000]; scanf("%s", str); len = strlen(str); for(i = 0; i + 1 < len; i++){ if(str[i] == str[i+1]){ a = i+1; b = i+2; break; } else if(i+2!=len && str[i]==str[i+2]){ a = i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177008/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177008/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define N 10000000 int main(void) { int i, n, s, t, ans; static int check[N] = {0}; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &s); check[s] = 1; } scanf("%d", &n); ans = 0; for (i = 0; i < n; i++) { scanf("%d", &t); if (check[t] == 1) { ans++; } } printf("%d\n",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177051/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177051/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @main.check = internal unna...
#include <stdio.h> int hairetu[10000001]={}; int main(void){ int cnt=0,i,n,q,s,t; scanf("%d",&n); for(i = 0;i < n;i++){ scanf("%d",&s); if(hairetu[s]==0){ hairetu[s]+=1; } } scanf("%d",&q); for(i = 0;i < q;i++){ scanf("%d",&t); if(hairetu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177101/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177101/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @hairetu = dso_local local_...
#include <stdio.h> #include <stdlib.h> int binarySearch( int ); // 見つかったら1、見つからなかったら0を返す int compare( const void *, const void * ); int n, S[ 100000 ]; int main( void ) { int i, q, tmp, C = 0; scanf( "%d", &n ); for ( i = 0; i < n; i++ ) scanf( "%d", &S[ i ] ); qsort( S, n, sizeof(int), &compare ); scanf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177145/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177145/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <stdbool.h> typedef long long LL; typedef long double Lf; #define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++) #define rep(i,n)Rep(i,0,n) #define Ma(x,y) ((x)>(y)?(x):(y)) #define mi(x,y) ((x)<(y)?(x):(y)) #define MOD 1000000007 int a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177217/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MOD 1000000009+7 int main(){ int N,i,j,ans=0,tmp; scanf("%d",&N); int a[N],b[N],c[N],d[N]; for(i=0;i<N;i++){ scanf("%d %d",&a[i],&b[i]); } for(i=0;i<N;i++){ scanf("%d %d",&c[i],&d[i]); } for(i=0;i<N-1;i++){ for(j=0;j<N-i-1;j++){ if(a[j]>a[j+1]){ tmp=a[j]; a[j]=a[j+1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177318/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177318/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, ch, count[ 4 ] = {}, min; while ( ( ch = getchar() ) != EOF ) switch ( ch ) { case 'K': count[ 0 ]++; break; case 'U': count[ 1 ]++; break; case 'P': count[ 2 ]++; break; case 'C': count[ 3 ]++; break; } min = count[ 3 ]; for ( i = 3; i--; ) if ( co...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177369/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177369/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); if (a<1 && b>-1) printf("Zero\n"); else if (a > 0) printf("Positive\n"); else if ((b - a) % 2 == 0) printf("Negative\n"); else printf("Positive\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177411/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177411/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { long long a, b; scanf("%lld%lld", &a, &b); if (a<=0 && b>=0) printf("Zero\n"); else if (a>0) printf("Positive\n"); else { if ((b-a+1)%2==0) printf("Positive\n"); else printf("Negative\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177455/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177455/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while( scanf("%d %d", &a, &b) != EOF ){ printf("%d\n", a + b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177499/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177499/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while(scanf("%d%d",&a,&b)!=EOF){ printf("%d\n",a+b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177541/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177541/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while( scanf("%d %d", &a, &b) != EOF ){ printf("%d\n", a + b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177585/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177585/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while( scanf("%d %d", &a, &b) != EOF ){ printf("%d\n", a + b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177628/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177628/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while( scanf("%d %d", &a, &b) != EOF ){ printf("%d\n", a + b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177693/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177693/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while(1){ scanf("%d %d",&a,&b); if(feof(stdin))break; printf("%d\n",a+b); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177743/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177743/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,B; int main() { while(scanf("%d%d",&A,&B)==2) { printf("%d\n",A+B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177794/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177794/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while( scanf("%d %d", &a, &b) != EOF ){ printf("%d\n", a + b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177844/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177844/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,h,i,j,jnk; scanf("%d%d",&h,&w); char str[h][w]; jnk=getchar(); for(i=0;i<h;i++){ for(j=0;j<w;j++) str[i][j]=getchar(); jnk=getchar(); } for(i=0;i<=w+1;i++) printf("#"); printf("\n"); for(i=0;i<h;i++){ printf("#"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177888/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177888/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define N 100 int main() { int h, w, w_; scanf("%d%d", &h, &w), w += 2; w_ = w; while (w--) printf("#"); printf("\n"); while (h--) { static char s[N + 1]; scanf("%s", s); printf("#%s#\n", s); } while (w_--) printf("#"); printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177938/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177938/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { char str[100][101] = {0}; int h = 0, w = 0; int i;//forのループ scanf("%d%d", &h, &w); for(i=0; i<h; i++){ scanf("%s", str[i]); } //一番上の行 for(i=1; i<=w+2; i++){ printf("#"); } printf("\n"); for(i=0; i<h; i++){ printf("#"); printf("%s", str[i]); p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177996/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177996/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main() { int n,m,v,i,j; while(scanf("%d%d",&n,&m)!=EOF) { char a[n+2][m+2]; v=(n+2)*(m+2); memset(a,'#',sizeof(char)*v); for(i=1;i<n+1;i++) { for(j=1;j<m+1;j++) { scanf("\n%c",&a[i][j]); } } for(i=0;i<n+2;i++) { for(j=0;j<m+2;j++) { prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178067/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178067/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h,w; char a[101][101]; scanf( "%d %d",&h,&w ); for( i = 0; i < h; i++ ){ scanf( "%s", &a[i][0] ); } for( i = 0; i < w + 2; i++ ){ printf("#"); } printf("\n"); for( i = 0; i < h; i++){ printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178117/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178117/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ // Here your code ! int h,w; char a; int i; int j; scanf("%d %d", &h, &w); for( i = 0; i < h + 2; ++i){ for( j = 0; j < w + 2; ++j ){ if( i == 0 || i == h+1 || j == 0 || j == w+1 ){ printf("#"); }else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178160/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p = 0; int pmin[1000] = { 0 }; int pminmax = 0; int n = 1, k = 1; int i = 0, j = 0; int sum = 0; int swap = 0; scanf("%d %d", &n, &k); scanf("%d", &p); pmin[0] = p; pminmax = p; for (i = 1; i < k; i++) { scanf("%d", &p);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178203/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178203/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define N 1000 int main(void) { int i,j,n_fruit,k_fruit,price=0,fruit[N],temp; scanf("%d%d",&n_fruit,&k_fruit); for(i=0;i<n_fruit;i++){ scanf("%d",&fruit[i]); } for(i=0;i<n_fruit;i++){ for(j=i+1;j<n_fruit;j++){ if(fruit[i]>fruit[j]){ temp = fruit[i]; fruit[i] = fruit[j]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178247/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178247/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ //文字読み取る配列を定義(string) int N,K; int *p; int i,j,atoi; //counter //文字読み取り scanf("%d %d",&N,&K); //printf("%d,%d\n",N,K); //空白ごとに区切って変数に代入(種類、取るやつ) p = (int *)malloc(N * sizeof(char)); for(i=0;i<N;i++) scanf("%d",&p[i]); //printf("これだよ:%d",*p); for(i=0;i<N-1;i++){ f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178290/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178290/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 comp(const void * a, const void * b){ return (*(int*)a - *(int*)b); } int main(){ int n,k,p[1010],i,j,w,soma=0; scanf("%d %d",&n,&k); for(j=0;j<n;j++){ scanf("%d",&p[j]); } // preciso de um for p percorrer ate o k qsort(p,n,sizeof(int),c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178333/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178333/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n,k; int a[1000]; int b[1]; int sum=0; scanf("%d %d",&n,&k); for(int i=0;i<n;i++){ scanf("%d",&a[i]); } for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ if(a[i]>a[j]){ b[0]=a[i]; a[i]=a[j]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178377/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178377/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int t; scanf("%d",&t); while(t--) { long long int d,n,c=0; scanf("%lld",&n); if(n<2050) printf("-1\n"); else if(n==2050) printf("1\n"); else { if((n%2050)!=0) pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17842/source.c" target datalayout = "e-m:e-p270:32:32-p271: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) { unsigned long int a, b, c[1000], temp; unsigned long int sum = 0; int i, j; scanf("%ld%ld", &a, &b); for (i = 0; i < a; i++) { scanf("%ld", &(c[i])); } for (i = a - 1; i > 0; i--) { for (j = 0; j < i; j++) { if (c[j] > c[j + 1]) { temp = c[j]; c[j] = c[j + 1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178470/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178470/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<ctype.h> int main() { int n,k,i,j; scanf("%d %d",&n,&k); int num[n]; for(i=0;i<n;i++) { scanf("%d",&num[i]); } int swap; for(i=0;i<n;i++) { for(j=0;j<i;j++) { if(num[i]<num[j]) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178513/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178513/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 M; scanf("%d", &M); printf("%d\n", 48 - M); fflush(stdout); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178564/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178564/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_178838/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178838/source.c" target datalayout = "e-m:e-p270: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> #include <string.h> #include <math.h> #define rep(i,l,n) for(i=l;i<n;i++) void print(char str[],int a,int b){ int i; rep(i,a,b+1) printf("%c",str[i]); printf("\n"); } void reverse(char str[],int a,int b){ int i; char str2[1010]; rep(i,0,b-a+1) str2[a+i]=str[b-i]; rep(i,a,b+1) str[i]=str2[i];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178939/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178939/source.c" target datalayout = "e-m:e-p270:32: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> #include<string.h> int main(void) { int q,a,b,i,j,num; char str[1001],S[8],C[1001]; scanf("%s",str); scanf("%d",&q); for(j=0;j<1001;j++){if(str[j]=='\0'){break;}} num=j; for(i=0;i<q;i++) { for(j=0;j<1001;j++){C[j]='\0';} scanf("%s %d %d",S,&a,&b); if(!strcmp(S,"print")){ for(j=a;j<=b;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178997/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1001],com[20],p[1001],tmp; int i,j,q,a,b; scanf("%s",s); scanf("%d",&q); for(i=0;i<q;i++){ scanf("%s %d %d",com,&a,&b); if(strcmp(com,"replace")==0){ scanf("%s",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179053/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179053/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <string.h> #include <stdio.h> void print(char str[1000], int a, int b){ int i; for(i=a; i<=b; i++){ printf("%c",str[i]); } printf("\n"); } void reverse(char str[1000], int a, int b){ int i; char copy[1000]; strcpy(copy,str); for(i=0; i<=b-a; i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179103/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179103/source.c" target datalayout = "e-m:e-p270:32: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> #include <string.h> int main(void){ char str[1001],order[8]; char temp,rep[1001]; int i,j,k,l,n; int a,b; scanf("%s",str); scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s %d %d",order,&a,&b); if(strcmp(order,"print")==0){ for(j=a;j<=b;j++){ printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179147/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179147/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 argc, char const *argv[]) { char str[1001]; int q; scanf("%s", str); scanf("%d", &q); for (int i = 0; i < q; i++) { char order[8]; int a, b; scanf("%s", order); scanf("%d %d", &a, &b); if (strcmp(order, "...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179190/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179190/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 void func_print(char string[], int start, int end) { for (int i = start; i <= end; i++) { printf("%c", string[i]); } printf("\n"); } void func_reverse(char string[], int start, int end) { // printf("TEST : %d %d\n", start, end); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179233/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179233/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.replace = pri...
#include <stdio.h> #include <string.h> char t1[1510]; char t2[1510]; char t3[1510]; int main(){ int n; int a,b; int i,j; char t; scanf("%s",&t1); scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",&t3); if(strcmp(t3,"replace")==0){ scanf("%d %d %s",&a,&b,&t2); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179284/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179284/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[1001]; // input; input string , 1<=length<=1000 int n=0; // input; command times, 1<=n<=100 int a=0, b=0; char* p_str=str; // string pointer char cpy[1001]; int i=0, j=0; // loop index scanf("%s", str...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179327/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179327/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define N 9 void Check1(int); void Check2(int); void Check3(int, int); int data[N][N]; char correct[N][N]; int main(){ int i, j, k, n; scanf("%d", &n); for(k=0; k<n; k++){ for(i=0; i<N; i++){ for(j=0; j<N; j++){ scanf("%d", &data[i][j]); correct[i][j] = ' '; } } f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179378/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179378/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 l; char s[1001]; scanf("%[^\n]",s); l = strlen(s); if(s[l-1]=='s'){ printf("%ses\n",s); } else{ printf("%ss\n",s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179428/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179428/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 input[1002]; scanf("%s", input); int len = strlen(input); if( input[len-1] == 's'){ input[len] = 'e'; input[len+1] = 's'; input[len + 2] = '\0'; }else{ input[len] = 's'; input[len + 1] = '\0'; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179493/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179493/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 mod 1000000007 #define max(p,q)((p)>(q)?(p):(q)) ll powe(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;} int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;} void...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179536/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179536/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { double n; int ni; int s[4]; int i; while (1){ scanf("%lf", &n); if (n < 0){ break; } ni = n; if (ni > 255){ printf("NA\n"); continue; } s[0] = s[1] = s[2] = s[3] = 0; n -= ni; n *= 2; if (n >= 1){ s[0] = 1; n = n - (int)n; } n *= 2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179594/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179594/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sosu(int ); int sosu(int nyuu){ int i; int count = 0; for(i = 0; i <= nyuu;i++){ if(i % 7 == 6 || i % 7 == 1){ if(nyuu % i == 0){ count++; } } } if(count == 2){ return nyuu; } else { return 0; } } int main() { int nyuuryoku; int i,j,k; int ans; while(1){ scanf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179651/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179651/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; long tt,t,pt,cnt=0; scanf("%d %ld",&n,&tt); scanf("%ld",&pt); cnt+=tt; for(int i=1;i<n;i++){ scanf("%ld",&t); cnt+=tt; if(t-pt<tt) cnt-=tt-(t-pt); pt=t; } printf("%ld\n",cnt); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179701/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179701/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#define _CRT_SECURE_NO_WARNINGS #include <ctype.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define true 1 #define false 0 char s[51]; char origin[10] = "AKIHABARA"; int origin_num = 0; int main() { for (int i = 0; i < 51; i++) { s[i] = '0'; } scanf("%s", s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179752/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179752/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @origin = dso_local local_u...
#include <stdio.h> int main(void){ int line[10][7]={{0,1,1,1,1,1,1},{0,0,0,0,1,1,0},{1,0,1,1,0,1,1},{1,0,0,1,1,1,1},{1,1,0,0,1,1,0},{1,1,0,1,1,0,1},{1,1,1,1,1,0,1},{0,1,0,0,1,1,1},{1,1,1,1,1,1,1},{1,1,0,1,1,1,1}}; int num,i,kazu; while(1){ int map[7]={0}; scanf("%d",&num); if(num ==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179796/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179796/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.line = privat...
#include <stdlib.h> #include <stdio.h> #define MAXN 100000 struct list { int n, c; int *edges; } verts[MAXN]; void add_list(struct list *l, int v) { if (l->n+1 > l->c) { if (!l->c) l->c = 1; l->c *= 2; l->edges = realloc(l->edges, (size_t)l->c * sizeof *l->edges); } l->edges[l->n++] = v; } void del_lis...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179846/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179846/source.c" target datalayout = "e-m:e-p270: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.list = type { i32, ...
#include<stdio.h> #include<stdlib.h> #include<string.h> void solve(); int time=0; void solve(int li[],int l){ int t,n; scanf("%d%d",&t,&n); if(t==1){ if(li[n-1]==1&&1-li[n-1]==0){ time--; }else if(li[n-1]==0&&1-li[n-1]==1){ time++; } li[n-1]=1-li[n-1];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17989/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17989/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @time = dso_local local_unnam...
//a.c A-Pair #include<stdio.h> int main(void){ int k; scanf("%d",&k); printf("%d\n",((k/2)*(k%2))+((k/2)*(k/2))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179932/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179932/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k; scanf("%d",&k); int answer=0; if(k%2 == 0) printf("%d",k*k/4); else printf("%d",(k/2)*(k/2+1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179976/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179976/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, odd, even; scanf("%d", &k); even = k/2; odd = k - even; printf("%d\n", odd*even); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180017/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180017/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); if((k%2)==0){ printf("%d",(k/2)*(k/2)); }else{ printf("%d",((k-1)/2)*((k+1)/2)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180068/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180068/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k; scanf("%d", &k); if(k%2==0) { printf("%d", k/2*k/2); } else printf("%d", k/2*((k/2)+1) ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180110/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180110/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int w=n/2; if(n%2==0) { printf("%d\n", w*w); } else printf("%d\n",w*w+w); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180161/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180161/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 <math.h> #include <string.h> #include <stdio.h> int main() { int a,b,n,k,i,j; scanf("%d",&k); if(k%2==0){a=k/2; a=a*a; printf("%d",a);} else{ a=k/2; a=a*(a+1); printf("%d",a); }return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180204/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180204/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> //if(strcmp(s[i],"AC")==0) //if(s[l]=='#') /*小文字判定 if((moji>= 'a') && (moji<='z')){ printf("a\n"); return 0; } */ int W_Length(char *str){ int length = 0; while(*str++ != '\0') length++; return length; } void swap(int *a, int *b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180255/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180255/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> long gcd(long x, long y) { if (x < y) { long tmp = x; x = y; y = tmp; } if (x % y == 0)return y; else { gcd(y, x % y); } } int main(void) { long a, b; scanf("%ld %ld", &a, &b); printf("%ld", a*b/gcd(a, b)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180299/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180299/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Euclid(int x, int y); int main(void) { long A,B; /*input var*/ long lcm; /*least common multiple*/ scanf("%ld %ld",&A,&B); lcm = A*B/Euclid(A,B); printf("%ld \n",lcm); return 0; } int Euclid(int x, int y) { if(y==0) return x; else return Euclid(y,x%y)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180341/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180341/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; long long gcd, lcm,n1,n2; scanf("%lld %lld", &n1, &n2); for (i = 1; i <= n1 && i <= n2; ++i) { if (n1 % i == 0 && n2 % i == 0) gcd = i; } lcm = (n1 * n2) / gcd; printf("%lld\n", lcm); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180385/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180385/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { if(y == 0) { return x; } else { return gcd(y, x%y); } } int main(void) { long long int a, b; scanf("%lld %lld", &a, &b); printf("%lld\n", a*b/gcd(a,b)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180435/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180435/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ long long int A, B, r, p, tmp; scanf("%lld %lld", &A, &B); p = A * B; if(A < B){ tmp = A; A = B; B = tmp; } r = A % B; while(r != 0){ A = B; B = r; r = A % B; } printf("%lld", p/B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180479/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180479/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ double ax,ay,bx,by,dx,dy,ans; scanf("%lf%lf%lf%lf",&ax,&ay,&bx,&by); dx=ax-bx; dy=ay-by; ans=sqrt(dx*dx+dy*dy); printf("%lf\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180536/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180536/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef struct node{ long long int data; struct node*next; }fair; int main() { long long int n,t; scanf("%I64d %I64d",&n,&t); long long int a[n],i,sum=0,min=1e9+1,s=0,ans=0,u; for(i=0;i<n;i++) { sc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18058/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18058/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <math.h> int main(void){ double x1,x2,y1,y2; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); printf("%.6lf\n",sqrt(pow(x1-x2,2.0)+pow(y1-y2,2.0))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180622/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180622/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...