Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #include<string.h> int n,i,j,k,p,ans; int a[6000]; int s[5202][5202]; char c[6000]; int main() { scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s",c); for(j=0;j<n/4;j++) { if(c[j]>='0'&&c[j]<='9')k=c[j]-48; else k=c[j]-'A'+10; a[4*j]=k/8; a[4*j+1]=(k%8)/4; a[4*j+2]=(k%4)/2; a[4*...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20570/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20570/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 year,month,day; scanf("%d/%d/%d",&year,&month,&day); if(year!=2018){ year=2018; } printf("%d/",year); if(month<10){ printf("0"); } printf("%d/",month); if(day<10){ printf("0"); } printf("%d",day); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205743/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205743/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,t,e,i; int x[100],ans=-1; scanf("%d %d %d",&n,&t,&e); for(i=0;i<n;i++){ scanf("%d",&x[i]); if(t%x[i]<=e||x[i]-(t%x[i])<=e){ ans=i+1; } } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205945/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205945/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 q,c,a,n,i,cnt; scanf("%d",&q); for(i=0;i<q;i++){ scanf("%d %d %d",&c,&a,&n); cnt=0; while(1){ if(c==0||a==0||n==0)break; c--; a--; n--; cnt++; } while(1){ if(c<2||a==0)break; c-=2; a--; cnt++; } while(1){ if(c<3)break; c-=3; cnt...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205989/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205989/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100001],l[100001]; int check(long n,int i){ l[0]=(i%2==0)?'S':'W'; l[1]=(i/2==0)?'S':'W'; long j; for(j=1;j<n-1;j++){ if(l[j]=='S'){ if(s[j]=='o') l[j+1]=l[j-1]; else l[j+1]=(l[j-1]=='W')?'S':'W'; }else{ if(s[j]=='x') l[j+1]=l[j-1]; else l[j+1]=(l[j-1]=='W')?'S':'W'; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206038/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206038/source.c" target datalayout = "e-m:e-p270: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 global [1000...
#include<stdio.h> #include<stdlib.h> #include<math.h> int sosu(int i) { int k; if(i==1) return 0; if(i==2||i==3) return 1; for(k=2;k<=sqrt(i);k++) if(i%k==0) return 0; return 1; } int main() { int a,d,n; int i,j; while(1){ scanf("%d %d %d",&a,&d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206081/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206081/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ll long long #define rep(i,l,r)for(ll i=l;i<r;i++) #define PLIMIT 1000000 int prime[PLIMIT+10]; void makep(ll n){prime[0]=prime[1]=1;for(int i=2;i*i<=n;i++)if(!prime[i])for(int j=i*i;j<=n;j+=i)prime[j]=1;} int main(){ makep(PLIMIT); ll a,d,n; while(scanf("%lld%lld%lld",&a,&d,&n),n){ ll...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206124/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206124/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @prime = dso_local local_un...
#include<stdio.h> int main(){ int n = 0, p = 0; char t = '\0'; while(1){ scanf("%c", &t); if( t == '\n'){ break; } n++; if( t == 'p' ){ p++; } } printf("%d\n", n/2-p); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206168/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206168/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 isNum(A) (A<='9' && A>='0') #define SIZE 99 #define max(a,b) (a>b ? a : b) int map[SIZE][SIZE]; int main(void) { int i, j, n, t; char ch = getchar(); /* init */ for(i=0; i<SIZE; i++) for(j=0; j<SIZE; j++) map[i][j] = 0; /* input */ i = j = n = 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206225/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206225/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @map = dso_local local_unna...
#include <stdio.h> int main(void) { double l; scanf("%lf", &l); printf("%.12f\n", (l / 3) * (l / 3) * (l / 3)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206283/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206283/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 l; scanf("%d",&l); printf("%f",(l/3.0)*(l/3.0)*(l/3.0)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206326/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206326/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 K 500 #define N_ ((K + 1) * (K + 1)) #define INF 0x3f3f3f3f int *ej[N_], *ew[N_], eo[N_], n_; void append(int i, int j, int w) { int o = eo[i]++; if (o >= 2 && (o & o - 1) == 0) { ej[i] = (int *) realloc(ej[i], o * 2 * sizeof *ej[i]); ew[i] = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20637/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20637/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @eo = dso_local local_unnamed...
#include <stdio.h> int main(){ int L; scanf("%d",&L); printf("%.12f\n",(double)L*L*L/27); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206412/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206412/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j; double s,q,h,k; scanf("%d",&a); h=(double)a; q=h/3; s=q*q*q; printf("%.12lf\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206456/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206456/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* * Author : Abhay Jain * Problem : 246A * Language : C * Description : Codeforces Round 151 (Div 2) */ #include <stdio.h> int main () { int n, i; scanf ("%d", &n); if (n == 1 || n == 2) printf ("-1\n"); else { for (i=0; i<n; i++) printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2065/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include <stdio.h> int main(void) { long int l; long double hen, result; scanf("%ld" , &l); //printf("%d\n", l); hen = (double)l / 3; //printf("%.10Lf\n", hen); result = hen * hen * hen; printf("%.15Lf\n", result); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206542/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206542/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206586/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206586/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.sd = type { i32, i3...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left!=NIL) x=x->left; return x; } Node treeMaximum(Node x){ while(x->right!=NIL) x=x->right; re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206636/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206636/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include<stdio.h> int main() { long long int n,A[5005],B[5005],C[5005],count[5],j,kl,ans,i,x,k,l; scanf("%lld",&n); for(i=1;i<=5;i++) count[i]=0; j=1;k=1;l=1; for(i=1;i<=n;i++) { scanf("%lld",&x); count[x]++; if(x==1) A[j++]=i; else if(x==2) B[k++]=i; else C[l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20668/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[200000][2],i,j,k,n,an[200001],fl[1000001]; long long l=0,r=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d%d",&a[i][0],&a[i][1]); fl[a[i][0]]=i+1; l=l+a[i][0]; r=r+a[i][1]; } for(i=0;i<n;i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20673/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20673/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> typedef struct node { int key; struct node *p , *r , *l; } Node; Node *root, *NIL; Node * treeMinimum(Node *x) { while(x->l != NIL) x = x->l; return x; } Node * find(Node *u,int k) { while(u != NIL && k != u->key) { if( k < u->key) u = u->l; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206773/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206773/source.c" target datalayout = "e-m:e-p270: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> #include<stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; Node root; Node find(Node root,int key){ if(root==NIL||root->key==key) return root; if(root->key > key) return find(root->left,key...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206823/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206823/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include<stdio.h> #include<stdlib.h> struct tree { int data; struct tree *left; struct tree *right; }; struct tree *sentinel, *root; int Search(struct tree*, int); struct tree *Insert(struct tree*, int); struct tree *Alsearch(struct tree**); struct tree *Remove(struct tree**, int); void Dispm(struct tree*); void ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206867/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206867/source.c" target datalayout = "e-m:e-p270: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.tree = type { i32, ...
#include <stdio.h> #include <stdlib.h> struct node{ struct node *right; struct node *left; struct node *p; int key; }; typedef struct node * Node; Node root,NIL; Node treeMinimum(Node x){ while(x -> left != NIL){ x = x-> left; } return x; } Node treeMaximum(Node x){ while(x -> right != NIL)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206953/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206953/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include <stdio.h> #include <stdlib.h> typedef struct _node { int key; struct _node **parent; struct _node *left; struct _node *right; } node; typedef void(*FUNCP)(node *); node *allocNode(int key) { node *p = (node *)malloc(sizeof(node)); p->key = key; p->parent = NULL; p->left = NULL; p->right = NULL; r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207002/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207002/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> #include <string.h> struct Node { int key; struct Node *right, *left, *parent; }; typedef struct Node Node; Node *root, *NIL; Node * treeMinimum(Node *x) { while(x->left != NIL) x = x->left; return x; } Node * find(Node *u, int k) { while(u != NIL && k != u->key)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207046/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207046/source.c" target datalayout = "e-m:e-p270: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> long long int n; long long int pr[5005]; long long int m[5005]; long long int pe[5005]; long long int p,ma,f; long long int h=1,g=1,j=1; int main(){ scanf("%lld",&n); long long int i,t; for(i=1;i<=n;i++){ scanf("%lld",&t); if (t==1){ pr[h]=i; p++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20709/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20709/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @h = dso_local local_unnamed_...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node* Node; #define NIL NULL struct node a[500000]; int size=0; Node root = NIL; Node treeMinimum(Node x){ while(x->left!=NIL)x=x->left; return x; } Node tr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207132/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207132/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include <stdio.h> #include <stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left != NIL) x = x->left; return x; } /*Node treeMaximum(Node x){ }*/ Node treeSearch(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207176/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207176/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left!=NIL) x =x->left; return x; } Node treeMaximum(Node x){ while(x->right != ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207219/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207219/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include<stdio.h> int getmin(int x,int y,int z); int main () { int n,k,l,c,d,p,nl,np; int x,y,z; while (scanf("%d%d%d%d%d%d%d%d",&n,&k,&l,&c,&d,&p,&nl,&np)!=EOF) { x = k*l/nl; y = c*d; z = p/np; printf("%d\n",getmin(x,y,z)/n); } return 0; } int getmin(int x,int y,int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20727/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20727/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { char S[20]; char T[21]; scanf("%s",S); scanf("%s",T); int sizeS = strlen(S); int sizeT = strlen(T); int count = 0; if(sizeS>=1 && sizeS<=10 && sizeT==sizeS+1) { for(int i=0;S[i]!='\0';i++) { if(S[i]==T[i]) { count++; } } if(co...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207312/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207312/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define N 100 int main(void){ int j,F = 1; char s[N],s_n[N]; scanf("%s",&s); //printf("s = %s\n",s); //OK scanf("%s",&s_n); //check(&s); for(j = 0; s[j] != '\0';j++){ //printf("s = %c, s_n = %c\n",s[j],s_n[j]); if(s[j] != s_n[j]){ printf("No\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207363/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207363/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[20]; char t[21]; int ans=0; scanf("%s ",s); scanf(" %s ",t); for(int i=0;i<strlen(s);++i){ if(s[i]!=t[i]){ ans+=1; break; } } if(ans==0){ printf("Yes\n"); }else { printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207406/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207406/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 min(int a,int b,int c) { if(a<b&&a<c) return a; else if(b<a&&b<c) return b; else return c; } int main() { int n,k,l,c,d,p,nl,np,a; scanf("%d %d %d %d %d %d %d %d",&n,&k,&l,&c,&d,&p,&nl,&np); a=min(k*l/nl,c*d,p/np)/n; printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20745/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20745/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<string.h> int main(){ int len; char S[20],T[20]; scanf("%s%s",S,T); len=strlen(S); for(int i=0;i<len;++i){ if(S[i]!=T[i]){ printf("No\n"); return 0; } } printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207493/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207493/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ int K,A,B,i; char str1[1000],str2[1000]; fgets(str1, sizeof(str1), stdin); fgets(str2, sizeof(str2), stdin); if(strncmp(str1,str2,(strlen(str1)-1)) == 0){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207536/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207536/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include <stdio.h> #include <string.h> int main(void){ char S[100]; char T[100]; scanf("%s",S); scanf("%s",T); int a = strlen(S); int b = strlen(T); int count=0; for(int i=0;i<a;i++){ if (S[i]==T[i]) count++; } if(count==a) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207587/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> int main(void){ char s[11],t[12]; scanf("%s%s",s,t); int a=strlen(s); if(strncmp(s,t,a)==0) printf("Yes"); else { printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207651/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207651/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[20],t[20]; int i; scanf("%s %s",s,t); for(i=0;s[i];i++){ if(s[i]!=t[i]){ printf("No\n"); return 0; } } if(t[i]==0||t[i+1]){ printf("No\n"); return 0; } printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207716/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207716/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 judge(int hand[5]); void sort(int *hand); int main(void) { int hand[5]; char rank; int OF; while (scanf(" %d,", &OF) != EOF){ hand[0] = OF; scanf("%d,%d,%d,%d", &hand[1], &hand[2] , &hand[3], &hand[4]); sort(hand); rank = judge(hand); switch (rank){ case ('S'): ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207767/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207767/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <limits.h> #include <stdbool.h> int main(){ int n,m; scanf("%d%d",&n,&m); int i,j,k,v; int member[n+1];//0-n int wwe; memset(member,0,sizeof(int)*(n+1)); /* for(v=0;v<=n;v++){ printf("%d:%d\n",v,member[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20781/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20781/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 k,mod = 0; scanf("%ld", &k); for (long i = 1; i <= k; i++) { mod = mod*10+7; mod %= k; if (mod == 0) { printf("%ld\n", i); return 0; } } printf("-1\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207910/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207910/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int i,k,num=7; scanf("%d",&k); for(i=1;i<=k;i++){ if(num%k==0){ printf("%d\n",i); return 0; } num%=k; num=num*10+7; } puts("-1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207954/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207954/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 f(const void *a,const void *b){ return *(int*)b-*(int*)a; } int main(){ int N,K; int H[200002]; scanf("%d %d",&N,&K); for(int i=0;i<N;i++) scanf("%d",H+i); qsort(H,N,sizeof(int),f); long long int ans=0LL; for(int i=K;i<N;i++) ans+=(long long int)H[i];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207998/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207998/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> //ソート用の判定関数 int compare_int(const void *a, const void *b){ return *(long int*)b - *(long int*)a; // 降順 } int main(int argc, char const *argv[]) { /* code */ int n, k; int i; long int result=0; scanf("%d %d", &n, &k); long int h[n]; for(i=0; i<n; i++){ scan...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208047/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208047/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int compare(const void *a,const void *b){ if(*(int *)a>*(int *)b)return -1; return 1; } int main(){ int n,k; scanf("%d %d",&n,&k); int h[n],i; for(i = 0;i<n;i++){ scanf("%d",&h[i]); } long long count; count = 0; qsort(h,n,sizeof(int)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208098/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208098/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208155/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.sd = type { i32, i3...
#include <stdio.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b){ printf("%d\n",c); } if(a==c){ printf("%d\n",b); } if(b==c){ printf("%d\n",a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208199/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 num1,num2,num3; char str[16]; fgets(str,sizeof(str),stdin); sscanf(str,"%d%d%d",&num1,&num2,&num3); if(num1 == num2) { printf("%d\n",num3); }else if(num1 == num3) { printf("%d\n",num2); }else { printf("%d\n",num1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208249/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208249/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include <stdio.h> int main(void){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b)printf("%d",c); else if(b==c)printf("%d",a); else if(c==a)printf("%d",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208292/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208292/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> void run(void){ int a,b,c; scanf("%d%d%d",&a,&b,&c); printf("%d\n",a==b?c:a==c?b:a); } int main(void){ run(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208335/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208335/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&A); scanf("%d",&B); scanf("%d",&C); if(A == B){ printf("%d",C); }else if(A == C){ printf("%d",B); }else{ printf("%d",A); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208386/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208386/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c; while( scanf("%d%d%d",&a,&b,&c) !=EOF ){ if( a == b )printf("%d\n",c); else if( a == c )printf("%d\n",b); else printf("%d\n",a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208429/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208429/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void) { int i; int len; char s[200001]; char t[200001]; int s_n[200001]={0}; int t_n[200001]={0}; int s_a[26]={0}; int t_a[26]={0}; scanf("%s%s",s,t); len=strlen(s); for(i=0;i<len;i++){ s_a[s[i]-'a']++; s_n[i]=s_a[s[i]-'a']; } for(i=0;i<len;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208472/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208472/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[200001],t[200001]; int change[26]={-1},change2[26],i; for(i=0;i<26;i++){ change[i]=-1; change2[i]=-1; } scanf("%s%s",s,t); for(i=0;s[i]!=0;i++){ if(change[s[i]-'a']==-1||change[s[i]-'a']==t[i]-'a'){ change[s[i]-'a']=t[i]-'a'; }else { puts("No"); return 0; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208515/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208515/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, p; scanf("%d %d %d %d %d",&a,&b,&c,&d,&p); a = a * p; if (p > c) { b = b + (p - c) * d; } if (a < b) { printf("%d\n",a); }else{ printf("%d\n",b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208638/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208638/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int x1,y,ylim,y1,p,xsum,ysum; scanf("%d%d%d%d%d",&x1,&y,&ylim,&y1,&p); xsum=p*x1; if(ylim < p) ysum=y+(p-ylim)*y1; else ysum=y; if(xsum<=ysum) printf("%d\n",xsum); else printf("%d\n",ysum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208689/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208689/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int a,b,c,d,p,sum; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); scanf("%d",&p); int J; J=a*p; if(p>c){ int K; K=p-c; sum=d*K; b=b+sum; } if(J>b){ printf("%d",b); } else if(J==b){ printf("%d",b); } else if(J<b){ printf("%d",J); } printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208731/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208731/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define MAX 10000 typedef struct node{ int id; int rootid; struct node *up; }node; int Getrootid(node N[],int x){ node *p; if(N[x].up==NULL)N[x].rootid=x; else{ p=N[x].up; while(p->up != NULL)p=p->up; N[x].rootid=p->id; N[x].up=p; } return N[x].rootid; } int main(){ int n,q...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208775/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208775/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> int asc(const void *a, const void *b) { return *(int *)b - *(int *)a; } int main() { int n,l[2000],i,j,k; long long ans = 0; scanf("%d",&n); for(i = 0; i < n;i++)scanf("%d",&l[i]); qsort(l,n,sizeof(int),asc); for (i = 0; i < n; i++) { for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208832/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208832/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> int compare_int(const void *a, const void *b){ return *(int*)a - *(int*)b; } int main(void){ int N,i,j,k,L[2001],s,ans=0; scanf("%d",&N); for(i = 0;i < N;i++){ scanf("%d",&L[i]); } qsort(L,N,sizeof(int),compare_int); for(i = 0;i < N;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208883/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208883/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 func(int a, int b, int c){ if(a < b+c && b < a+c && c < a+b){ return 1; } return 0; } void swap(int* a, int* b){ int buf = *a; *a = *b; *b = buf; } void sort(int* a, int n){ if(n <= 1){ return; } int l = 0, r = n-1; int p = *(a + (n/2)); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208940/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208940/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef long long int type; typedef struct array{ type *a; long long int length; } array; array ar_init(int n){ array a; a.a = calloc(sizeof(type),n); return a; } void ar_push(array* a,type x){ a->a[a->length++] = x; } type ar_pop(array* a){ return a->a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208984/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208984/source.c" target datalayout = "e-m:e-p270: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.array = type { ptr,...
#include <stdio.h> #include <string.h> #define SEGTREE_MAX 131072 typedef struct { int max_num; int push_num; } segtree_t; segtree_t segtree[SEGTREE_MAX*2-1]; void segtree_push(int youso) { if(youso*2+1<SEGTREE_MAX*2-1) { segtree[youso*2+1].push_num+=segtree[youso].push_num; segtree[youso*2+2].push_num+=segt...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209026/source.c" target datalayout = "e-m:e-p270: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.segtree_t = type { ...
#include <stdio.h> int N; char board[102][102]; int main() { int i,j,adj,status=0; scanf("%d",&N); for(i=1; i<=N; i++) { for(j=1; j<=N; j++) { scanf(" %c",&board[i][j]); } } for(i=1; i<=N; i++) { for(j=1; j<=N; j++) { if('o'==board[i-1][j]) adj++; if('o'==board[i][j-1]) adj++; if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20907/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20907/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 h,w,a,b,c,blank,blankremain; scanf("%d %d",&h,&w); scanf("%d %d",&a,&b); blank=h*w; c=w*a+(h-a)*b; blankremain=blank-c; printf("%d",blankremain); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209112/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209112/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdint.h> #include <inttypes.h> int main (int argc, char const *argv[]) { int64_t H, W, h, w; scanf("%"PRId64"%"PRId64, &H, &W); scanf("%"PRId64"%"PRId64, &h, &w); printf("%"PRId64"\n", (H - h) * (W - w)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209163/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int H; int W; int h; int w; scanf("%d%d",&H,&W); scanf("%d%d",&h,&w); int ans=(H-h)*(W-w); printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209206/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209206/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 white_h,white_w; int black_h,black_w; scanf("%d %d %d %d",&white_h,&white_w,&black_h,&black_w); printf("%d",(white_h-black_h)*(white_w-black_w)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209257/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209257/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <ctype.h> #include <math.h> int main(){ int H,W,h,w,ans=0,i,j; scanf("%d%d%d%d",&H,&W,&h,&w); H-=h; W-=w; int array[H][W]; for (i=0; i<H; i++) { for (j=0; j<W; j++) { ans++; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209307/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209307/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h,w,sum; scanf("%d %d",&H,&W); scanf("%d %d",&h,&w); sum = H*W-(h*W+w*H-h*w); printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209350/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209350/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int H, W, h, w; scanf("%d %d", &H, &W); scanf("%d %d", &h, &w); printf("%d\n", H * W - (H * w) - (h * W) + h * w); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209394/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209394/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int i,j,e,m; double k; while(1){ scanf("%d",&e); if(e==0)break; m=1000000; for(i=0;i<101;i++){ for(j=0;j<1001;j++){ k=e-(i*i*i+j*j); if(i+j+k<m && k>=0){ m=i+j+k; } } } printf("%d\n",m); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209466/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209466/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define rrep(i,l,r)for(ll i=(l);i>=(r);i--) #define INF (1LL<<60) #define MOD1 1000000007 #...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209552/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209552/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j,a,n,ans; char s[200]; scanf("%s",s); i=0,j=0,ans; while(s[n]!='\0'){n++;} for(i=2;i<n;i+=2){a=0; for(j=0;j<(n-i)/2;j++){ if(s[j]!=s[(n-i)/2+j]){a++;} } if(a==0){ans=n-i;break;} } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209596/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209596/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[201]; int i,ans; scanf("%s",s); int len=strlen(s); for(i=len-2; i>0; i-=2){ if(strncmp(s,s+i/2,i/2)==0){ ans=i; break; } } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209653/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209653/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[202]; int len, i, j; scanf("%s", s); len = strlen(s); if(strlen(s) == 2){ printf("1\n"); return 0; } while(1){ len -= 2; j = len/2; for(i = 0; i < len/2; i++){ if(s[i] != s[j]) break; if(i == len/2-1){ prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209703/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209703/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[201]; int len; int i,j; scanf("%s",s); len = strlen(s); s[len - 1] = '\0'; for(j = len;j > 0;j--){ s[j] = '\0'; if((len = strlen(s)) % 2 != 0){ continue; }; for(i = 0;i < (len...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209747/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209747/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 double triangle(long double d1[],long double d2[], long double d3[]){ long double h1,h2,h3,s,S; h1=(long double)sqrt((double)((d3[1]-d2[1])*(d3[1]-d2[1])+(d3[0]-d2[0])*(d3[0]-d2[0]))); h2=(long double)sqrt((double)((d3[1]-d1[1])*(d3[1]-d1[1])+(d3[0]-d1[0])*(d3[0]-d1[0]))); h3...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209790/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209790/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define mod 1e9+7 #define ll long long int #define epsilon 1e-7 int compare_int(const void *a, const void *b){ int *A = (int *)a; int *B = (int *)b; return *A - *B; } int main(void){ int n; scanf("%d", &n); int a[n]; f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209862/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209862/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 //Ver.20181228 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209905/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define MAX 100 int main() { int a, b; char s[MAX]; scanf("%d %d",&a,&b); scanf("%s",s); s[b-1]+='a'-'A'; printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209956/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209956/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int isPrime(int number); int main() { int setTotal; scanf("%d", &setTotal); int text[100]; for (int setIndex = 0; setIndex < setTotal; setIndex++) { int n; scanf("%d", &n); scanf("%d", &text[0]); int compositeSum = text[0]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 consta...
#include<stdio.h> #include<string.h> int main() { int a,b,i; char n[50]; scanf("%d%d%s",&a,&b,&n); n[b-1]+=32; printf("%s",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210055/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210055/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<ctype.h> int main(void) { int n,k,c; char s[55]; scanf("%d%d%s",&n,&k,s); c=tolower(s[k-1]); s[k-1]=c; printf("%s",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210099/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210099/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n,k; char s[50]; scanf("%d %d",&n,&k); scanf("%s",s); s[k-1] += 32; printf("%s",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210141/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210141/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[51]; int N,i; scanf("%d %d",&N,&i); scanf("%s",str); str[i-1] += 'a'-'A'; printf("%s\n",str); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210185/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210185/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 change_character(int N, int K) { char S[N+1]; scanf("%s",S); S[K-1] = tolower(S[K-1]); printf("%s",S); } int main(void) { int N, K; scanf("%d%d",&N,&K); change_character(N,K); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210228/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210228/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, const char * argv[]) { int N = 0; int K = 0; char S[50] = {0}; scanf("%d",&N); scanf("%d",&K); scanf("%s",S); for (int i = 0; i < K; i++) { if (i+1 == K) { if (S[i] == 'A') { S[i] = 'a'; }else i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210279/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210279/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int K,N; char S[50]; scanf("%d %d",&N,&K); scanf("%s",S); S[K-1]+=0x20; printf("%s\n",S); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210321/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210321/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int N=0,K=0; char S[50]={}; scanf("%d",&N); scanf("%d",&K); scanf("%s",&S); S[K-1]=S[K-1]-'A'+'a'; for(int i=0;i<N;i++){ printf("%c",S[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210365/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <ctype.h> int main() { char str[55]; char ch; int n, k; scanf("%d %d", &n, &k); k--; for (int i = 0; i < n; i++) { scanf(" %c", &ch); if (i == k) { ch = tolower(ch); } putchar(ch); } putchar('\n'); retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210408/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210408/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <ctype.h> #include <float.h> #include <inttypes.h> #include <limits.h> #include <signal.h> #include <stdarg.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <math.h> #ifdef __cplusplus #include <bits/stdc++.h> ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210451/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210451/source.c" target datalayout = "e-m:e-p270: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 main(void) { int n, m; double g[100][100]; double baby[100], baby_next[100]; int i, j, k; double max; while (1){ scanf("%d%d", &n, &m); if (n == 0 && m == 0){ break; } for (i = 0; i < n; i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210495/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main () { int l,x; scanf("%d %d ",&l,&x); int a=0; int i; char buff[6]={0}; for(i = 0; i < l*x; ++i){ buff[0]=getchar(); buff[1]=getchar(); buff[2]=getchar(); buff[3]=getchar(); buff[4]=getchar(); if(strcmp(buff, "snuke")==0){ a=1; break; } getchar();...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210545/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210545/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex3_5 hangan2020*/ #include <stdio.h> #include <string.h> int main(void){ char str[11], *p; int len, max; //文字列入力 scanf("%s", &str[0]); //文字列先頭のアドレス p = str; len = 0; max = 0; //null文字ではない間に while(*p){ //長さリセット len = 0; //ACGT列を見つけた...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210596/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210596/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex 5_4 Tarara */ #include <stdio.h> // 文字列長は10よりも大きくする #define MAX_LEN 15 // a, bの内大きい値を返す int max(int a, int b) { return a > b ? a : b; } int main(void) { //ptr: strの各要素へのポインタ char str[MAX_LEN], *ptr; int max_len, tmp_len; max_len = 0; tmp_len = 0; // 入力 scanf("%s", str)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210639/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex5-4 toshiwaka */ #include <stdio.h> #include <string.h> //最長部分文字列の長さを取得 int get_max_len(char *ptr); int main(void) { //入力は10文字以内なのでstrの最大要素数は\0を含めて11 char str[11]; //入力 scanf("%s", str); //結果を出力 printf("%d\n", get_max_len(str)); return 0; } //最長部分文字列の長さを取得 int get_max_len(char *ptr){ int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210682/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210682/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[11]; scanf("%s", s); int i = 0; int j; int ans = 0; while (s[i] != '\0') { if (s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T') { j = 0; while ((s[i + j] == 'A' || s[i + j] == 'C' || s[i + j] == 'G' || s[i + j] == 'T') && s[i + j]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210725/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210725/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...