Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #include<stdlib.h> #include<math.h> #define N 1000000 void mergeSort(int [ ], int , int); void merge(int [ ], int , int , int ); int cnt=0; int main() { int i,S[N],n; while(1) { scanf("%d",&n); if(n <= N && n > 0) break; } for(i=0;i<n;i++) scanf("%d",&S[i]); me...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147428/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147428/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @cnt = dso_local local_unna...
#include<stdio.h> #define MAX 500001 #define SENTINEL 2000000000 int count=0; int merge(int S[],int left,int right,int mid){ int n1,n2,i,L[MAX/2+2],R[MAX/2+2],j,k; n1=mid-left; n2=right-mid; for(i=0;i<n1;i++){L[i]=S[left+i];} for(i=0;i<n2;i++){R[i]=S[mid+i];} L[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147486/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147486/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> int L[500000],R[500000]; int cnt; void merge(int A[],int n,int left,int mid,int right){ int n1,n2; int i,j,k; n1=mid-left; n2=right-mid; for(i=0;i<n1;i++){ L[i]=A[left+i]; } for(i=0;i<n2;i++){ R[i]=A[mid+i]; } L[n1]=R[n2]=2000000000; i=0;j=0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147529/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147529/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @L = dso_local local_unname...
#include <stdio.h> #define ENU 500000 #define INF 1000000000 void mergeSort(int S[], int, int); void merge(int S[], int, int, int); int left, right, S[ENU], enu, count = 0; int main() { int i, j; scanf("%d", &enu); for (i = 0; i < enu; i++) { scanf("%d", &S[i]); } left = 0; right = enu; mergeSort(S, left, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147572/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147572/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include <stdio.h> #define INFTY 1000000000 void merge(int *, int, int, int); void mergeSort(int *, int, int); int count=0; int main(){ int i, n; int S[500000]; scanf("%d", &n); for(i=0; i<n; i++){ scanf("%d", &S[i]); } mergeSort(S, 0, n); for(i=0; i<n-1; i++){ printf("%d ", S[i]); } p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147615/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147615/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include <stdio.h> #define Max 500000 #define INFTY 2000000000 int L[Max/2+2]; int R[Max/2+2]; int count =0; void mergeA(int A[],int left,int mid,int right){ int n1 = mid-left; int n2 = right-mid; int i,j,k; for(i=0; i<n1; i++) L[i]=A[left + i]; for(i=0; i<n2; i++) R[i]=A[mid + i]; L[n1] ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147666/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> #include<math.h> #define N 1000000 #define INFTY 2000000000 int A[N],c=0; void Merge(int,int,int); void MergeSort(int,int); int main(){ int i,m; scanf("%d",&m); for(i=0;i<m;i++) scanf("%d",&A[i]); MergeSort(0,m); for(i=0;i<m;i++){ printf("%d",A[i]); if(i!=m-1)printf(" "); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147709/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147709/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @c = dso_local local_unname...
#include <stdio.h> int main() { int T; scanf("%d",&T); while(T--){ int gh; scanf("%d",&gh); for(int k = 1; k<=gh; k++){ for(int j = 1; j<=2*gh; j++){ if(j<=k){ printf("(");} else if(j<=2*k){ printf( ")");} else if(j&1){ printf("(");} else { printf(")");} } printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14776/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14776/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <string.h> static size_t merge(int64_t left[], size_t size_left, int64_t right[], size_t size_right) { size_t len = size_left + size_right; int64_t *buf = (int64_t *)malloc(sizeof(int64_t) * len); size_t count = 0; size_t left_count = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147802/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147802/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 #define M 2000000000 int n, S[N]; int count = 0; void merge(int,int); void Merge(int,int,int); int main() { int i,left, right; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%d", &S[i]); } left = 0; right = n; merge...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147853/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147853/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include <stdio.h> #define N 500000 #define AEN 1000000000 int merge(int *,int,int,int); void mergeSort(int *,int,int); int n,s[N],count=0,tmp[N],x[N]; int main() { int i,x; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&s[i]); } mergeSort(s,0,n-1); for(i=0;i<n-1;i++){ printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147897/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147897/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> int main() { int t,n,k; scanf("%d",&t); while(t--){ scanf("%d%d",&n,&k); if(k%(n-1)==0){ printf("%d\n",k/(n-1)*n-1); }else{ printf("%d\n",k/(n-1)*n+k%(n-1)); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14794/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14794/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define INFTY 1 << 30; int Merge(int A[],int left,int mid,int right){ int k; int n1 = mid-left; int n2 = right-mid; int L[n1+1]; int R[n2+1]; for(int i=0;i<n1;i++){ L[i] = A[left+i]; } for(int i=0;i<n2;i++){ R[i] = A[mid+i]; } L[n1] = INFTY; R[n2] = INFTY; int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147983/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147983/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 500000 #define S_IN 1000000000 int L[N],R[N]; int count=0; void merge(int A[],int left,int mid,int right){ int n1 = mid - left; int n2 = right - mid; int i,j; for(int i=0;i<n1;i++)L[i] = A[left + i]; for(int i=0;i<n2;i++)R[i] = A[mid + i]; L[n1] = 2*S_IN; R[n2] = 2*S_IN; i =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148025/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> #define INFINITY 1000000000 int A[500000]; int num=0; int n1,n2; int L[5000000/4]; int R[5000000/4]; void merge(int A[],int left,int mid,int right){ int i,k,j; n1=mid-left; n2=right-mid; for(i=0;i<n1;i++)L[i]=A[left+i]; for(i=0;i<n2;i++)R[i]=A[mid+i]; L[n1]=INFINITY; R[n2]=INFINITY; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148069/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148069/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @num = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> #define SENTINEL (1<<30) int Merge(int *A, int left, int mid, int right) { int cnt = 0; int i,j,k; int n1, n2; int *L, *R; n1 = mid - left; n2 = right - mid; L = malloc(sizeof(int)*(n1+1)); R = malloc(sizeof(int)*(n2+1)); for(i = 0; i < n1; ++i) L[i] = A[le...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148111/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148111/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 SENTINEL 1000000000 #define N 500000 int count=0; void Merge(int A[],int left,int mid,int right){ int n1=mid - left,n2=right - mid,i,j,k; int L[n1+1],R[n2+1]; for(i = 0; i < n1; i++){ L[i] = A[left + i]; } for(i = 0; i < n2; i++){ R[i] = A[mid + i]; } L[n1] = SENTIN...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148162/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148162/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include <stdio.h> #include <stdlib.h> #include <limits.h> static int A[500000]; int cnt = 0; void merge(int A[], int left, int mid, int right) { int n1 = mid - left; int n2 = right - mid; int *L; int *R; int i, j, k; L = malloc(sizeof(int) * (n1 + 1) ); R = malloc(sizeof(int) * (n2 + 1) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148205/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148205/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @cnt = dso_local local_unna...
#include<stdio.h> #define INFINITY 1000000001 void mergeSort(int *, int, int); void merge(int *, int, int, int); int n;//データの個数を記録する int count=0; int S[500002];//配列の外部変数 int main (){ int i; scanf("%d", &n); for( i = 0 ; i < n ; i++ ){ scanf("%d", &S[i]); } //printf("%d\n",S[0]); mergeSort( S, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148256/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148256/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> int main() { int n,i,j; scanf("%d",&n); char seat[n][5]; int flag=0; for(i=0;i<n;i++) { scanf("%s",&seat[i]); } for(i=0;i<n;i++) { if(seat[i][0]=='O' && seat[i][1]=='O' && flag==0) { seat[i][0]='+'; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1483/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1483/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define INF 1000000001 int count; void merge(int *,int,int,int); void mergeSort(int *,int,int); int main(){ int i,n; int S[500000]; scanf("%d",&n); for(i=0;i<n;i++)scanf("%d",&S[i]); mergeSort(S,0,n); for(i=0;i<n-1;i++)printf("%d ",S[i]); printf("%d\n",S[i]); printf("%d\n",count...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148342/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148342/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 INFTY 1000000000 #define MAX 500000 int l,m,r,i,j,k; int count; void marge(int A[],int l,int m,int r){ int a1,a2; a1 = m - l; a2 = r - m; int Left[a1]; int Right[a2]; for(i=0;i<a1;i++){ Left[i]=A[l+i]; } for(j=0;j<a2;j++){ Right[j]= A[m+j]; } Le...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148386/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148386/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @i = dso_local local_unname...
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define scani(x) scanf("%d",&x) #define scanc(x) scanf("%s",x) #define printi(x) printf("%d",x) #define printin(x) printf("%d\n",x) #define printc(x) printf("%s",x) #define repd(i,n,m) for(int i = n; i > m; i--) #define repu(i,n,m) for(int i = n; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148436/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148436/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> #include<math.h> void getAns(int n){ int index = 0, ans[5], count = 0; while(n > 0){ if(n % 10 != 0) ans[count++] = (n % 10) * round(pow(10, index)); index++; n /= 10; } printf("%d\n", count); for(int i = 0; i < count; ++i) printf("%d ", ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14848/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14848/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define MAX 500000 #define INFTY 2000000000 int L[MAX/2+2],R[MAX/2+2]; int count; void merge(int *,int ,int ,int ,int); void mergesort(int * ,int ,int,int); int main(){ int A[MAX],n,i; count=0; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&A[i]); mergesort(A,n,0,n); for(i=0;i<n;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148522/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148522/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> #define INF 1000000000 int cnt=0; void merge(int *,int,int,int); void mergeSort(int *,int,int); int main(){ int n; int S[500001]; int i; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&S[i]); mergeSort(S,0,n); for(i=0;i<n;i++){ printf("%d",S[i]); if(i!=n-1) printf(" "); } printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148573/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148573/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @cnt = dso_local local_unna...
#include<stdio.h> #define INF 600001 void mergeSort(int *,int,int); void merge(int *,int,int,int); int cnt=0; int main(){ int i, n; int s[INF]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&s[i]); } mergeSort(s,0,n); for(i=0;i<n-1;i++){ printf("%d ",s[i]); } printf("%d\n",s[i]); pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148623/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148623/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @cnt = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(){ int n, m, Q; int i, j, k; int c; scanf( "%d%d%d", &n, &m, &Q ); //int l[ 200000 ], r[ 200000 ], lr[ 200000 ]; int **map = NULL; //int p[ 100000 ], q[ 100000 ]; map = ( int ** )calloc( ( n + 1 ), sizeof( int * ) ); for ( i = 0; i <...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148674/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148674/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); for(int i=1;i<10000;i++){ if(i*8/100==a&&i*10/100==b){ printf("%d",i); return 0; } } puts("-1"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148717/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148717/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ double a,b; scanf("%lf %lf",&a,&b); for(int i = 1;i < 1001;i++){ double a1 = (double)(i * 0.08); double b1 = (double)(i * 0.1); if(a1 - a < 1 && a1 - a >= 0 && b1 - b < 1 && b1 - b >= 0){ printf("%d",i); return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148760/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148760/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i=0, j=0; scanf("%d %d",&a,&b); while(1){ i++; if(i*8/100==a){ break ; } } while(1){ j++; if(j*10/100==b){ break ; } } while(1){ if(i==j){ printf("%d\n", i); return 0; } if(i>j){ j++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148803/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148803/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = B * 100/10; for(int i=0; i<10; i++){ if((int)(X*0.08) == A){ //結果出力 printf("%d", X); return 0; } X++; } //解なし printf("-1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148847/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148847/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, char** argv) { int a, b; int i; scanf("%d%d",&a,&b); for(i=b*10; i<b*10+10; ++i){ if(i*8/100 == a){ printf("%d\n", i); return 0; } } printf("-1\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148890/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148890/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int a,b,x; scanf("%d %d ",&a,&b); x=b/a; if(a==1){ printf("%d\n",b); } else if(a>b||a==b){ printf("%d\n",1); } else if(b%a!=0){ printf("%d\n",x+1); } else { printf("%d\n",b/a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148933/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148933/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 rep(i,n) for(int i=0;i<n;i++) int gcd(int a, int b){ int r=1; while(r!=0){ r=a%b; a=b; b=r; } return a; } void revStr(char* str){ int size = strlen(str); int i,j; char tmp = {0}; for(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148977/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148977/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @tail = dso_local local_unn...
#include <stdio.h> #include <stdlib.h> typedef struct s_p { int n; int i; } t_p; int compare_ints(const void* a, const void* b) { t_p arg1 = *(const t_p*)a; t_p arg2 = *(const t_p*)b; if (arg1.n < arg2.n) return -1; if (arg1.n > arg2.n) return 1; return 0; } int main(void...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149026/source.c" target datalayout = "e-m:e-p270: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.s_p = type { i32, i...
#include<stdio.h> int t,u; long long int n,k; int main() { scanf("%d",&t); while(t--) { u=0; scanf("%lld %lld",&n,&k); if(n%2==0) { n=n-2*(k-1); if(n<=0) { if(k%2==0) { n=n+2*(k-1); n=n-k+1; if(n<=0) { u=1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14907/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14907/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define N 100000 int main(void) { int n; int arr[N]; scanf("%d", &n); for (int i = 0; i < n; i++) { int x; scanf("%d", &x); arr[x-1] = i + 1; } printf("%d", arr[0]); for (int i = 1; i < n; i++) { printf(" %d", arr[i]); } printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149112/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149112/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &n); int a[n]; int ans[n]; for(i = 0; i < n; i++){ scanf("%d", &a[i]); ans[a[i] - 1] = (i + 1); } for(i = 0; i < n; i++){ printf("%d ", ans[i]); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149156/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149156/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int N; scanf("%d", &N); char conf[N][5]; int i, t, j; for(i = 0; i < N; i++) { scanf("%s", conf[i]); } t = N; int toPrint = 0, found = 0; while(t--) { for(i = 0; i < N; i++) { if(conf[i][0] == 'O' && conf[i][1] == 'O') { conf[i][...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1492/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1492/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include<stdio.h> #include<stdlib.h> int main () { long int t, a, b, c = 1, e = 1, d[15]; scanf("%ld", &t); for (long int x = 0; x < t; x++) { c = 1, a = 0, b = 0, e = 0; scanf("%ld", &a); for (long int y = 0; y < 5; y++) { c = c * 10; b = a % c; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14925/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14925/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ char c[2][3]; scanf("%s",c[0]); scanf("%*c%s",c[1]); if(c[0][0]==c[1][2] && c[0][1]==c[1][1] && c[0][2]==c[1][0]) puts("YES"); else puts("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149293/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149293/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b; char s[100]; char ss[100]; scanf("%s",s); scanf("%s",ss); if((s[1]==ss[1])&&(s[0]==ss[2])&&(s[2]==ss[0])){printf("YES");} else{printf("NO");} }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149336/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149336/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j,l,c,k,t; char arr[10001]; scanf("%d",&t); for(i=0;i<t;i++) { c=0; scanf("%s",&arr); k=strlen(arr); for(j=0;j<k;j++) { if(arr[j]!='0') c++; } printf("%d\n",c); for(j=0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14938/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14938/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(int argc,char** argv) { char c[2][3]; for(int i = 0; i < 2; i++){ scanf("%s", c[i]); } if(c[0][0] == c[1][2]){ if(c[0][1] == c[1][1]){ if(c[0][2] == c[1][0]){ printf("YES\n"); } else{printf("NO\n");} } else{printf("NO\n");} ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149437/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149437/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[10],b[10]; scanf("%s%s", a, b); if (a[0]==b[2]&&a[1]==b[1]&&a[2]==b[0]) printf("YES\n"); else printf("NO\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149488/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149488/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n; scanf("%d", &n); char s[7]; int start = 0; int end = n-1; int q = (n-1)/2; int start_person; int end_person; int q_person; printf("0\n"); fflush(stdout); scanf("%s", s); if (s[0] == 'V') { return 0; } else { if (s[0] == 'M') { start_...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149545/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149545/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <= 8 && B <= 8) printf("Yay!\n"); else printf(":(\n"); fflush(stdout); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149596/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149596/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 abs(int x) { if(x < 0) { return -x; } return x; } void mostrar_resultado(int A, int B) { int dif = abs(A - B); if(dif <= 1) { printf("Yay!"); } else { printf(":("); } printf("\n"); } int main() { int A, B; scanf("%d %d", ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149639/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> int min(int a, int b) { return a < b ? a : b; } int max(int a, int b) { return a > b ? a : b; } int comp(const void* a, const void *b){ return *(int *)b - *(int *)a; } int main() { int x,y,z,i,j,k,ii,jj,a,b,c,n,m,t,mat[210210]; long long al...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14969/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14969/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void){ int A, B; scanf("%d %d", &A, &B); if(A<=8 && B<=8) printf("Yay!\n"); else printf(":(\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149747/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149747/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int A,B; scanf("%d %d",&A,&B); if(A>8 || B>8){ printf(":(\n"); }else{ printf("Yay!\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149790/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149790/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<=8 && B<=8) printf("Yay!"); else printf(":("); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149833/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149833/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a; int b; scanf("%d %d", &a, &b); if (a >= 9 || b >= 9) { printf(":(\n"); } else { printf("Yay!\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149877/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149877/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int a,b; scanf("%d %d", &a, &b); if(a <= 8 && b <= 8) printf("Yay!\n"); else printf(":(\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149927/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149927/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 > 8 || B > 8){ printf(":(\n"); }else{ printf("Yay!\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_149970/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_149970/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, max; scanf("%d %d", &a, &b); max = a; if (a < b) { max = b; } if (8 >= max) { printf("Yay!\n"); } else { printf(":(\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150011/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150011/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//set many funcs template #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){if(a<b){return a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150055/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150055/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,a,b; int suma,sumb; do{ n=suma=sumb=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d",&a,&b); if(a==b){ suma+=a; sumb+=b; }else if(a>b){ suma+=(a+b); }else{ sumb+=(a+b); } } if(n) printf("%d %d\n",suma,sumb); else break; }while(1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150105/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150105/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n; int i; int suma; int sumb; int a; int b; while (1){ scanf("%d", &n); if (n == 0){ break; } suma = 0; sumb = 0; for (i = 0; i < n; i++){ scanf("%d %d", &a, &b); if (a < b){ sumb += a + b; } else if(a > b){ suma += a + b; } else...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150149/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150149/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int i,n; int a[10000],b[10000]; int pa,pb; while(1){ scanf("%d",&n); if(n==0)break; pa=pb=0; for(i=0;i<n;i++){ scanf("%d %d",&a[i],&b[i]); if(a[i]-b[i]>0)pa+=a[i]+b[i]; else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150192/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150192/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int card[2]; int result[2]; scanf("%d",&n); while(n){ result[0] = result[1] = 0; for(i=0;i < n;i++){ card[0] = card[1] = 0; scanf("%d %d", &card[0], &card[1]); if(card[0] < card[1]) result[1] += card[0] + ca...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150257/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150257/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int i, j=0; int a; int b; int A[100]={}; int B[100]={}; while(1){ scanf("%d", &n); if(n==0){ break; } for(i=0;i<n;i++){ scanf("%d%d", &a, &b); if(a<b){ B[j]+=a+b; }else if(a>b){ A[j]+=a+b; }else{ A[j]+=a; B[j]+=b; } } j++; } f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150307/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150307/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int i,n; int card[10001][2]; for(;;){ scanf("%d", &n); if(n==0) break; int ansa=0,ansb=0; int suma[10001]={0}; int sumb[10001]={0}; for(i=0;i<n;i++){ scanf("%d %d", &card[i][0], &card[i][1]); if(card[i][0]>card[i][1]){ suma[i]=card[i][0]+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150350/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150350/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ll long long #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 INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) #define bit(n,m)(((n)>>(m))&1) int upll(const vo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150394/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150394/source.c" target datalayout = "e-m:e-p270: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.sayouso = type { i6...
#include <stdio.h> #include <string.h> int main(void) { char s[100000]; int last; scanf("%s", s); last = (int)strlen(s) - 1; while (last > -1) { // dream if (s[last] == 'm' && s[last - 1] == 'a' && s[last - 2] == 'e' && s[last - 3] == 'r' && s[last - 4] == 'd') { last -= 5; } // dreamer else if (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150444/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150444/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> void rev(char *s) { int l = strlen(s), i; for (i=0;i<l/2;i++) { char t = s[i]; s[i] = s[l-1-i]; s[l-1-i] = t; } } char T[4][8] = {"dream", "dreamer", "erase", "eraser"}; int main(void) { int i, c, l; char s[10...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150495/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @T = dso_local global [4 x ...
#include <stdio.h> #include <stdlib.h> typedef struct _Node { int value; struct _Node *next; } Node; typedef struct { int length; Node *head; Node *tail; } List; Node *CreateNode(int _value) { Node *newNode = (Node*)malloc(sizeof(Node)); newNode->value = _value; newNode->next = NULL; return newNode; } List...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150538/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150538/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._Node = type { i32,...
#include<stdio.h> int main(){ int a,b,x; scanf("%d%d%d",&a,&b,&x); if(a<=x && x<=a+b) puts("YES"); else puts("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150581/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150581/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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%d", &a, &b, &x); if (a <= x && a+b >= x){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150624/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150624/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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%d",&a,&b,&x); (b>=x-a&&x-a>=0)?puts("YES"):puts("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150668/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 > c){ printf("NO"); } else if (a + b < c){ printf("NO"); } else { printf("YES"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150710/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150710/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,x; scanf("%d%d%d",&a,&b,&x); puts(a+b>=x&&x>=a?"YES":"NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150754/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150754/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int b; int x; scanf("%d", &a); scanf("%d", &b); scanf("%d", &x); if(a <= x){ if(a + b >= x){ printf("YES\n"); }else{ printf("NO\n"); } }else{ printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150811/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150811/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[2]; int a = 0,b = 0,x = 0,i = 0; scanf("%d""%d""%d",&a,&b,&x); i =x - a; if(i<=b && a <= x) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150855/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150855/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); for(int tc = 0; tc < t; tc++){ int n, m; scanf("%d%d", &n, &m); if(n % m == 0) printf("YES\n"); else printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15092/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 FIND_MIN(int A,int B){ if(A >= B){ return B; } else { return A; } } int main(void){ int N,A,B; scanf("%d %d %d",&N,&A,&B); if(A + B <= N){ printf("%d %d\n",FIND_MIN(A,B),0); } else { printf("%d %d\n",FIND_MIN(A,B),A+B-N); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_150963/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_150963/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,b; scanf("%d%d%d",&n,&a,&b); if(a>=b) printf("%d ",b); else printf("%d ",a); if((n-a-b)>=0) printf("0"); else printf("%d",a+b-n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151005/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151005/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 equal(char *t,char *p,int i,int plen){ int j; for(j=0;j<plen;j++){ if(t[i+j]!=p[j]) return 0; } return 1; } int main(){ char t[1000]; char p[1000]; int i,j; int tlen; int plen; scanf("%s",t); scanf("%s",p); tlen=strlen(t); plen=strlen(p); for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151049/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151049/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* * Problem Description: String Search * Category: String Search * Author: Khan * Date: 23th October, 2017 */ #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAXN 1000000 int next[MAXN]; void get_next(char *pattern) { int lp = strlen(pattern); //????????¨????????????? int k = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151092/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @next = dso_local local_unn...
// Aizu Vol-2 0143 Altair and Vega // 2017.8.8 #include <stdio.h> int atSameSide(int x1, int y1, int x2, int y2, int xa, int ya, int xb, int yb) { long long sa, sb; sa = (x2 - x1) * (ya - y1) + (y2 - y1) * (x1 - xa); sb = (x2 - x1) * (yb - y1) + (y2 - y1) * (x1 - xb); if (sb == 0 || sa == 0) while (1); // ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151142/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151142/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[102],c; /* YOU SHOULD DECLARE ARRAY GLOBALLY*/ void sort() { int i, j,temp; for(i=1; i<c; i++) { int k=i; for(j=k-1; j>=0; j--) { if(a[k]<a[j]) break; if(a[k]>a[j]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15120/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15120/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @c = dso_local global i32 0, ...
/* cat <<EOF >mistaken-paste */ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #define _USE_MATH_DEFINES #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <time.h> #define BIG 2000000007 #define VERYBIG 200000000000007LL #de...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151258/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151258/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.hw = type { i32, i3...
#include <stdio.h> #include <math.h> int main(){ int N,D; float x,y; int count=0; scanf("%d %d",&N,&D); while(N--){ scanf("%f %f",&x,&y); if(sqrt(pow(x,2)+pow(y,2))<=D) count++; } printf("%d\n",count); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151315/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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<stdio.h> #include<stdlib.h> #include<math.h> int main(){ long N,D,x,y; int count=0,X[2*(int)pow(10,5)],Y[2*(int)pow(10,5)]; scanf("%ld",&N); scanf("%ld",&D); for(int n=0;n<N;n++){ scanf("%ld",&x); scanf("%ld",&y); X[n]=x; Y[n]=y; if(sqrt(pow(X[n],2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151359/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 <stdio.h> int main(void) { long long int n, d; long long int x, y; int ii, count = 0; scanf("%d%d", &n, &d); for (ii = 0; ii < n; ii++) { scanf("%lld%lld", &x, &y); if (x * x + y * y <= d * d) { count++; } } printf("%d", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151409/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 nTest; int n; int m; int main() { scanf("%d", &nTest); for (int iTest = 1; iTest <= nTest; ++iTest) { scanf("%d%d", &n, &m); if (n % m == 0) { printf("YES\n"); } else { printf("NO\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15146/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15146/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. ***********************************************...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15151/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 long n, d, x, y; long long i, ans = 0; scanf("%lld%lld", &n, &d); d *= d; for (i = 0; i < n; i++) { scanf("%lld%lld", &x, &y); if ((x*x + y*y) <= d) ans++; } printf("%lld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151553/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n, d; scanf("%lld%lld", &n, &d); long long int ans = 0; for(long long int i = 0; i < n; i++) { long long int x, y; scanf("%lld%lld", &x, &y); if(x * x + y * y <= d * d) { ans++; } } printf("%lld\n", ans); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151597/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151597/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a[1000]; scanf("%d",&t); while(t--) { int n; scanf("%d",&n); int i,j; for(i=0;i<n;i++) scanf("%d",&a[i]); int s; for(i=0;i<n-1;i++) for(j=0;j<n-1-i;j++) if(a[j]<a[j+1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15164/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15164/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(void){ int n,x,count; while(scanf("%d",&n),n){ count=0; for(;n>0;n--)for(x=n;x%5==0;){x=x/5;count++;} printf("%d\n",count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151690/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151690/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>9){ printf("-1\n"); }else if(B>9){ printf("-1\n"); }else{ printf("%d\n",A*B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151784/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151784/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <= 9 && B <= 9){ printf("%d",A*B); } else{ printf("-1\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151827/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151827/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b,ans; scanf("%d%d0", &a,&b); if((1<=a)&&(a<=9)&&(1<=b)&&(b<=9)){ ans=a*b; }else{ ans=-1; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151870/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151870/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,N; scanf("%d %d",&A,&B); if(A > 0 && A < 10 && B >0 && B < 10) { N = A*B; printf("%d\n",N); } else printf("-1\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151920/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151920/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a = 0, b = 0, seki = 0; scanf("%d%d", &a, &b); seki = a * b; if (a <= 9 && b <=9) { printf("%d", seki); } else { printf("-1"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_151964/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_151964/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int A, B; scanf("%d %d%*c", &A, &B); if(A >= 10 || B >= 10){ printf("-1\n"); }else{ printf("%d\n", A * B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_152006/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_152006/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i; scanf("%d",&t); int out[t],x = t; while(t>0) { int n,m; scanf("%d %d",&m,&n); if(m%n!=0) out[t-1] = 0; else out[t-1] = 1; t--; } for(i=x-1;i>=0;i--) { if(out[i] == 0) printf("NO\n"); else printf("YES\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15205/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15205/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void){ int a,b; scanf("%d%d",&a,&b); if(a<10 && b<10) printf("%d",a*b); else printf("-1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_152093/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_152093/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...