Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <string.h> int main(void) { int a; int b = 0; int c = 0; scanf("%d",&a); /* 文字列入力 */ int e = a; while(a){ b = a % 10; c = c + b; a = a / 10; } int d = e % c; if(d == 0){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120747/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120747/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void){ // Your code here! int a = 0; char s[11]; scanf("%s",s); for(int i = 0; i < strlen(s); i++) { a += s[i]-48; } printf("%s\n",(atol(s)%a == 0)? "Yes":"No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120790/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120790/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int N; scanf("%d", &N); int s=0; int m=N; for(int i=0; i<10; i++){ s+=m%10; m/=10; } if(N%s==0){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120848/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120848/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ // Your code here! int n,m; long int k; scanf("%d %d %ld",&n,&m,&k); long int a[200000]={}; long int as[200001]={}; for(int i=0;i<n;i++){ scanf("%ld",&a[i]); if(i==0){ as[i]=0; } as[i+1]=as[i]+a[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120905/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef long long ll; int max(int a, int b){ if(a > b) return a; else return b; } int min(int a, int b){ if(a < b) return a; else return b; } int sort(const void *a ,const void *b){ return *(int*)a - *(int*)b; } int main(){ int n,m,k; ll a[20000...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120949/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120949/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> char a[205], b[205]; int main(){ int k, ans; char *p, *q, *wp, *wq; char *s[3] = { "IDENTICAL", "CLOSE", "DIFFERENT" }; while (scanf("%s", a) && a[0] != '.') { scanf("%s", b); p = a, q = b; ans = -1, k = 0; while (*p && *q) { if (*p != *q) { ans = 2; break; } if (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_120992/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_120992/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, cnt=0, min; char s[300001]; scanf("%d", &n); scanf("%s", s); for(i=1; i<n; i++){ if(s[i] == 'E') cnt++; } min = cnt; for(i=1; i<n; i++){ if(s[i] == 'E') cnt--; if(s[i-1] == 'W') ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121034/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121034/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i, dep = 0, cnt = 0; char s; scanf("%d", &n); for (i = 0; i < n; i++) { scanf(" %c", &s); if (s == 'W') dep++; else if (dep > 0) dep--, cnt++; } printf("%d\n", cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121078/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121078/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <time.h> typedef long long llint; typedef long double ldouble; // 小大 int compare(const void *a, const void *b){return *(llint *)a - *(llint *)b;} typedef struct{ llint aa; llint bb; }frequent; // 小大 int cmp( const void *p, const v...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121120/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121120/source.c" target datalayout = "e-m:e-p270: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.frequent = type { i...
// AOJ 2792: SNS // 2017.11.24 bal4u@uu #include <stdio.h> int main() { long long a, b, jj, k, t, ans; int n, i, j; scanf("%lld%lld%d", &a, &b, &n); ans = 1LL << 60; for (i = 1; i <= n; i++) { if (b % i) continue; for (k = b/i, jj = k, j = 1; j <= n; j++, jj += k) { t = a - jj; if (t < 0) t = -t; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121164/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121164/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <ctype.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <math.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121214/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121214/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 pow_(int a, int n){ if(n == 0) return 1; else{ return a * pow_(a, n - 1); } } int g(int n){ if(n > 3) return 3 * g(n - 1) + pow_(2, n - 1) * 3 - 6; if(n == 3) return 6; } int main(int argc, char *argv[]) { int n; scanf("%d", &n); int ans = 0, s, f, t, z, temp, x = 0; if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121258/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121258/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ char s[10]; scanf("%s",s); if(s[0] ==s[1] &&s[1] !=s[2] &&s[2] ==s[3]) printf("Yes\n"); else if(s[0] ==s[2] &&s[2] !=s[1] &&s[1] ==s[3]) printf("Yes\n"); else if(s[0] ==s[3] &&s[3] !=s[1] &&s[1] ==s[2]) printf("Yes\n"); else printf("No\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121351/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121351/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ char S[5]; int i,k; int num = 0; scanf("%s",S); for(i=0;i<=3;i++){ for(k=0;k<=3;k++){ if(S[i] == S[k]){ num = num+1; } } } if(num == 8)printf("Yes"); else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121401/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { char s[4]; scanf("%s", &s); if(s[0] == s[1] && s[1] != s[2] && s[2] == s[3])printf("Yes\n"); else if(s[0] == s[2] && s[2] != s[1] && s[1] == s[3])printf("Yes\n"); else if(s[0] == s[3] && s[3] != s[1] && s[1] == s[2])printf("Yes\n"); else printf("No\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121445/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121445/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* 長さ4の英大文字からなる文字列Sが与えられます。 Sがちょうど2種類の文字からなり、かつ現れる各文字は ちょうど2回ずつ現れているかどうか判定してください。 <制約> ・Sの長さは4である。 ・Sは英大文字からなる。 例:ASSA -> YES STOP -> No EEEE -> No URL:https://atcoder.jp/contests/abc132/tasks/abc132_a */ #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdbool.h> #define S_LEN (4) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121502/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121502/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ char str[4]; scanf("%s",str); if(str[0]==str[1]&&str[2]==str[3]&&str[0]!=str[2]){printf("Yes");} else if(str[0]==str[2]&&str[1]==str[3]&&str[0]!=str[1]){printf("Yes");} else if(str[0]==str[3]&&str[1]==str[2]&&str[0]!=str[1]){printf("Yes");} else{printf("No");} }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121546/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121546/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d,e,f,i,j,n,ar[101][2]; scanf("%d%d",&n,&a); for(i=0;i<n;i++) scanf("%d%d",&ar[i][0],&ar[i][1]); d=7-a; for(i=1;i<n;i++) { b=7-ar[i][0]; c=7-ar[i][1]; for(j=1;j<7;j++) {if(b!=j&&c!=j&&ar[i][0]!=j&&ar[i][1]!=j) f=j; } e=7-f; if(d!=f&&d!=e) {printf("NO\n"); return 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12159/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12159/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
/* Author: Abhay Problem: 225A (Codeforces) Language: C */ #include <stdio.h> int main () { int n, i, j, x, y, z, dice[7]; scanf ("%d", &n); scanf ("%d", &x); for (i=0; i<n; i++) { for (j=1; j<=6; j++) dice[j] = 0; scanf ("%d", &z); dice...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12164/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12164/source.c" target datalayout = "e-m:e-p270:32:32-p271: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) { char s[5]; scanf("%s",s); int flag = 0; for(int i = 0; i < 4; i++) { int count = 0; for(int j = i; j < 4; j++) { if(s[i] == s[j]) count++; } if(count == 2) flag++; } if(flag == 2) { printf("Yes\n"); } el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121690/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121690/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(){ int n,count=0,i,j,k,l,p,q; char name[26]; scanf("%d",&n); scanf("%s",name); p=strlen(name); for (i=0; i<n; i++) { char plate[101]; scanf("%s",plate); q=strlen(plate); for (j=0; j<q-p+1; j++) { for (k=1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121733/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121733/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 NMAX 100 #define KMAX 25 int matrix[NMAX*2][NMAX], match[NMAX], visit[NMAX]; int Dfs(int, int); int main(void) { int i, x, y, e, s, t, maxflow = 0; scanf("%d %d %d", &x, &y, &e); for (i = 0; i < y; i++) match[i] = -1; for (i = 0; i < e; i++) { scanf("%d %d", &s, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121784/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121784/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 getGCD(int x, int y) { if (y == 0){ return (x); } getGCD(y, x % y); } int getLCM(int x, int y) { if ((x == 0) || (y == 0)){ return (0); } return ((x / getGCD(x, y)) * y); } int main(void) { long x, y; long gcd,lcm; while (scanf("%d %d", &x, &y) != EOF){ gcd = getGCD(x, y); l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121827/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121827/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> long Gcd(long m, long n) { long temp; while (m % n != 0) { temp = n; n = m % n; m = temp; } return n; } long Lcm(long m, long n) { return m * n / Gcd(m,n); } int main(){ long a,b; while(scanf("%ld %ld",&a,&b)!=EOF){ long ans1,ans2; ans1=Gcd(a,b); ans2=Lcm(a,b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121870/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121870/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { while(1) { long a, b; long i = 2; long GCM = 1; long LCM = 1; if (scanf("%ld %ld", &a, &b) == EOF) break; while ((i<=a)&&(i<=b)) { if ((a%i==0)&&(b%i==0)) { GCM *= i; a /= i; b/= i; } else i++; } LCM = GCM * (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121913/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121913/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b, x, y, t, gcd, lcm; while(scanf("%lld%lld", &x, &y)!=EOF){ a = x; b = y; while (b != 0) { t = b; b = a % b; a = t; gcd = a; lcm = (x*y)/gcd; } printf("%lld %lld\n",gcd,lcm); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121957/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121957/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int n,res[t]; for(int i=0; i<t; i++){ scanf("%d",&n); int a[n],b[n],one=0,m_one=0; for(int j=0; j<n; j++) scanf("%d",&a[j]); for(int j=0; j<n; j++) scanf("%d",&b[j]); for(int j=0; j<n; j++){ if(a[j]>b[j]){ if(m_one==0){ res[i]=0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1220/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1220/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 BIGNUM 1000000 int GCD (int a, int b){ int amari; int l, s; if (a < b){ s = a; l = b; } else { s = b; l = a; } amari = l % s; if (amari != 0) GCD(s, amari); else return s; } int main (void){ int a, b; int LCM; while (scanf ("%d %d", &a, &b) != EOF){ int ProcessingFl...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122042/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122042/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a, b; int r; int x, y; int tmp; while (scanf("%d %d", &a, &b) != EOF){ x = a; y = b; if (a < b){ tmp = a; a = b; b = tmp; } r = a % b; while (r != 0){ a = b; b = r; r = a % b; } printf("%d %d\n", b, x / b * y); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122086/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122086/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Max(int, int); int main(void){ int a, b, c, d; while(scanf("%d %d", &a, &b) != EOF){ c = Max(a,b); d = a / c * b; printf("%d %d\n", c, d); } return 0; } int Max(int a,int b){ int rem; if(a == 0 || b == 0) return 0; whi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122129/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122129/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h> int main(void) { int n,i,w; long long ans=0; int max_1=INT_MIN,max_2=INT_MIN; scanf("%d",&n); for (i=0;i<n;i++) { scanf("%d",&w); ans+=w; } for (i=0;i<n;i++) { scanf("%d",&w); if (w>max_1) {max_2=max_1;max_1=w;} else if (w>max_2) {max_2=w;} } if ((max_1+max_2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12218/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12218/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; int gcd,lcm; while(scanf("%d %d",&a,&b) != EOF) { int tmp[2] = {a,b}; while(1) { tmp[0] %= tmp[1]; if(tmp[0] == 0) { gcd = tmp[1]; break; } else { tmp[1] %= tmp[0]; if(tmp[1] == 0) { gcd = tmp[0]; break; } } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122222/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122222/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int gcd(int a, int b) { int r; while((r = a % b)!=0) a = b, b = r; return b; } int lcm(int a, int b, int t) { int u; a = a / t; b = b / t; u = a * b * t; return u; } int main(void) { int a, b, t; while(0<1){ if(scanf("%d", &a) == -1) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122266/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122266/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,t,i,j; while(scanf("%d %d",&a,&b) != EOF) { if(a < b){ t = a; a = b; b = t; } i = a; j = b; while(a != 0 && b != 0) { a = a % b; if(a == 0){ printf("%d %d\n",b,i/b*j); break ; } b = b % a; if(b == 0){ printf("%d ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122316/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122316/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 DIR[4][2]={{0,1},{1,0},{0,-1},{-1,0}}; int R,C; char map[50][51]; int taken[50][50]; int MLX(int r, int c, int last) { int i,nr,nc; taken[r][c]=1; //printf("%d %d\n", r+1,c+1); for(i=0;i<4;i++) if(last==-1 || ((i-last+4)%4 != 2)) { nr=r+DIR[i][0]; nc=c+DIR[i][1]; //printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12236/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @DIR = dso_local local_unname...
#include<stdio.h> long LCM(int a, int b) { long i = 2; long lcm; if(a > b) { lcm = a; while(lcm % b != 0) { lcm = a * i; ++i; } return lcm; } else { lcm = b; while(lcm % a != 0) { lcm = b * i; ++i; } return lcm; } } long GCD(int a, int b) { long gcd; if(a > b) { gcd ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122402/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122402/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, r, tmp; double c; while ( scanf("%d %d", &a, &b) != EOF) { c = (double)a * (double)b; if ( a < b ) { tmp = a; a = b; b = tmp; } r = a % b; while ( r != 0 ) { a = b; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122453/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122453/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); printf("%d %d %7f\n",a/b,a%b,(double)a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122497/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122497/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 dp[55][55]; int exist[55][55]; int is_visited[55][55]; int dfs_visit(char a[][55], int i, int j, int x, int y, int n, int m, int *f, int prevx, int prevy) { if (i >= n || j >= m) { return 0; } if (i == x && j == y) { if ((*f) == 0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12254/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12254/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @is_visited = dso_local local...
#include<stdio.h> int main(void) { int a,b; scanf("%d %d", &a, &b); printf("%d %d %f\n", a/b,a%b,(double)a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122590/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122590/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int a,b; scanf("%d%d",&a,&b); printf("%d %d %7.5f",a/b,a%b,(double)a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122633/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122633/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a, b; int d, r; double f; scanf("%d %d", &a, &b); d = a/b; r = a%b; f = (double)a/b; printf("%d %d %f", d, r, f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122677/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122677/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; double f; scanf("%d %d",&a,&b); f = (double)(a) / (double)(b); printf("%d %d %f\n",a / b,a % b,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122763/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122763/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, d, r; double f; scanf("%d %d", &a, &b); d = a / b; r = a % b; f = ((double)a / (double)b); printf("%d %d %.5f\n", d, r, f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122806/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122806/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a, b; scanf("%d%d", &a, &b); printf("%d %d", a/b, a%b); double c=a, d=b; printf(" %lf", c/d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122857/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <time.h> #define _CRT_SECURE_NO_WARNINGS #define TLong long long // fact(n) int fact(int n){ if(n == 1) return 1; else return (n * fact(n - 1)); } // combination(n,r) int combination(int n, int r){ if(r == 0 || r == n) return 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122914/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122914/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> char S[17]; char code[17] = "CODEFESTIVAL2016"; int result = 0; int main(void) { scanf("%s", S); for(int i=0; i<17; i++) { if(S[i] != code[i]) result++; } printf("%d\n", result); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122958/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122958/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @code = dso_local local_unn...
#include <stdio.h> int main(){ int n1,n2,n3,n4; scanf("%d%d%d%d",&n1,&n2,&n3,&n4); int ans[4]; ans[0] = ans[1] = ans[2] = ans[3] = 0; if(n1 == 1 || n2 == 1 || n3 == 1 || n4 == 1){ ans[0] = 1; } if(n1 == 4 || n2 == 4 || n3 == 4 || n4 == 4){ ans[1] = 1; } if(n1 == 7 || n2 == 7 || n3 == 7 || n4 ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123050/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123050/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define MOD 998244353 long int SUM(long int a,long int b){return (a%MOD+b%MOD+MOD)%MOD;} long int PROD(long int a,long int b){return a%MOD*(b%MOD)%MOD;}//a*b int main(){ long int dp[3001][3001]; int n,s,a,i,j; scanf("%d%d",&n,&s); for(i=0;i<3001;i++)dp[i][0]=0;dp[0][0]=1; for(i=1;i<=n;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123094/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123094/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int H, W, N; int grid[10005]; int a[10005]; int i,j; int colors[10005]; int count=0; int temp; scanf("%d %d",&H,&W); scanf("%d",&N); for(i=0;i<N;i++) { scanf("%d",&a[i]); for(j=0;j<a[i];j++) { colors[count]=i+1; count++; } } for(j=0;j<H;j++) { if(j%2 ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123137/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123137/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void) { char s[1000],t[1000]; int len_s,len_t; int cnt,change=1001; scanf("%s",s); scanf("%s",t); len_s = strlen(s); len_t = strlen(t); for(int i=0;i<len_s - len_t + 1;i++){ cnt = 0; for(int j=i;j<i+len_t;j++){ if(s[j] != t[j-i]){ cnt = cnt+1; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123188/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123188/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 min(int a, int b){return a < b ? a : b;} int main(){ char s[1005], t[1005]; scanf("%s%s",s,t); int ans = 100000; // printf("%d\n",strlen(s)); for(int i = 0; i <= strlen(s) - strlen(t); i++){ int m = 0; for(int j = 0; j < strlen(t); j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123230/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123230/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(void) { char s[1001]; char t[1001]; scanf("%s", s); scanf("%s", t); int i, j; int min = strlen(t); int lim = strlen(s) - strlen(t) + 1; for(i=0; i<lim; i++) { // 一致しなかった文字の数 int not_match = 0; for(j=0; j<strlen(t); j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123281/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123281/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#pragma region kyopuro_templates #pragma GCC optimize("Ofast") #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> #include<assert.h> #include<time.h> #include<ctype.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123339/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node_AVL_set = type...
#include <stdio.h> int main(void) { int n,m,i,j,count=0; scanf("%d%d",&n,&m); for(i=1;i<=n;i++) { for(j=1;j<=m;j++) { if(i%2==1) { printf("#"); } else if(i%2==0&&j<m&&count%2==0) printf("."); else if(i%2==0&&j==m&&count%2==0) printf("#"); else if(i%2==0&&j==1&&count%2==1) printf("#"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12339/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<string.h> int main(void) { char s[101]; int i,j,k; scanf("%s",s); k=strlen(s); for(i=0;i<k;i++) s[i]='x'; printf("%s",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123432/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123432/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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]; scanf("%s",s); int i; for(i=0;s[i]!='\0';i++){ s[i]='x'; } printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123476/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123476/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(){ char str[101]; scanf("%s", str); int len = strlen(str); for (int i = 0; i < len; i++){ printf("x"); } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123519/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123519/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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]; scanf("%s", s); int i = 0; while (s[i] != 0) { s[i] = 'x'; i++; } printf("%s\n", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123562/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123562/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { char s[200]; scanf("%s",&s); int i,n; n=strlen(s); for(i=0;i<n;i++) printf("x"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123605/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123605/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(){ char s[100]; int i; scanf("%s",s); for(i = 0 ; i < strlen(s) ; i++){ printf("x"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123649/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123649/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void){ char s[100]; int len; int k; scanf("%s", s); len = strlen(s); for (k = 0; k < len; k++) { s[k] = 'x'; } printf("%s\n", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123706/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123706/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MAXLEN 100 int main(){ char s[MAXLEN+1]; int i, len; scanf("%s", s); len = strlen(s); for(i=0; i<len; i++){ printf("x"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123764/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123764/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int A,B; scanf("%d%d",&A,&B); if(A>B){ if(A-1>B) printf("%d\n",2*A-1); else printf("%d\n",A+B); } else if(A<B){ if(B-1>A) printf("%d\n",2*B-1); else printf("%d\n",A+B); } else printf("%d\n",A+B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123807/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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",&a); scanf("%d",&b); if (a > b){ printf("%d",2*a-1); }else if (a < b){ printf("%d",2*b-1); }else{ printf("%d",2*a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123850/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123850/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main (void){ int s,b; scanf("%d%d",&s,&b); int sum=s+b; if(s+s-1>sum){ sum=s+s-1; } if(b+b-1>sum){ sum=b+b-1; } printf("%d",sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123908/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123908/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int a; int b; int coin; int main(void){ scanf("%d %d", &a, &b); if(a>b){ coin = a+a-1; printf("%d\n",coin); }else if(a<b){ coin = b+b-1; printf("%d\n",coin); }else{ coin = a+b; printf("%d\n",coin); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123951/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123951/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i; X=0; scanf("%d %d",&A,&B); for(i=1;i<=2;i++){ if(A>=B){ X=X+A,A=A-1;} else{ X=X+B,B=B-1;} } printf("%d",X); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123995/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123995/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int a,b; int sum=0; int i; scanf("%d %d",&a,&b); for(i=0;i<2;i++){ if(a>=b){ sum=sum+a; a=a-1; } else{ sum=sum+b; b=b-1; } } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124037/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124037/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// Ver19.03 #include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #define INF (1 << 29) * 2 #define LLINF 4545454545454545454 #define MOD 1000000007 #define ll long long #define ull unsigned long long #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) int upll(con...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124080/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124080/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <ctype.h> void print_int(int n) { printf("%d\n",n); } void swap(int * a, int * b) { int t = *a; *a = *b; *b = t; } void sort(int a[], int n) { for(int i = 1; i < n; i++) { int j = i-1; while(j >= 0 && a[j+1] > a[j]) { swap(&a[j+1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124123/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124123/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int A,B,C; scanf("%d %d",&A,&B); if(A>=B){ C=A; A--; }else{ C=B; B--; } if(A>=B){ C+=A; }else{ C+=B; } printf("%d\n",C); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124174/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124174/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int a, b; scanf("%d %d", &a, &b); if (a == b) { printf("%d\n", (a + a)); } else if (a < b){ printf("%d\n", (b + b - 1)); } else { printf("%d\n", (a + a - 1)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124217/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b,c,y,z,x,n,m; x=0; scanf("%d%d",&a,&b); if(b>a){ c=a; a=b; b=c; } x=x+a; a=a-1; if(b>a){ c=a; a=b; b=c; } x=x+a; printf("%d\n",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124260/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x,y; scanf("%d", &x); scanf("%d", &y); int ans; ans = 2*x -1; if(ans<2*y -1)ans = 2*y -1; if(ans<x+y)ans = x+y; printf("%d",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124303/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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/04/13 * Author: family */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { int A, B; int result = 0; scanf("%d %d", &A, &B); if(A > B) { result = A + (A - 1); } else if (A == B){ result = A + B; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124347/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124347/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int sum; if(A > B) sum = A + A - 1; else if(A < B) sum = B + B - 1; else sum = A + B; printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124390/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124390/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdlib.h> #include <string.h> #include <stdio.h> typedef struct word{ char s[32]; int p[110],pn; }WORD; WORD a[110]; int comp_str(const void *a,const void *b){ WORD *p=(WORD *)a,*q=(WORD *)b; //return strcmp((char *)a,(char *)b); return strcmp((char *)p->s,(char *)q->s); } int comp_int(const void *a,con...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124448/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124448/source.c" target datalayout = "e-m:e-p270: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.word = type { [32 x...
// AOJ GRL_4_A Path/Cycle - Cycle Detection for a Directed Graph // 2018.4.26 bal4u #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_V 102 int V; // 頂点数 int to[MAX_V][MAX_V], hi[MAX_V]; int q[MAX_V], top, end; int count[MAX_V]; //#define getchar_unlocked() getchar() int in() { int n = 0; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124499/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124499/source.c" target datalayout = "e-m:e-p270: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> #include <string.h> int max(int a,int b){if(a>b)return a;return b;} int LCS(char a[],char b[],int m,int n) { int L[m+1][n+1]; for(int i=0;i<=m;i++) { for(int j=0;j<=n;j++) { if(i==0 || j==0) L[i][j] = 0; else if(a[i-1] == b[j-1]) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124556/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124556/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int t=0,n=0,m=0,i,j,k; scanf("%d",&t); for(i=0;i<t;i++) { scanf("%d",&n); int a[n],b[n],f=0,p1=-1,p2=-1; for(j=0;j<n;j++) scanf("%d",&a[j]); for(j=0;j<n;j++) scanf("%d",&b[j]); for(j=0;j<n;j++) { if(j==0&&a[j]!=b[j]){ f=1; break; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1246/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1246/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 compare(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main(void) { int i, j; int n, a[2][49], b[50]; int sum[50]; scanf("%d", &n); for (i = 0; i < 2; i++) for (j = 0; j < n - 1; j++) scanf("%d", a[i] + j); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12465/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12465/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<limits.h> #define rep(i,begin,end) for(int i=begin; i<end; i++) #define revrep(i,begin,end) for(int i=begin; i>end; i--) #define lld long long int int main(){ int n, m; scanf("%d %d", &n, &m); int wf[n+1][n+1]; rep(i, 0,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124693/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124693/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdbool.h> #define N_MAX 100 #define M_MAX 1000 #define INF 10000000 #define SMAP(a, b) ((a)!=(b))&&((a)^=((b)^=((a)^= (b)))) typedef unsigned long long ull; int d[M_MAX]; int n, m; int i, j, k; int e[M_MAX][2]; int edge[N_MAX][N_MAX]; int path[N_MAX][N_MAX]; void ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124736/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124736/source.c" target datalayout = "e-m:e-p270: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> int dp[3][100]; int main() { int n,i,inter[100],pans=0; char di[3][101]; int secrow[100],firstrow[100]; scanf("%d",&n); for(i=0;i<(n-1);i++) scanf("%d",&secrow[i]); for(i=0;i<(n-1);i++) scanf("%d",&firstrow[i]); for(i=0;i<(n);i++) scanf("%d",&inter[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12478/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12478/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i, j, n, k; scanf("%d", &n); int a[n + 1]; for (i = 1 ; i <= n; ++i) { scanf("%d", &a[i]); } int start = 1; while (0 == a[start]) { ++start; if (start > n) { break; } } int end = n; while (0 == a[end]) { --end; if (end < 1) { break; } } int ans = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12483/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12483/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> long long int min(long long int a, long long int b){return a < b ? a : b;} int max(int a, int b){return a > b ? a : b;} int main(void){ int n, k; scanf("%d%d", &n, &k); int a[15]; int i, j; for(i = 0; i < n; i++){ scanf("%d", &a[i]); } long long int ans = 999999999...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124880/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124880/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> int N,G[2],M,i,j,k,t,c,R=0; int B[2][505][505]={0},p[1000005][2][2],C[2]={0},mx[4]={1,0,1,1},my[4]={0,1,1,-1}; int dfs(int P,int y,int x,int my,int mx) { if(y<0||y>=N||x<0||x>=N||!B[P][y][x])return 0; return dfs(P,y+my,x+mx,my,mx)+1; } int main() { memset(p,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124923/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124923/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @R = dso_local local_unname...
#include <stdio.h> int main() { int x; scanf("%d", &x); if (x >= 30) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124974/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 X; scanf("%d",&X); if(X>=-40&&X<=40) { if(X>=30) { printf("Yes"); } else printf("No") ; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125016/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 tc; scanf("%d",&tc); tc >= 30 ? printf("Yes\n") : printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125067/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125067/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n; scanf("%d",&n); if(n>=30) printf("Yes"); else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125117/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125117/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int X; scanf("%d",&X); if(X>=30){ printf("Yes"); }else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125160/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 X; scanf("%d", &X); if(X >= 30) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125210/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125210/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x; scanf("%d",&x); if(x>=30){ printf("Yes"); } else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125254/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125254/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x; scanf("%d", &x); if(x < 30) printf("No"); else printf("Yes"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125298/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125298/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> void swap (int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } int gcd(int a,int b){ if(a<b){ swap(&a,&b); } if(b==0){ return a; } int r=a%b; while(r!=0){ a = b; b = r; r = (a%b)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125348/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125348/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x; scanf("%d", &x); if(x < 30) { printf("No\n"); } else { printf("Yes\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125391/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125391/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n, m; int i, j; int temp; int end; int answer[5][100]; int counter = 0; int array[1000][100]; int sum[100]; int ans[100]; int s[5]; while(1){ scanf("%d%d", &n, &m); if(n == 0 && m == 0){ break ; } s[counter] = m; for(j = 0; j < m;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125441/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125441/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#pragma region kyopuro_templates #pragma GCC optimize("Ofast") #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> #include<assert.h> #include<time.h> #include<ctype.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125506/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125506/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node_AVL_set = type...