Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include<stdio.h>
int main()
{
int n,m,p[1000];
int i,j,x,a;
scanf("%d %d",&n,&m);
for(i=0;i<n;i++){
scanf("%d",&p[i]);
}
x=0;
for(i=0;i<n-1;i++){
for(j=i+1;j<n;j++){
if(p[i]>p[j]){
x=p[i];
p[i]=p[j];
p[j]=x;
}
}
}
a=0;
for(i=0;i<m;i++){
a+=p[i];
}
printf("%d\n",a);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178283/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178283/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
signed main(){
int N,K,sum=0;
scanf("%d %d",&N,&K);
int p[N],i,sa;
sa=N-K;
for(i=0;i<N;i++){
scanf("%d",&p[i]);
}
int j,above=0,c=0;
int high[1000]={};
for(i=0;i<N;i++){
sum+=p[i];
}
for(j=0;j<sa;j++){
c=0;
above=0;
f... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178326/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178326/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
signed long long int n,s=0,k;
scanf("%lld",&n);
k=n/2050;
while(k>0)
{
s+=k%10;
k/=10;
}
if(n%2050>0 && n%2050<2050)
s=-1;
printf("%lld\n... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17837/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17837/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
#define RANGE 1001
void customSort(int arr[], int n)
{
int freq[RANGE];
memset(freq, 0, sizeof(freq));
for (int i = 0; i < n; i++)
freq[arr[i]]++;
int k = 0;
for (int i = 0; i < RANGE; i++)
{
while (freq[i]--)
arr[k++] = i;
}
}
int main()
{
int N, K;
scan... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178412/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178412/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, p[1001];
int i, j;
int tmp, ans = 0;
scanf("%d %d", &N, &K);
for(i = 0; i < N; ++i){
scanf("%d", &p[i]);
}
for(i = 0; i < N; ++i){
for(j = i +1; j < N; ++j){
if(p[i] > p[j]){
tmp = p[i];
p[i] = p[j];
p[j] = tmp;
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178463/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178463/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, k;
int *p;
int sum = 0;
scanf("%d", &n);
scanf("%d", &k);
p = (int *)malloc(sizeof(int) * n);
for(int i=0; i<n; i++){
scanf("%d", &p[i]);
}
qsort(p, n, sizeof(int), ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178506/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178506/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 fun(long long int n)
{
int sum=0;
while(n!=0)
{
sum=sum+n%10;
n=n/10;
}
return sum;
}
int main()
{
int t;
long long int n,ans;
scanf("%d",&t);
while(t--)
{
int count=0;
scanf("%lld",&n);
if(n%2050!=0)
print... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17855/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17855/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
int main () {
int min = 0;
int n;
int i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
int a;
scanf("%d", &a);
if (a - min > 15) {
printf("%d\n", min + 15);
return 0;
}
min = a;
}
min = min + 15;
min = (min > 90) ? 90 : min;
printf("%d\n", min);
r... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17860/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17860/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 M;
scanf("%d",&M);
if(M>=1&&M<=23)
{
printf("%d",48-M);
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178650/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178650/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t1[1000];
char t2[100];
char t3[100];
int main(){
int n;
int a,b;
int i,j;
char t;
scanf("%s",&t1);
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s",&t3);
if(strcmp(t3,"replace")==0){
scanf("%d %d %s",&a,&b,&t2);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178931/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178931/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100],t,i,flag=0;
scanf("%d",&t);
for(i=0;i<t;i++)
{
scanf("%d",&x[i]);
}
if(x[0]<=15)
{
for(i=0;i<t-1;i++)
{
if(x[i]+15<x[i+1])
{
break;
}
}
if(x[i]+15>=90)
{
printf("90");
}
else
printf("%d",x[i]+15);
}
else
printf("15");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17899/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17899/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
#define BUFLEN 1000
void ord_print(char *str, int start, int end) {
int i;
for (i = start; i <= end; i++) {
printf("%c", *(str + i));
}
printf("\n");
}
void ord_reverse(char *str, int start, int end) {
int i;
char tmp[BUFLEN];
for (i = 0; i ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179046/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179046/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str.2 = private unnamed_a... |
#include<stdio.h>
#include<string.h>
void print(char str[1000], int a, int b) {
char substr[1000];
strncpy(substr, str + a, b - a + 1);
substr[b - a + 1] = '\0';
printf("%s\n", substr);
}
void reverse(char str[1000], int a, int b) {
int i;
char revstr[1000];
strcpy(revstr, str);
for ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179097/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179097/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str.1 = private unnamed_a... |
#include <stdio.h>
int main()
{
int n,t[91],i,ans=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&t[i]);
}
if(t[0]>15)
{
printf("%d",15);
return 0;
}
else
ans=t[0];
if(n==1)
{
printf("%d",ans+15);
return 0;
}
for(i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17914/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17914/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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[1001], order[8], ch[1001];
int i, j, n, a, b;
scanf("%s\n%d", s, &n); //命令,回数
for(i=0; i<n; i++) {
scanf("%s %d %d", order, &a, &b);
if(!strcmp(order, "reverse")) {
for(j=a; j<=b; j++)
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179183/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179183/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a, b;
char str[1001], q[1001], temp[1001], cmd[10];
scanf("%s", str);
scanf("%d", &n);
for (int i = 0; i < n; i++)
{
scanf("%s %d %d", cmd, &a, &b);
if (strcmp(cmd, "print") == 0)
{
for (int j = a; j ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179226/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179226/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t,u,v,n,a[2],flag,res;
scanf("%ld",&t);
for(long i=1;i<=t;i++){
flag=0;
scanf("%ld %ld %ld",&n,&u,&v);
scanf("%ld",&a[0]);
for(long j=1;j<n;j++){
scanf("%ld",&a[1]);
if(a[1]-a[0]>=2||a[0]-a[1]>=2) flag=2;
if(flag==0&&(a[1]-a[0]==1||a[0]-a[1]==1)) flag=1;
a[0]=a... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17927/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17927/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
int iAbs(int x) {
if (x >= 0) return x;
return -1 * x;
}
int iMin(int x, int y) {
if (x > y) return y;
return x;
}
int main()
{
int t;
scanf("%d", &t);
for (int i = 0; i < t; i++)
{
int n, u, v;
int obstacle[100];
int Mdiff... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17932/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17932/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 ... |
#define _CRT_SECURE_NO_WARNINGS
//#define _USE_MATH_DEFINES
#include<stdio.h>
//#include<stdlib.h>
//#include<math.h>
#include<string.h>
//#include<time.h>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
void vertical(int[2][9][9]);
void parallel(int[2][9][9]);
void square(int[2][9][9],int,int);
int main() {
int p[2]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179363/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179363/source.c"
target datalayout = "e-m:e-p270: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){
int unused __attribute__((unused));
char name[1001];
unused = scanf("%s", name);
int length = strlen(name) - 1;
char l = name[length];
if(l != 's'){
name[length + 1] = 's';
name[length + 2] = '\0';
}
else if(l == 's'){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179420/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179420/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1005];
int l=0;
scanf("%s", s);
l = strlen(s);
if(s[l-1]=='s'){
//s = s+'es';
printf("%s%s", s,"es");
}
else{
//s = s+'s';
printf("%s%s", s,"s");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179486/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179486/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1020];
int N;
scanf("%s", S);
for (int i = 0; S[i] != '\0'; i++) {
N = i;
}
if (S[N] == 's')
printf("%ses", S);
else
printf("%ss", S);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179529/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179529/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n,m,i,arr[100001],one,zero,t,p;
int main()
{
scanf("%d %d",&n,&m);
for(i=1;i<=n;i++)
{
scanf("%d",&arr[i]);
if(arr[i]) one++;
else zero++;
}
for(i=1;i<=m;i++)
{
scanf("%d %d",&t,&p);
if(t==1)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17958/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17958/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 ... |
// AOJ 2321: Butterfly
// 2017.10.7 bal4u@uu
#include <stdio.h>
#include <string.h>
int dp[65536+2];
int main()
{
int n, m, l, i, j, k, s, e, ans, a;
while (scanf("%d", &n) && n > 0) {
memset(dp, 0, sizeof(dp));
for (i = 0; i < n; i++) {
scanf("%d%d", &m, &l);
for (a = 0, j = 0; j < m... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179644/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179644/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#define PI 3.141592653589793
#define MOD 1000000007
long int combination(long int n, long int r);
//qsort用、昇順
int compare_int(const void *a, const void *b)
{
return *(int*)a-*(int*)b;
}
long int combination(long int n, long int r)
{
if(r>n-r)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179688/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179688/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[51];
scanf("%s",s);
char aki[10]="AKIHABARA";
char akb[10]="KIHBR";
int i=0,g,c=0;
for(g=0;s[g]!=0;g++);
if(g>9){
puts("NO");
return 0;
}
for(i=0;i<g;i++){
if(s[i]=='A'){
if(s[i+1]=='A'){
puts("NO");
return 0;
}
contin... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179745/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179745/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ans[7] = {0, 0, 0, 0, 0, 0, 0};
int num[10][7] = {
{0, 1, 1, 1, 1, 1, 1},
{0, 0, 0, 0, 1, 1, 0},
{1, 0, 1, 1, 0, 1, 1},
{1, 0, 0, 1, 1, 1, 1},
{1, 1, 0, 0, 1, 1, 0},
{1, 1, 0, 1, 1, 0, 1},
{1, 1, 1, 1, 1, 0, 1},
{0, 1, 0, 0, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 0, 1, 1, 1, 1}
};
int ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179789/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179789/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@ans = dso_local local_unna... |
#include <float.h>
#include <inttypes.h>
#include <limits.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>
#endif
#define getchar getchar_unlocked
#define putchar pu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179839/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179839/source.c"
target datalayout = "e-m:e-p270: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 <stdlib.h>
#define MAPSIZE 1048576
int cmpmin(int a, int b) {
return a-b;
}
int cmpmax(int a, int b) {
return b-a;
}
typedef struct {
int n, arr[200000];
int (*cmp)(int, int);
} heap;
void hpush(heap *h, int x) {
int i = h->n++;
h->arr[i] = x;
while (i > 0) {
int p = (i-1)/2;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179882/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179882/source.c"
target datalayout = "e-m:e-p270: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.heap = type { i32, ... |
#include <stdio.h>
int main() {
int k;
scanf("%d", &k);
int odd = 0, even = 0;
for(int i = 1; i <= k; i++){
if(i%2 == 0)
even++;
else
odd++;
}
int cont = even*odd;
printf("%d\n", cont);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179925/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179925/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(){
int k;
int count_even=0;
int count_odd=0;
scanf("%d",&k);
for(int i=1;i<=k;i++){
if(i%2==0) count_even++;
else count_odd++;
}
printf("%d\n",count_odd*count_even);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179969/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179969/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t,n,r=0,i,x,y;
scanf("%lld%lld",&n,&t);
int a[n];
for(i=0;i<n;i++){
scanf("%d",&a[i]);
if(a[i]==1)r++;
}
while(t--){
scanf("%lld%lld",&x,&y);
if(x==1){a[y-1]=1-a[y-1];
if(a[y-1]==1)r++;
else r--;}
el... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18001/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18001/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 <stdlib.h>
#include <stdbool.h>
#include <math.h>
int main()
{
int k;
scanf("%d", &k);
if (k%2 == 0) printf("%d\n", (k/2)*(k/2));
else printf("%d\n", (k/2)*(k/2+1));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180060/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180060/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c=0,c1=0,i,t;
scanf("%d",&t);
for(i=1;i<=t;i++)
{
if(i%2==0)
c++;
else
c1++;
}
printf("%d\n",c*c1);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180103/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180103/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int K;
scanf("%d",&K);
printf("%d\n",(K/2)*((K+1)/2));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180154/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180154/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int k;
scanf("%d",&k);
if (k%2==0) printf("%d\n",k/2*k/2);
else printf("%d\n",(k+1)/2*(k-1)/2);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180198/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180198/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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)
{
if (a > b) {
a ^= b;
b ^= a;
a ^= b;
}
if (b % a == 0) return a;
else return gcd(b % a, a);
}
int main()
{
int A, B;
scanf("%d %d", &A, &B);
printf("%lld\n", (long long)A * B / gcd(A, B));
fflush(stdout);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180248/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180248/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
long long gcd(long long a,long long b){
long long r = a % b;
while(r > 0){
a = b;
b = r;
r = a % b;
}
return b;
}
long long lcm(long long a,long long b){return a*b/gcd(a,b);}
int main(){
long long a, b;
scanf("%lld%lld",&a,&b);
printf("%lld\n",lcm(a,... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180291/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180291/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
long long int gcd(long long int a, long long int b) {
long long int r;
while (b!=0) {
r = a % b;
a = b;
b = r;
}
return a;
}
int main(void)
{
long long int a,b,g;
scanf("%lld %lld", &a, &b);
g = gcd(a, b);
printf("%lld\n", (a * b) / g);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180334/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180334/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
long long divv(long long m,long long n)
{
long long x;
long long a, b;
a = m;
b = n;
if (a > b)
{
x = a%b;
}
else
{
x = a;
a = b;
b = x;
x = a%b;
}
while (x != 0)
{
a = b;
b = x;
x = a%b;
}
return b;
}
int main()
{
long long a1,b1,d1;
scanf... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180378/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180378/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main() {
double a, b;
double tmp, r;
double ans;
scanf ("%lf %lf", &a, &b);
ans = a * b;
if (a < b) {
tmp = a;
a = b;
b = tmp;
}
r = fmod (a, b);
while (r != 0) {
a = b;
b = r;
r = fmod (a, b);
}
ans = ans / b;
printf ("%.0lf\n... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180428/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180428/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
long long int a, b, r, x, tmp;
scanf("%lld", &a);
scanf("%lld", &b);
x = a * b;
/* 自然数 a > b を確認・入替 */
if(a<b){
tmp = a;
a = b;
b = tmp;
}
/* ユークリッドの互除法 */
r = a % b;
while(r!=0){
a = b;
b = r;
r = a % b;
}
/* 最小公倍数を出力 */
pri... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180471/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180471/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(void)
{
double x1, y1, x2, y2;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
printf("%.8f\n", sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180529/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180529/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#include<math.h>
int main(){
double x1,x2,y1,y2;
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
printf("%f",(sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180572/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180572/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(){
double x1, y1, x2, y2;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
printf("%f\n", sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) ) );
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180615/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180615/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(void)
{
double x1, y1, x2, y2, dist;
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
dist = sqrt(pow(x2 - x1, 2.0) + pow(y2 - y1, 2.0));
printf("%f",dist);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180680/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180680/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
char d[110][110]={};
scanf("%d %d",&a,&b);
a--;
b--;
printf("100 100\n");
for(i=0;i<50;i+=2){
for(j=0;j<100;j+=2){
d[i][j]=d[i+1][j]=d[i][j+1]=d[i+1][j+1]='#';
if(a){
d[i][j]='.';
a--;
}
}
}
for(i=50;i<100;i+=2){
for(j=0;j<100;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180730/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180730/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 blood[3];
int a=0,b=0,o=0,ab=0;
while(scanf("%*d,%s",blood)!=EOF){
if(blood[1]=='B')ab++;
else if(blood[0]=='A')a++;
else if(blood[0]=='B')b++;
else if(blood[0]=='O')o++;
}
printf("%d\n%d\n%d\n%d\n",a,b,ab,o);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180781/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180781/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 get_type(char* s){
if(s[0] == 'A'){
if(s[1] == 'B'){
return 2;
}else{
return 0;
}
}else if(s[0] == 'B'){
return 1;
}else if(s[0] == 'O'){
return 3;
}
return 0;
}
int main(int argc, char *argv[]){
int nums[4];
nums[0] = nums[1] = nums[2] = nums[3] =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180824/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180824/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t[2];
int a,b,o,ab,s;
a=b=o=ab=0;
while(scanf("%d,%s",&s,t)!=EOF){
if(t[1]=='B') ab++;
else if(t[0]=='A') a++;
else if(t[0]=='B') b++;
else if(t[0]=='O') o++;
}
printf("%d\n%d\n%d\n%d\n",a,b,ab,o);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180903/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180903/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 prime[110000], i, j, s, sum;
for (i = 0; i < 110000; i++){
prime[i] = 1;
}
prime[0] = prime[1] = 0;
for (i = 2; i * i <= 110000; i++){
if (prime[i] == 1){
for (j = i * i; j <= 110000; j += i){
prime[j] = 0;
}
}
}
while (scanf("%d", &s), s != 0){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180947/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180947/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main(void){
int n, count = 0, i, s, key, so;
long a;
scanf("%d", &n);
while ( n ) {
count = so = 0;
for ( a = 1; count < n; a++ ) {
s = key = 2;
if ( a == 1 ) ;
else if ( a == 2 ) {/*printf("sosuu\n")*/;count++; so += a;}
else {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180990/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180990/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#define MAX 1000000
#define OVER 10000
int main(void) {
int sieve[MAX+1]={0},count=0,i,j,num,sum[OVER+1]={0};
sieve[1]=1;
for (i=2; ; i++) {
if (sieve[i]==0) {
for (j=2*i; j<=MAX; j+=i) sieve[j]=1;
sum[count+1]=i+sum[count];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181054/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181054/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ 2249: Road Construction
// 2017.11.15 bal4u@uu
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define TM 0
#if TM
#include <time.h>
#endif
#define MAX 16010
typedef struct { int t, node, c; } QUE;
QUE que[MAX]; int qsize;
#define PARENT(i) ((i)>>1)
#define LEFT(i) ((i)<<1)
#define RIGHT(i) (((i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181104/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181104/source.c"
target datalayout = "e-m:e-p270: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.QUE = type { i32, i... |
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#define MAX(a,b) (a>b?a:b)
int main()
{
int n, i, j;
int x[100],y[100],h[100];
int X, Y, H, max=0;
scanf("%d",&n);
for(i=0; i<n; i++) {
scanf("%d %d %d",&x[i],&y[i],&h[i]);
max = MAX(max, h[i]);
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181155/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181155/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#if 0
cat <<EOF >mistaken-paste
#endif
// thanks for @rsk0315_h4x
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define BIG 2000000007
#def... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181199/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181199/source.c"
target datalayout = "e-m:e-p270: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.hwll = type { i64, ... |
#include <stdio.h>
#include<math.h>
int main ()
{
int a,b,c,d,e,f,g;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a>b)
e=a-b;
else
e=b-a;
if(b>c)
f=b-c;
else
f=c-b;
if(c>a)
g=c-a;
else
g=a-c;
if((e<=d&&f<=d)||g<=d)
printf("Yes\n");
else
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181249/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181249/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a[4];
int i;
int sum;
int flag=0;
while(EOF != scanf("%d %d %d %d",&a[0],&a[1],&a[2],&a[3]))
{
sum=a[0]+a[1]+a[2]+a[3];
//printf("%d\n",sum);
for(i=0; i<4; i++)
{
if(a[i]==sum-a[i])
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1813/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1813/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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){
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a>=c){
if(a-c<=d||(a-b<=d&&b-c<=d))printf("Yes\n");
else printf("No\n");
}
if(c>a){
if(c-a<=d||(c-b<=d&&b-a<=d))printf("Yes\n");
else printf("No\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181342/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181342/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int a , b, c, d ;
scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); scanf("%d", &d);
if(abs(a - c) <= d )
{
printf("Yes");
}
else if (abs(a - b) <= d )
{
if (abs(b - c) <= d )
{
printf("Y... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181407/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181407/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main() {
int t;
scanf("%d",&t);
while(t--){
int a,b,c,d,k;
scanf("%d %d %d %d %d ",&a,&b,&c,&d,&k);
int x,y;
if(a%c ==0){
x = a/c;
}else{
x = a/c +1;
}
if(b%d ==0){
y = b/d;
}else{
y = b/d +1;
}
int z;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18148/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18148/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
#include<math.h>
int main(){
int a,b,c,d,k,t,x,y;
scanf("%d",&t);
for(int i=0;i<t;++i){
scanf("%d%d%d%d%d",&a,&b,&c,&d,&k);
x=(int)ceil((double)a/c);
y=(int)ceil((double)b/d);
if(x+y<=k)
printf("%d %d\n",x,y);
else printf("-1\n");
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18153/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18153/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 ... |
/*??°???????????????(Unique number)*/
#include <stdio.h>
int main(){
int i, k, l, x, N;
int data[200][3];
int sum[200] = {0};
scanf("%d", &N);
for (i = 0; i < N; i++) {
for (k = 0; k < 3; k++) {
scanf("%d", &data[i][k]);
}
}
for (i = 0; i < N; i++) {
for (k = 0; k < 3; k++) {
x = 0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181573/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181573/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k,z;
scanf("%d",&n);
int c[n][3],s[200]={};
for(i=0;i<n;i++){
scanf("%d %d %d" ,&c[i][0] ,&c[i][1] ,&c[i][2]);
}
for(i=0;i<3;i++){
for(j=0;j<n;j++){
z=0;
for(k=0;k<n;k++){
if(j!=k && c[j][i]!=c[k][i]){
z++;
}
}
if(z==n-1){... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181616/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181616/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */
int des(const void *a, const void *b){return *(int*)b - *(int*)a;} /* 8,7,6,5.. */
int cmp_char(con... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181674/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181674/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,k,x,an = 1;
scanf("%d %d",&n,&k);
for( x = 0 ; x < n ; x++ ) scanf("%d",&a);
n -= k;
k--;
while( n > 0) {
n -= k;
an++;
}
printf("%d\n",an);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181724/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181724/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main (void)
{
int n , k , a[100000],i , ans;
scanf("%d%d" , &n , &k);
for(i=0;i<n;i++)
scanf("%d" , &a[i]);
for(i=1;k<n;i++)
n = n-(k-1);
printf("%d\n" , i);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181768/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181768/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
int main(void) {
int N, K;
scanf("%d %d", &N, &K);
if (N == K) printf("%d\n", 1);
else {
printf("%d\n", (int)ceil((double)(N-1) / (K-1)));
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181810/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181810/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_N 51
#define MAX_M 51
#define MAX_COUNT 101
int count[MAX_COUNT];
void init(void) {
int i;
for (i = 0; i < MAX_COUNT; i++)
count[i] = 0;
}
int main(void) {
int n, q, m, t, i, j, max, maxp;
while (1) {
init();
scanf("%d %d", &n, &q);
if (n == 0 && q == 0) return ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181854/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181854/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@count = dso_local local_un... |
#include <stdio.h>
#include <math.h>
int box[1000000];
int main(void)
{
double a;
int b, c, d;
int z, zz;
while (scanf("%lf", &a) != EOF){
for (b = 0; b <= a; b++) {
box[b] = 0;
}
for (b = 1; b <= a; b++) {
box[b] = b;
}
c = 0;
d = 2;
while (sqrt(a) >= d) {
for (b = d; b <= a; b += d) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181898/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181898/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 is_prime[1000000];
int sum_prime[1000000];
int main() {
int x, y;
for (x = 0; x < 1000000; x ++) is_prime[x] = 1;
is_prime[0] = 0; is_prime[1] = 0;
for (x = 2; x < 1000; x ++) {
if (is_prime[x] != 0) {
for (y = x * x; y < 1000000; y += x) {
is_prime[y] = 0;
}
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181940/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181940/source.c"
target datalayout = "e-m:e-p270: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_prime = dso_local local... |
#include<stdio.h>
#define M 1000000
int main(){
int n,c,i,j;
char p[M]={1,1};
for(i=2;i*i<M;i++){
if(p[i])continue;
for(j=i*i;j<M;j+=i)p[j]=1;
}
while(scanf("%d",&n)!=EOF){
for(c=n;n;n--)c-=p[n];
printf("%d\n",c);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181984/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181984/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_N 999999
int is_prime[MAX_N+1];
int sieve(int n)
{
int p=0,i,j;
for(i=0;i<=n;i++) is_prime[i]=1;
is_prime[0]=is_prime[1]=0;
for(i=2;i<=n;i++)
{
if(is_prime[i])
{
p++;
for(j=2*i;j<=n;j+=i) is_prime[j]=0;
}
}
return p;
}
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182026/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182026/source.c"
target datalayout = "e-m:e-p270: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_prime = dso_local local... |
#include <stdio.h>
#include <math.h>
int is_prime1(int);
int is_prime2(int);
int prime[168];
int main()
{
int input_count;
int prime_count;
int input;
int cnt;
int output[30];
int prime_cnt;
/*Make prime table*/
prime[0] = 2;
prime_cnt = 1;
for(cnt = 3; cnt < 1000; cnt += 2)
{
if(is_prime1(cnt))
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182077/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182077/source.c"
target datalayout = "e-m:e-p270: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>
#include <math.h>
int main(){
int t,x,y,move;
float d;
scanf("%d",&t);
while(t--){
scanf("%d %d",&x,&y);
d=sqrt(x*x+y*y);
if(d==0){
move=0;
}
else if((int)d==d){
move=1;
}
else{
move=2;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18212/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18212/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
#include<math.h>
#define MAX 1000000
int main(){
int n;
int i,j,k,l;
int count;
int S[MAX];
int T[MAX];
for(i=0;i<MAX;i++){S[i]=1;}
S[0]=0;
S[1]=0;
for(i=2;i*i<MAX;i++){
if(S[i]==1){ for(j=i*2;j<MAX;j+=i){S[j]=0;} }
}
T[0]=0;
T[1]=0;
for(i=2;i<MAX;i++){ T[i]=T[i-1]+S[i];}
while(scanf("%d",&n)!... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182163/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182163/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#define MAX (1000000)
int main(void)
{
char flag[MAX + 1];
int count;
int i, j;
int input;
memset(flag, 1, MAX);
flag[0] = flag[1] = 0;
for (i = 2; i <= 1001; i++) if (flag[i]) for (j = i * 2; j <= MAX; j += i) flag[j] = 0;
while (scanf("%d", &input) != EOF){
coun... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182235/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182235/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 M 1000000
int main(void){
int i,j;
int n;
int array[M][2];
int count;
for(i=0;i<M;i++){
array[i][0]=i+1;
array[i][1]=1;
}
array[0][1]=0;
for(i=1;i<M;i++)
if(array[i][1]){
for(j=i;j<M;j+=(i+1))
array[j][1]=0;
array[i][1]=1;
}
for(;scanf... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182307/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182307/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 1000000
int prime[MAX];
void gen_prime(int n)
{
int i, j;
for (i = 0; i < n; ++i) {
prime[i] = 1;
}
prime[0] = prime[1] = 0;
for (i = 0; i * i <= n; ++i) {
if (prime[i]) {
for (j = 2 * i; j <= n; j += i) {
prime[j] = 0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182372/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182372/source.c"
target datalayout = "e-m:e-p270: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, i, j;
while( scanf("%d", &n) != EOF){
int number[n], sum = 0;
number[0] = 0;
for( i = 1; i < n; i++){
number[i] = 1;
}
for( i = 1; i < n; i++){
if( number[i-1] == 1){
for( j = 2; j < i; j += i){
if( i % j == 0){
number[i-1] = 0;
break;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182415/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182415/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 m[1000000];
int main(void){
int n,i,j,cnt;
while(scanf("%d",&n)!=EOF){
cnt=0;
for(i=0;i<=n;i++){
m[i]=i;
}
m[1] = 0;
for(i=2;i<=n;i++){
for(j=2;i*j<=n;j++){
m[i*j]=0;
}
}
i=0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182466/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182466/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int sosu(int n){
int num[n+1],i,j,count=0;
for(i=0;i<=n;i++) num[i]=1;
num[0]=num[1]=0;
for(i=2;i<=n;i++){
if(num[i]==1){
for(j=2;i*j<=n;j++) num[i*j]=0;
}
}
for(i=0;i<=n;i++){
if(num[i]==1) count++;
}
return count;
}
int main(void... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182509/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182509/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int t;
scanf("%d",&t);
while(t--){
int n;
scanf("%d",&n);
n++;
long int B,x,y;
scanf("%ld%ld%ld",&B,&x,&y);
long long int a[n], sum = 0;
a[0] = 0;
for(int i=1;i<n;i++){
if(a[i-1] + x <= B) a[i] = a[i-1] + x;
else a[i] = a[i-1] - y;
sum += a[i];
}
printf("%l... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18256/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18256/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 z[9999],r[9999];
int f(int a,int b){
printf("? %d %d\n",a,b);
fflush(stdout);
char c[2];
scanf("%s",c);
return *c=='Y';
}
int main(){
int a,b,c=0,h,i=0;
scanf("%d%d",&a,&b);
if(a<=b){puts("Impossible");return 0;}
for(a+=b;i<a;i++)if(!c||f(z[c-1],i))z[c++]=i;else c--;
h=z[c-1];
for(i=0;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182639/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182639/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main() {
int n, a, b;
scanf("%d%d%d", &n, &a, &b);
if (a > b || n == 1 && a != b) {
printf("0");
}
else if (n == 1 && a == b)
printf("1");
else {
printf("%lld",(long long) (b - a)*(n - 2) + 1);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182682/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182682/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
long long n,a,b;
scanf("%lld",&n);
scanf("%lld",&a);
scanf("%lld",&b);
if(((n == 1)&&(a != b)) || b < a){
printf("0\n");
}else{
printf("%lld\n",(n-2)*(b-a)+1);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182725/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182725/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#define F 1
//const int mod[F]={1000000009,1000000021,1000000033,1000000087};
const int mod[F]={5077};
typedef struct hashNode{
int hash[F];
} node;
node add(node a,node b){
node x;
for(int i=0;i<F;i++){
x.hash[i]=(a.hash[i]+b.hash[i])%mod[i];
}
return x;
}
node m... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182776/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182776/source.c"
target datalayout = "e-m:e-p270: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.hashNode = type { [... |
#include <stdio.h>
int ball_invest(int balls[11],int ball_num,int B[11],int C[11],int bn,int cn){
int is_possible = 0;
int i;
if(B[bn] < balls[ball_num]){
if(ball_num == 10)return 1;
B[bn+1] = balls[ball_num];
is_possible += ball_invest(balls,ball_num + 1,B,C,bn+1,cn);
B[bn+1] = 0;
}
if(C[cn] < balls[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182826/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182826/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
typedef uint64_t uint64; typedef uint32_t uint32;
typedef int64_t int64; typedef int32_t int32;
#define finc(i,a,b) for(int32 i=(a);i<=(b);i++)
#define fdec(i,a,b) for(int32 i=(b)+1;i-->... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18287/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18287/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 list[10];
int c=0;
int solve(int n,int a,int b){
if(n==10){
return 1;
}
else{
if(a<list[n]){
if(solve(n+1,list[n],b)){
return 1;
}
}
if(b<list[n]){
if(solve(n+1,a,list[n])){
return 1;
}
}
return 0;
}
}
int main(){
int i,j;
int n;
int a,b;
scanf("%d",&n);
a... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182941/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182941/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@c = dso_local local_unname... |
#include <stdio.h>
typedef long long ll;
ll battis_read_int()
{
ll ret = 0;
char c = getchar();
int sgn;
while (1)
{
if (c == EOF)
{
return EOF;
}
if (c >= '0' && c <= '9')
{
sgn = 1;
break;
}
if (c == '-')
{
c = getchar();
if (c < '0' || c > '9')
{
continue;
}
sgn ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 cons... |
#include <stdio.h>
int main(void)
{
float m5, m10;
while (scanf("%f %f", &m5, &m10) != EOF){
if (35.5 > m5 && 71 > m10){
printf("AAA\n");
}
else if (37.5 > m5 && 77 > m10){
printf("AA\n");
}
else if (40 > m5 && 83 > m10){
printf("A\n");
}
else if (43 > m5 && 89 > m10){
printf("B\n");
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183049/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183049/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n;
char canvas[105];
scanf("%d", &n);
scanf("%s", canvas);
char left = '?', right = '?';
int emptyLen = 0;
int flag = 0;
for (int i = 0; i < n; i++) {
//printf("curr %d: %c\n", i, canvas[i]);
if (canvas[i] == '?') {
emptyLen++;
//print... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1831/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1831/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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()
{
int t,n,i;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
i=4*n;
while(n--)
{
printf("%d ",i);
i=i-2;
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18315/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18315/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
double v;
double plays(double c, double m, double p) {
double total = p;
if (c < 1e-9) c = 0;
if (m < 1e-9) m = 0;
if (c > 0 && c <= v && m > 0) total += c * (1 + plays(0, m + c / 2, p + c / 2));
if (c > 0 && c <= v && m == 0) total += c * 2;
if (c > 0 && c > v && m > 0) total += c * (... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18320/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18320/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@v = dso_local global double ... |
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
printf(n / 10 == 9 || n % 10 == 9 ? "Yes\n" : "No\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183243/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183243/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int n;
scanf("%d",&n);
printf("%s\n",(n%10==9 || n/10==9)?"Yes":"No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183287/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183287/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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/10) %9==0)
printf("Yes\n");
else if((N-9)%10==0)
printf("Yes\n");
else
printf("No\n");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183337/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183337/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ERROR -1
int main(){
int i;
scanf("%d",&i);
if(i<10||i>99)return ERROR;
if(i/10==9||(i+1)%10==0){
printf("Yes\n");
}else{
printf("No\n");
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183380/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183380/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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",&a);
b = a/10;
c = a - b*10;
if(b==9){
printf("Yes\n");
return 0;
}else if(c==9){
printf("Yes\n");
return 0;
}
printf("No\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183423/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183423/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.