Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int search(int A[], int n, int key) { int i = 0; A[n] = key; while(A[i] != key) i++; return i != n; } int main(void) { int i, n, A[10000+1], q, key, sum = 0; scanf("%d",&n); for(i=0; i<n; i++) scanf("%d", &A[i]); scanf("%d",&q); for(i=0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_141850/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_141850/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MAXS 10000 #define MAXT 500 int search(int *A, int n, int key); int main(){ int i,j,k,n,q; int cnt=0; scanf("%d",&n); int S[n]; for(i=0;i<n;i++){ scanf("%d", &S[i]); } scanf("%d", &q); int T[q]; for(i=0;i<q;i++){ scanf("%d", &T[i]); } /* pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_141894/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_141894/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,q,i,j,c=0,t,start; scanf("%d",&n); int s[n]; for(i=0;i<n;i++) scanf("%d",&s[i]); scanf("%d",&q); for(i=0;i<q;i++){ scanf("%d",&t); start=0; for(j=start;j<n;j++){ if(s[j]==t){c++;start=j;break;} } } printf("%d\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_141937/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_141937/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 search(int A[],int key, int n){ int i=0; A[n] = key; while(A[i]!=key) i++; return i !=n; } int main(){ int n,q; int S[10000],T[500],i,j,count=0,key; scanf("%d",&n); for(i=0;i<n;i++)scanf("%d",&S[i]); scanf("%d",&q); for(i=0;i<q;i++){ scanf("%d",&key); count += search(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_141980/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_141980/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,length,n,a=0,d=0; scanf("%d",&n); char ara[n+2]; scanf("%s",ara); length=strlen(ara); for(i=0;i<length;i++) { if(ara[i]=='A') a=a+1; else d=d+1; } if(a>d) printf("Anton"); el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14203/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14203/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 search(int A[], int n, int key) { int i = 0; A[n] = key; while(A[i] != key) i++; return i != n; } int main() { int i, n, A[10000+1], q, key, sum = 0; scanf("%d", &n); for(i = 0; i < n; i++) scanf("%d", &A[i]); scanf("%d", &q); for(i = 0; i < q; i++) { scanf("%d", &key); if(search...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142073/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142073/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n = 0, k = 0, x = 1; scanf("%d\n%d", &n, &k); for (int i = 0; i < n; i++) { if (2 * x <= x + k) { x *= 2; } else { x += k; } } printf("%d\n", x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142116/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142116/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { long int m,x=0,i; scanf("%ld",&m); char a[m]; scanf("%s",a); for(i=0;i<m;i++){ if(a[i]=='A') x++; } if(x>m-x) printf("Anton"); else if(x==m-x) printf("Friendship"); else printf("Danik"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14216/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14216/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 number_n, current_score = 1, add_number, i, temp_number; scanf("%d", &number_n); scanf("%d", &add_number); for(i = 0; i < number_n; i++) { if(current_score * 2 < current_score + add_number) { current_score *= 2; } else { current_score += add_number; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142202/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142202/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n, k, i, ans=1; scanf("%d", &n); scanf("%d", &k); for(i=1; i<=n; i++) { if(ans<=k) ans *= 2; else ans += k; } printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142253/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142253/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int n, k; scanf("%d %d", &n, &k); int ans = 1; while(n--){ if(ans > k){ ans += k; } else { ans *= 2; } } printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142303/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define rrep(i,l,r)for(ll i=(l);i>=(r);i--) #define INF (1LL<<60) #define MOD1 1000000007 #...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142347/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142347/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* exit */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #define BIG 2000000007 #define MOD 1000000007 typedef unsigned long long ull; typedef signed long long sll; #define N_MAX 100000 #define M_MAX 10000 typedef struct { int a; int b; } hw; typedef struc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142390/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142390/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.hw = type { i32, i3...
#include <stdlib.h> #include <stdio.h> int cmp(const void *a, const void *b) { return *(int*)a - *(int*)b; } int main(void) { int N, K; scanf("%d %d", &N, &K); int XY[N][2]; int Xs[N], Ys[N]; for (int i = 0; i < N; ++i) { scanf("%d %d", &XY[i][0], &XY[i][1]); Xs[i] = XY[i][0]; Ys[i] = XY[i][1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142433/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142433/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,i,a,b,c,d=1,s; char w; scanf("%d",&n); while(n--){ scanf("%d\n",&m); s=3*m+2; d=1; for(i=0;i<4*m;i++){ scanf("%c",&w); if(w=='N')a=1; else a=0; if (i==0)b=a; else if(i==2*m-1)c=a; else if(i==2*m){//printf("\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142505/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 A1, A2, A3; scanf("%d %d %d", &A1,&A2,&A3); if (A1+A2+A3 >= 22) { printf("bust\n"); } else { printf("win\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142563/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142563/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_1,a_2,a_3; int sum; scanf("%d %d %d",&a_1,&a_2,&a_3); sum = a_1+a_2+a_3; if(sum>21){ printf("bust"); } else{ printf("win"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142606/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142606/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3]; int sum; int i; sum=0; scanf("%d %d %d",&a[0],&a[1],&a[2]); for(i=0;i<3;++i){ sum+=a[i]; } if(sum<=21){ printf("win\n"); }else{ printf("bust\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142657/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142657/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,ca = 0,cb = 0; scanf("%d",&n); while(n--){ char ch; scanf(" %c",&ch); if(ch == 'A') ca++; else cb++; } if( ca > cb) printf("Anton\n"); else if ( cb > ca) printf("Danik\n"); else printf("Friendship\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14270/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14270/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 A1,A2,A3,sum; scanf("%d %d %d",&A1,&A2,&A3); sum=A1+A2+A3; if(sum >= 22) { printf("bust\n") ; } else { printf("win\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142750/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142750/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main (void) { int a[3]; scanf("%d%d%d", &a[0], &a[1], &a[2]); if ( a[0]+a[1]+a[2] >= 22 ) printf("bust\n"); else printf("win\n"); return EXIT_SUCCESS; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142815/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a1, a2, a3; scanf("%d %d %d", &a1, &a2, &a3); if (a1 + a2 + a3 >= 22) { printf("bust"); } else { printf("win"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142859/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, ans; scanf("%d %d %d", &a, &b, &c); ans = a+b+c; if(ans>=22) printf("bust"); else printf("win"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142901/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142901/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 line[15]; int A1,A2,A3; fgets(line,sizeof(line),stdin); sscanf(line,"%d %d %d",&A1,&A2,&A3); if(A1+A2+A3>=22)printf("bust"); else printf("win"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142945/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142945/source.c" target datalayout = "e-m:e-p270: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 an=0; int sum=0; for(int i=0;i<3;i++){ scanf("%d",&an); sum+=an; } if(sum>=22) printf("bust"); else printf("win"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142989/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142989/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b,c; scanf("%d %d %d", &a, &b, &c); int soma = a+b+c; if(soma < 22){ printf("win\n"); } else{ printf("bust\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143030/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143030/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b,c; scanf("%d %d %d", &a, &b, &c); if(a+b+c >= 22){ printf("bust\n"); } else{ printf("win\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143074/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143074/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* * main.c * * Created on: 2019/07/21 * Author: family */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { int A1 = 0, A2 = 0, A3 = 0; scanf("%d %d %d", &A1, &A2, &A3); if (22 <= (A1+A2+A3)) { printf("bust\n"); } else { printf("win\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143117/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143117/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> inline static int read_int() { int x = 0, k; while ((k = getchar_unlocked() - '0') >= 0) { x = x * 10 + k; } return x; } inline static void put_int(int x) { int s = 0; char f[4]; while (x) { f[s++] = x % 10; x /= 10; } while (s--) putchar...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143160/source.c" target datalayout = "e-m:e-p270: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._IO_FILE = type { i...
#include <stdio.h> int h, w; char g[2001][2001]; int mem[4][2001][2001] = {}; int tu(int i, int j){ if(mem[0][i][j] != 0) return mem[0][i][j]; else{ if(i == 0) return 0; else if(g[i - 1][j] == '#') return 0; else return (mem[0][i][j] = tu(i - 1, j) + 1); } } int td(int i, int j){ if(mem[1][i][j] != 0) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143225/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143225/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mem = dso_local local_unna...
#include <stdio.h> #include <math.h> int main(void){ long n; int flag=0; while(scanf(" %ld", &n) != EOF){ int i, j, a[5]; char c[5][7]; if(flag==1) printf("\n"); for(i=0; i<5; i++) a[i] = (n/(int)pow(10, 4-i)) % 10; for(i=0; i<5; i++){ for(j=0; j<7; j++){ c[i][j] = '*'; } } f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143276/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143276/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <stdbool.h> typedef long long ll; #define rep(i,n) for(ll i=0; i<(ll)(n); i++) #define max(l,r) ((l)>(r)?l:r) #define min(l,r) ((l)<(r)?l:r) #define swap(l,r) {ll tp=l;l=r;r=tp;} const ll MOD = 1000000007; ll scr[5050][5050]; int cnt...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143326/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143326/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @MOD = dso_local local_unna...
#include <stdio.h> char Ps[2][200000]; int NPs; int check(){ int x=0, y=0, P; char V = 0; while(x != NPs){ P = Ps[y][x]; if(V){ if(P == '1' || P == '2') return 0; else{ V = 0; x++; } } else { if(P == '1' || P == '2') x++; else{ V = 1; y = !y; } } } if(y == 1) return 1; else return 0; } int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14337/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14337/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @NPs = dso_local global i32 0...
#include "stdio.h" typedef long long LL; int q, n; LL sum, ans, t; int main() { int i; scanf("%d", &q); while(q--) { sum = 0; scanf("%d", &n); for(i=1; i<=n; ++i) { scanf("%I64d", &t); sum += t; } printf("%I64d\n", sum/n+!!(sum%n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14342/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14342/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> char seat[1000][7]; int main() { int i,n,no=1; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s",seat[i]); if(no) if(seat[i][0]=='O' && seat[i][1]=='O') seat[i][0] = seat[i][1] = '+', no = 0; else if(seat[i][3]=='O' && seat[i][4]=='O...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1435/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1435/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include <stdio.h> int chk(double x1,double y1, double x2,double y2, double x3,double y3, double xp,double yp); int main(){ double x1,y1,x2,y2,x3,y3,xp,yp; while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1,&y1,&x2,&y2,&x3,&y3,&xp,&yp)!=EOF){ //printf("%.3lf %.3lf %.3lf %.3lf %.3lf %.3lf %.3lf %.3lf\n",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143542/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143542/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n, a, cnt = 0; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &a); if (a & 1) { cnt++; } } if (cnt % 2 == 0) { printf("YES\n"); } else { printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143586/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143586/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 swap(type,a,b) do{type t=a;a=b;b=t;}while(0); #define MAX(a,b) (((a)>(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b)) #define ll long long #define INF 100000000 #define FOR(i,a,n) for(i=a;i<n;i++) int comp(const void* a,const void* b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143636/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143636/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main() { int t,i,y,x,n; double sum; scanf("%d",&t); while(t--) { scanf("%d",&n); sum=0; for(i=0;i<n;i++) { scanf("%d",&x); sum+=x; } sum=sum/n; y=ceil(sum); printf("%d\n",y...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14368/source.c" target datalayout = "e-m:e-p270:32:32-p271: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){ long a,b; while (scanf("%ld %ld",&a,&b) && a!=0 || b!=0){ long n; if(b>=a){ n=a; a=b; b=n; } long k,count=0; while(b > 0){ k = a%b; a = b; b = k; count++; } printf("%ld %ld\n",a,count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143722/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143722/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,tmp,mod,step; while(1){ step=0; scanf("%d %d",&a,&b); if(a==0 && b==0){ break; } if(a<b){ tmp=a; a=b; b=tmp; } mod=a%b; step+=1; while(mod!=0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143795/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143795/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, x; scanf("%d%d", &a, &b); x = (a + b) / 2; if ((a + b) % 2 == 1) x++; printf("%d\n", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143838/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143838/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int main() { int i,j; float c; scanf("%d%d",&i,&j); c=(i+j)/2; if(i%2==0&&j%2!=0||i%2!=0&&j%2==0){printf("%.f",round(c)+1);} else if(i%2==0&&j%2==0){ printf("%.f",round(c));} else if(i%2!=0&&j%2!=0){printf("%.f",round(c));} ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143881/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143881/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ave(int a, int b ) { int ave; ave = (a + b) / 2; if((a + b) % 2 == 1) { ave++; } return ave; } int main(void) { int A, B; scanf("%d",&A); scanf("%d",&B); printf("%d",ave(A, B)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143924/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143924/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, x; scanf("%d %d", &a, &b); x = ((a+b)+2-1)/2; printf("%d\n", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143968/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143968/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 T, flag; long long l, r, x, y, res; scanf("%d", &T); while(T--){ scanf("%lld %lld", &l, &r); if(l*2<=r){ printf("%lld %lld\n", l, l*2); } else{ printf("-1 -1\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14401/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(){ int a, b; scanf("%d%d", &a, &b); printf("%d", (int)(a+b+1)/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144060/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144060/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,s,n; double p,c; scanf("%d%d",&a,&b); s=a+b; p=s*1.0/2; n=s/2; c=p-n; if(c>=0.5) printf("%d\n",n+1); else printf("%d\n",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144110/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144110/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a[50001]={0}; char p[50001]={1,1}; for(i=2;i*i<50001;i++){ if(p[i])continue; for(j=i*i;j<50001;j+=i)p[j]=1; } for(i=0;i<50001;i++){ for(j=1;j*2<=i;j++){ if(p[j]+p[i-j]==0)a[i]++; } } while(scanf("%d",&n),n)printf("%d\n",a[n]); return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144154/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144154/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ long long i,j; int n,prime[50001]; prime[0]=1; prime[1]=1; for(i=2;i<50001;i++) prime[i]=0; for(i=2;i*i<50001;i++){ if(prime[i]==0){ for(j=2*i;j<50001;j+=i) prime[j]=1; } } while(1){ int count=0; scanf("%d",&n); if(n==0)break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144233/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144233/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(void){ int i; int N,x; if(scanf("%d %d", &N, &x)<2){ exit(1); } int a[N]; for (i=0; i<N; i++){ if(scanf("%d",&a[i])<1){ exit(1); } } long count; count = 0; if(a[0]+a[1]>x){ count += (a[0]+a[1]-x); if(a[0]<=x){ a[1]= x-a[0]; } else{ a[1]=0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144284/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144284/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c; int i; while((c = getchar()) != EOF) { if(c == '@') { char a, n; n = getchar(); a = getchar(); for(i = 0; i < n - '0'; i++) { putchar(a); } } else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144327/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144327/source.c" target datalayout = "e-m:e-p270: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(){ int i; char s[1000]; while(scanf("%s",s)!=EOF){ for(i=0;i<strlen(s);i++){ if(s[i]=='@'){ while(s[i+1]!='0'){ printf("%c",s[i+2]); s[i+1]--; } i=i+2; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144392/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144392/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<stdbool.h> typedef struct E{ int to; struct E *next; }edge; int N, M, ans; bool d[1<<17]; edge G[1<<17], *nil; void push(int i, int j){ edge *X = (edge*)malloc(sizeof(edge)); (*X).to = j; (*X).next = G[i].next; G[i].next = X; return; } void dfs(int i){ d[i] = true; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144435/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144435/source.c" target datalayout = "e-m:e-p270: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.E = type { i32, ptr...
#include<stdio.h> int main(void){ int a,b,c,x,y; unsigned ans = 0; scanf("%d %d %d %d %d",&a,&b,&c,&x,&y); c*=2; if(a+b<=c)ans = a*x+b*y; else{ ans += c*(x<y?x:y); if((x<y?b:a) > c)ans += c*(x<y?y-x:x-y); else ans += (x<y?b:a)*(x<y?y-x:x-y); } printf("%u",an...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144608/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144608/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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]; long long k; scanf("%s %lld",s,&k); for(long long i = 0;i < k;i ++){ if(s[i] != '1'){ printf("%c",s[i]); return 0; } } puts("1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144651/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144651/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define MAXLEN 104 #define LL long long void solve(char *str, int len, LL K) { int i; for(i = 0; i < len; ++i) { if(str[i] != '1') { break; } if(i >= K-1) { break; } } printf("%c\n", str[i]); } int main() { char *str = (c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144695/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144695/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #include <string.h> int main(){ char s[ 101 ]; unsigned long long int k; unsigned long long int i = 0; scanf( "%s", s ); scanf( "%llu", &k ); //scanf( "%d", &b ); int j = 0; unsigned long long int one_num = 0; // for ( j = 0; j < 101; j++ ){ // if ( atoi( s[ j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144745/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144745/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define max 200001 //qsort(str, n, sizeof(int), up_comp); int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;} int down_comp(const void *a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144796/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144796/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,r=0; scanf("%d",&N); n=N; while(n){r+=n%10;n/=10;} printf(N%r==0?"Yes":"No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144853/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144853/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 o,n,s,d; scanf("%d", &o); n=o; s=0; while (n!=0) { d = n % 10; n = n / 10; s = s + d; } if(o%s==0){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144897/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144897/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d",&n,&k); int arr[n]; for(int i=0; i<n; i++) scanf("%d ",&arr[i]); int count=0; int i=0; for(i=0; i<n; i++) { if(arr[i]<=k) count++; else break; } for(int j=n-1; j>i; j--) { if(arr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14494/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14494/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 sum_of_digits(int n) { int sum = 0; while (n > 0) { sum += n % 10; n /= 10; } return sum; } int main(int argc, char *argv[]) { int n; int sum; scanf("%d", &n); int s = sum_of_digits(n); if (n % s == 0) { puts("Yes"); } else { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144990/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144990/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a,b; scanf("%d", &n); for(a=n,b=0;a>0;a/=10){ b+=a%10; } printf("%s\n", n%b==0?"Yes":"No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145032/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145032/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MIN(x,y) ((x<y)?(x):(y)) int main(void){ unsigned int math,algo,code; unsigned int input[6],sum; unsigned int i,j,k,min; unsigned int contest,mcon,acon,ccon; while(1){ for(i=0;i<6;i++) scanf("%u",&input[i]); sum=input[0]; for(i=1;i<6;i++) sum+=input[i]; if(sum==0) b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145076/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int num; int temp[5]; int i; int sum, min, max; while (1){ scanf("%d", &num); if (num == 0) break; for (i = 0; i < num; i++){ scanf("%d%d%d%d%d", &temp[0], &temp[1], &temp[2], &temp[3], &temp[4]); sum = temp[0] + temp[1] + temp[2] + temp[3] + temp[4]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145126/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145126/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* * ex7-1 * kamecha */ #include<stdio.h> typedef struct point{ int x_elem; int y_elem; }point; //構造体の足し算 point add(point a, point b){ point tmp = {0, 0}; tmp.x_elem = a.x_elem + b.x_elem; tmp.y_elem = a.y_elem + b.y_elem; return tmp; } point dec(point a, point b){ point tmp = {0, 0}; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145212/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145212/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.point = type { i32,...
/* ex7_1 Jun_JPN */ #include <stdio.h> typedef struct{ // 頂点の(x,y)座標 int x_elem; int y_elem; }point; point shift_point(point A_vec, point B_vec, int pm); // pm = 1 or -1 int main(void){ point A_vec, B_vec, C_vec, D_vec; scanf("%d %d %d %d", &A_vec.x_elem, &A_vec.y_elem, &B_vec.x_elem, &B_vec...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145263/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145263/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.point = type { i32,...
#include <stdio.h> int main(){ int x1, y1, x2, y2; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); int Xvecter = x2 - x1; int Yvecter = y2 - y1; printf("%d %d %d %d", x2 - Yvecter, y2 + Xvecter, x1 - Yvecter, y1 + Xvecter); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145306/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145306/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int i, j, k, m, n, temp; scanf("%d", &n); char str[n]; scanf("%s", str); for(i = 1; i <= n; i++) { if(n % i == 0) { for(j = 0, k = i-1; k >= (i)/2; k--, j++) { temp = str[j]; str[j] = str[k]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14535/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14535/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<string.h> int main() { int i,j=1,l,m,k,n,sum=0,count=0,b[1000],p, q; char a[1000],c[1000],f; scanf("%d",&n); k=n/2; for(i=2;i<=k;i++) { if(n%i==0) { b[j]=i; j++; } } j--; q=j; scanf("%s",a); for(j=1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14540/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14540/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
//set many funcs template //Ver.20180717 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145443/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145443/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x1, y1; int x2, y2; int x3, y3; int x4, y4; int xdiff, ydiff; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); xdiff = x2-x1; ydiff = y2-y1; x3 = x2-ydiff; y3 = y2+xdiff; x4 = x1-ydiff; y4 = y1+xdiff; printf("%d %d %d %d", x3, y3, x4, y4); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145487/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145487/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<stdbool.h> int main() { int n,k,i; scanf("%d %d",&n,&k); int a[n],f=0,b=0;bool flag=false; for(i=0;i<n;i++) { scanf("%d",&a[i]); } for(i=0;i<n;i++) { if(a[i]>k) { break; } f++;if(f==n){flag=true;} } for(i=n-1;i>=0;i--) { if(a[i]>k) { break; } b++; } if(f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14553/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ long long int N,A,B; scanf("%lld %lld %lld",&N,&A,&B); long long int C=N%(A+B); if(C<=A){ printf("%lld",N/(A+B)*A+C); }else{ printf("%lld",N/(A+B)*A+A); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145573/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145573/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { long n, a, b, divid, remain, ans; // 標準入力からの値取得 scanf("%ld %ld %ld", &n, &a, &b); // 計算 divid = n / (a + b); remain = n % (a + b); ans = a * divid + ((remain < a) ? remain : a); // 出力 printf("%ld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145616/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145616/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n); for (int i = 0; i < n; i ++) printf("1 "); printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14566/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14566/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ long long N,A,B,num; scanf("%lld %lld %lld",&N,&A,&B); num=N%(A+B); if(num<A){ printf("%lld\n",(N/(A+B))*A+num); }else{ printf("%lld\n",(N/(A+B))*A+A); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145702/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145702/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,N,A,B,sum=0,t; scanf("%lld %lld %lld",&N,&A,&B); sum = N/(A+B)*A; t = N%(A+B); if(t != 0) { if(t > A) { sum = sum+A; } else { sum = sum + t; } } printf("%lld",sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145746/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145746/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> typedef long long int ll; int main() { int n,t; scanf("%d",&t); while(t--){ scanf("%d",&n); for(int i=0;i<n;i++)printf("1 "); printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14579/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14579/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
//set many funcs template //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145832/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145832/source.c" target datalayout = "e-m:e-p270: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.sd = type { i64, i6...
#include <stdio.h> #include <stdlib.h> int main() { int x,i; char qwe[10]; while(~scanf("%s",qwe)) { x=0; for(i=0;i<4;i++) { if(qwe[i]=='+') { x=x+1; } if(qwe[i]=='-') { x=x-1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145890/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145890/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,count=0; char s[5]; scanf("%s",s); for(i=0;s[i]!='\0';i++){ if(s[i]=='+') count=count+1; else if(s[i]=='-') count=count-1; } printf("%d\n",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145933/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145933/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,t=0; char S[4]; scanf("%s",S); for(i=0;i<4;i++){ if(S[i]=='+'){ t++; }else{ t--; } } printf("%d\n",t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145977/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145977/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { // your code goes here char s[5],i,a=0; scanf("%s",s); for(i=0;i<4;i++){ if(s[i]=='+') a++; else a--; } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146019/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146019/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 takahashi = 0; char s1 = '+'; void main (){ char str1[256]; scanf("%s", str1); for(int i = 0; i < 4; i++){ if(str1[i] == s1){ takahashi = takahashi + 1; }else { takahashi = takahashi - 1; } } printf("%d", takahashi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146062/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146062/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @takahashi = dso_local loca...
#include <stdio.h> int main(void) { char name[5]; int i=0; scanf("%s",name); if(name[0]=='+'){ i++; }else{ i--; } if(name[1]=='+'){ i++; }else{ i--; } if(name[2]=='+'){ i++; }else{ i--; } if(name[3]=='+'){ i++; }else{ i--; } printf("%d",i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146149/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146149/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> char bus[1001][6]; int main() { unsigned n, res = 0; scanf("%u", &n); for (unsigned i = 0; i < n; i++) scanf("%s", (char*) (bus + i)); for (unsigned i = 0; i < n; i++) { if (!res && bus[i][0] == 'O' && bus[i][1] == 'O') { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1462/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1462/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include<stdio.h> #include<math.h> int main() { int t; scanf("%d",&t); int n[t]; for(int i=0;i<t;i++) { scanf("%d",&n[i]); } for(int i=0;i<t;i++) { for(int j=0;j<n[i];j++) { printf("%d ",1); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14625/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14625/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 T,H,S,t,ans1,ans2,ans3; while(1){ scanf("%d %d %d",&T,&H,&S); if(T==-1 && H==-1 && S==-1){ break; } t=7200-(3600*T+60*H+S); ans1=t/3600; ans2=(t%3600)/60; ans3=t%60; printf("%02d:%02d:%02d\n",ans1,ans2,ans3); t=t*3; ans1=t/3600; ans2=(t%3600)/60; ans3=t%60; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146321/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146321/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t; int n; int *a; int i; int el = 1; scanf("%d",&t); while(t--) { scanf("%d",&n); a = (int *)malloc(n*sizeof(int)); for(i = 0; i < n; i++) { a[i] = el; } for(i = 0; i < n; i++) printf("%d ",a[i]); printf("\n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14638/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14638/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 n,f[100][10],p[100][11],max=0,i,x[100],j[10],k,y,l; scanf("%d",&n); for (i=0;i<n;i++) { for (k=0;k<10;k++) { scanf("%d",&f[i][k]); } } for (i=0;i<n;i++) { for (k=0;k<=10;k++) { scanf("%d",&p[i][k]); } } for (j[0]=1;j[0]>=0;j[0]--) { for (j[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146422/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//x = human*y + (human+1)*z #include <stdio.h> int main() { int x, y, z, human = 1, total = 0; scanf( "%d %d %d", &x, &y, &z); while(total < x ) { total = human * y + (human + 1) * z; if( total > x ) break; human++; if( total == x ) break; } printf("%d\n", huma...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146466/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146466/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 #define rep(i,n) for(ll i=0;i<(n);i++) #define max(p,q) ((p)>(q)?(p):(q)) #define min(p,q) ((p)<(q)?(p):(q)) #define chmax(a,b) ((a)=(a)>(b)?(a):(b)) #define chmin(a,b) ((a)=(a)<(b)?(a):(b)) #define abs(p) ((p)>=(0)?(p):(-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146509/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146509/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 testCases; scanf("%d",&testCases); for(int i = 0; i < testCases; i++){ int n; scanf("%d",&n); int arr[n]; for(int j = 0; j < n; j++){ printf("2\t"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14656/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14656/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 t,n; scanf("%d",&t); while(t--) { scanf("%d",&n); while(n--) printf("2 "); printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14661/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14661/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y,z; char c,d; //int ans =(x+z)/(y+z); scanf("%d%d%d",&x,&y,&z); int ans =(x-z)/(y+z); printf("%d",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146660/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146660/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 minimum_vote(){ int vote[10000]; int index = 0; int sum = 0; char c = getchar(); while(1){ if(c == '['){ vote[index++] = minimum_vote(); c = ge...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146703/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146703/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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", &a); scanf("%d", &b); int n = 1; if (b == 1) { printf("%d\n", 0); } else if (a >= b) { printf("%d\n", n); } else { int dif = b - a; int k; if (dif % (a - 1) == 0) { k = dif / (a - 1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146747/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146747/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ============================================================================ Name : AtCoder3.c Author : Version: Copyright: Your copyright notice Description : Hello World in C, Ansi - style ============================================================================ */ #pragma warning(disable:4996) #include...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146790/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146790/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...