Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include<stdio.h>
int main()
{
int n,k,ridi=0;
scanf("%d %d",&n,&k);
int ara[n];
for (int r=0;r<n;r++)
{
scanf("%d",&ara[r]);
}
int i, temp;
for( i=0;i<n;i++)
{
for(int j=0;j<n-i-1;j++)
{
if(ara[j]>ara[j+1]){
temp=ara[j];
ara[j]=ara[j+1];
ara[j+1]=temp;
}
}
}
for(int q=0;q<k;q... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178208/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178208/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1000],l,r=0;
scanf("%d %d",&n,&k);
for(int i=0;i<n;i++)scanf("%d",&p[i]);
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if(p[i]>p[j]){
l=p[i];
p[i]=p[j];
p[j]=l;
}
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178251/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178251/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, N, K, tmp;
scanf("%d%d", &N, &K);
int p[N];
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] = t... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178295/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178295/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int i,j,k,l,N,K,tmp,sum;
sum = 0;
int p[1000];
if(scanf("%d%d",&N,&K) == -1){
return 0;
}
for(k = 0;k < N;k++){
if(scanf("%d",&p[k]) == -1){
return 0;
}
}
for(i = 0;i < (N-1);i++){
for(j = (N-1);j > i;j--){
if(p[j-1]>p[j]){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178345/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178345/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int i, j, k, tmp;
int wa = 0;
int N, K;
scanf("%d %d", &N, &K);
int p[N];
for(i = 0; i < N; i++){
scanf("%d", &p[i]);
}
for (i = 0; i < N-1; i++) {
j = i;
for (k = i+1; k < N; k++) {
if (p[j] > p[k]) { j = k; }
}
tmp = p[j];
p[j] = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178389/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178389/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j,a[1001],temp=0,ans=0;
scanf("%d %d",&n,&k);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n-1;i++)
{
for(j=i+1;j<n;j++)
{
if(a[i]>a[j])
{
temp=a[j... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178431/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178431/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sort_as(int a[],int size)
{
int tmp;
for (int i=0;i<size-1;i++) {
for (int j=i+1;j<size;j++) {
if (a[i]>a[j]) {
tmp=a[i];
a[i]=a[j];
a[j]=tmp;
}
}
}
}
int main() {
int n,k;
int p[1000];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178475/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178475/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define rep(i,n) for(int i=0;i<n;i++)
int gcd(int a, int b){
int r=1;
while(r!=0){
r=a%b;
a=b;
b=r;
}
return a;
}
void revStr(char* str){
int size = strlen(str);
int i,j;
char tmp = {0};
for(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178518/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178518/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 tmp, mes[ 101 ];
int i, N, a[ 100 ], b[ 100 ];
for ( ; scanf( "%d %s", &N, mes ), N; printf( "%s\n", mes ) ) {
for ( i = 0; i < N; i++ )
scanf( "%d %d", a + i, b + i );
while ( N-- ) {
int idx[ 2 ] = { a[ N ] - 1, b[ N ] - 1 };
for ( i = 2; i--; mes[ idx[ ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178561/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178561/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 POW(x) ((x) * (x))
double s[101][2];
int main(){
int n, i, j, c, max;
double x, y;
while(scanf("%d", &n) && n){
for(i = 0;i < n;i++) scanf("%lf,%lf", &s[i][0], &s[i][1]);
for(max = 0, x = 0.;x <= 10.;x += .1){
for(y = 0.; y <= 10.; y += .1){
for(c = 0, i = 0;i < n;i++)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178914/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178914/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
char str[1001], p[1001], cmd[10];
int a, b, q;
scanf("%s", str);
scanf("%d", &q);
while (q > 0)
{
scanf("%s", cmd);
scanf("%d", &a);
scanf("%d", &b);
if (cmd[0] == 'p')
{
while (a <= b)
{
putchar(str[a]);
a++;
}
putchar('\n');
} else if (cmd[2] == 'v')
{
wh... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178958/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178958/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
void print(char str[], int a, int b);
void reverse(char str[], int a, int b);
void replace(char str[], int a, int b, char p[]);
int main(void)
{
int i;
char str[1001];
scanf("%s", str);
int op_num;
scanf("%d", &op_num);
char op[8];
int a, b;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179014/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179014/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int n,i,j,a,b;
char command[20],str[2000],s[2000];
scanf("%s",str);
scanf("%d",&n);
for(j = 0;j < n;j++){
scanf("%s",command);
scanf("%d%d",&a,&b);
if(command[2] == 'i'){
for(i = 0;i <= b - a;i++)
s[i] = str[a ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179058/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179058/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[1000];
char tmp[1000];
char order[10];
char print[] = "print";
char reverse[] = "reverse";
char replace[] = "replace";
int q,a,b,i,j,k;
scanf("%s",str);
scanf("%d",&q);
for(i=0;i<q;i++){
scanf("%s",order);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179108/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179108/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@__const.main.print = priva... |
#include <stdio.h>
#include <string.h>
int main(int argc, const char * argv[]) {
char str[1001],str2[1001];
int q,i,j,a,b;
scanf("%s",str);
scanf("%d",&q);
for(i=0; i<q; i++){
scanf("%s %d %d",str2, &a,&b);
if(strcmp(str2, "replace") == 0){
scanf("%s",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179151/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179151/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 q,a,b,i,j=0,k=0;
char str[1000],y[8],z[1000],x[1000];
char *p="print",*rev="reverse",*rep="replace";
scanf("%s",str);
scanf("%d",&q);
for(k=0;k<q;k++){
scanf("%s",y);
if (strcmp(y,p)==0) {
scanf("%d %d",&a,&b);
for(i=a;i<=b;i++){
prin... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179201/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179201/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
char str[1001], p[1001], cmd[10];
int a, b, q;
scanf("%s", str);
scanf("%d", &q);
while (q > 0)
{
scanf("%s", cmd);
scanf("%d", &a);
scanf("%d", &b);
if (cmd[0] == 'p')
{
while (a <= b)
{
putchar(str[a]);
a++;
}
putchar('\n');
} else if (cmd[2] == 'v')
{
wh... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179245/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179245/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(){
char str[1001],mei[10],q[1001],abc[1001];
int kazu,a,b,j,i,ba,k,l;
scanf("%s",str);
scanf("%d",&kazu);
for(i=0;i<kazu;i++){
scanf("%s %d %d",mei,&a,&b);
if(mei[2]=='p'){
scanf("%s",q);
for(k=0;k<(b-a+1);k++){
str[a+k]=q[k... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179289/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179289/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,num,a,b;
char str[1001],tem[1001],com[20];
scanf("%s",str);
scanf("%d",&num);
for(i=0;i<num;i++){
scanf("%s %d %d",com,&a,&b);
if(com[0]=='p'){
for(j=a;j<=b;j++)
printf("%c",str[j]);
printf("\n");
}
else if(com[2]=='p'){
sca... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179331/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179331/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main()
{
int n,i,j,m,l,k,item=0,o,p;
scanf ("%d %d",&n,&k);
int a[n];
for (i=0;i<n;i++){
scanf ("%d",&a[i]);
if (a[i]==1){
item++;
}
}
for (l=0;l<k;l++){
scanf ("%d %d",&o,&p);
if (o==2) {
if ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17939/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17939/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include <string.h>
int main(void)
{
char buf[1005];
int len;
if (fgets(buf, sizeof(buf), stdin) == NULL)
return (-1);
len = strlen(buf);
len--;
if (buf[len - 1] == 's')
{
buf[len] = 'e';
buf[len + 1] = 's';
buf[len + 2] = '\0';
}
else
{
buf[len] = 's';
buf[len + 1] = '\0'... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179447/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179447/source.c"
target datalayout = "e-m:e-p270: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>
#include<math.h>
int main(void)
{
int n,i,k;
char s[1001],str[10000];
scanf("%s",s);
n = strlen(s);
if(s[n - 1] == 's')
{
printf("%ses\n",s);
return 0;
}
else
{
printf("%ss\n",s);
return... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179504/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179504/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main (void) {
int i;
char s[1012];
scanf("%s", s);
for (i = 0; s[i] != 0; i++) {
printf("%c", s[i]);
}
if (s[i - 1] == 's') printf("es\n");
else printf("s\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179555/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179555/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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)
{
float n,two[12],n2;
while(1){
int sin[12]={0},i,j=0,p=0;
for(i=7;i>-5;i--){
two[j]=pow(2,i);
j++;
}
scanf("%f",&n);
if(n<0){
break;
}
for(i=0;i<12;i++){
if(n>=two[i]){
sin[i]=1;
n=n-two[i];
}
if(n==0){
p=1;
i=12;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179605/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179605/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 300000
int main(){
int n,i,j;
char p[M]={1,1};
for(i=6;i*i<M;i+=5){
if(p[i]==0){
for(j=i*i;j<M;j+=i)p[j]=1;
}
i+=2;
if(p[i])continue;
for(j=i*i;j<M;j+=i)p[j]=1;
}
while(scanf("%d",&n),n-1){
printf("%d:",n);
for(i=6;i<=n;i+=7){
if(p[i ]==0&&n... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179656/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179656/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d%d",&n,&t);
int i;
int x[n];
int time = 0;
for (i=0; i<n; i++) {
scanf("%d",&x[i]);
}
for (i=0; i<n-1; i++) {
if (x[i+1] - x[i] < t) {
time += x[i+1] - x[i];
} else {
time += t;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179706/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179706/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[50];
int i;
scanf("%s",str);
i=0;
if(str[i]=='A'){
i++;
}
if(str[i]=='K'&&str[i+1]=='I'&&str[i+2]=='H'){
i+=3;
}else{
printf("NO");
return 0;
}
if(str[i]=='A'){
i++;
}
if(str[i]=='B'){
i++;
}else{
printf("NO");
return 0;
}
if(str[i]=='A'){
i++;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179757/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179757/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#include<assert.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)
#defin... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179843/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179843/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_179894/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179894/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_179944/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179944/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 number_n;
scanf("%d", &number_n);
if(number_n % 2 == 0) {
printf("%d\n", (number_n / 2) * (number_n / 2));
} else {
printf("%d\n", (number_n / 2) * (number_n /2 + 1));
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179988/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179988/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d",&K);
if(K%2 == 0){
printf("%d\n",K*K/4);
}else{
printf("%d\n",(K/2)*(K/2+1));
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180036/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180036/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
int num[1000000]={0};
int main()
{
int n,q;
scanf("%d%d",&n,&q);
int i=0,count=0;
for(i=0;i<n;i++)
{
scanf("%d",&num[i]);
if(num[i])count++;
}
for(i=0;i<q;i++)
{
int t,k;
scanf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18008/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18008/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@num = dso_local global [1000... |
#include<stdio.h>
void bubble_sort(int a[],int n);
int main()
{
int n,q,i,c=0;
scanf("%d%d",&n,&q);
int a[n];
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
{
if(a[i]==1)
c++;
}
while(q--)
{
int t,k;
scanf("%d",&t);
scanf("%d",&k);
if(t==1)
{
if(a[k-1]==1)
c--;
else
c++;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18013/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18013/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(void)
{
int a=0;
scanf("%d", &a);
if(a%2==0){
printf("%d",(a/2)*(a/2));
}
if(a%2 == 1){
printf("%d",((a-1)/2)*(((a-1)/2)+1));
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180180/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180180/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x;
scanf("%d",&K);
x=K/2;
if(K%2==0)
printf("%d",x*x);
else
printf("%d",x*x+x);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180223/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180223/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define ull unsigned long long
long long gcd(long long x, long long y){
return y == 0 ? x : gcd(y, x % y);
}
long long lcm(long long x,long long y){
return x / gcd(x,y) * y;
}
int main(){
long long a,b;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180267/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180267/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 A, B;
scanf("%ld %ld", &A, &B);
for (int i=1; i < 100000; i++) {
if ((A * i) % B == 0) {
printf("%ld", A * i);
break;
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180353/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180353/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%lld",&a);
scanf("%lld",&b);
long long int x = a * b;
long long int tmp,r;
if(a<b){
tmp = a;
a = b;
b = tmp;
}
r = a % b;
while(r!=0){
a = b;
b = r;
r = a % b;
}
printf("%lld\n",x/b);
r... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180397/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180397/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int testcases;
scanf("%d", &testcases);
//printf("%d", testcases);
while (testcases > 0)
{
int i, n;
scanf("%d", &n);
int arr[n], no1 = 0, no0 = 0;
for (i = 0; i < n; i++)
{
scanf("%d", &arr[i]);
if (arr... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18044/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18044/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main(){
long long int a,b,r,x,tmp;
scanf("%lld%lld",&a,&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;
}
printf("%lld",x/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180483/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180483/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x2,y1,y2,kyori;
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
kyori=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
kyori=sqrt(kyori);
printf("%f",kyori);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180526/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180526/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 z 200001
int main()
{
long long int n,i;
scanf("%I64d",&n);
long long int a[n],b[n],c[z],d[n],cnt=0;
for(i=0;i<n;i++)
{scanf("%I64d",&a[i]);c[a[i]]=i;}
for(i=0;i<n;i++)
{
scanf("%I64d",&b... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18057/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18057/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main(void)
{
int n;
scanf("%d", &n);
getchar();
char str[1005];
for (int i = 0; i < 1005; i++)
{
str[i] = '\0';
}
scanf("%s", str);
int len = 0;
for (int i = 0; i < 1005; i++)
{
if (str[i] == '\0')
{
len = i;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18062/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18062/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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(){
double x1, y1, x2, y2, ans;
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
ans = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
printf("%f\n",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180685/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180685/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#define mod 1000000007
#define ll long long int
//#define f(n) for(int i=0;i<n;i++)
#define s(n) scanf("%d",&n);
#define p(n) printf("%d\n",n);
#define fl(n) for(long long int i=0;i<n;i++)
#define sl(n) scanf("%lld",&n);
#define pl(n) printf("%lld... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18075/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18075/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 i, n, blood[4] = {0, 0, 0, 0};
char abo[3];
while(scanf("%d,%s", &n, abo) != EOF){
if(abo[0] == 'A'){
if(abo[1] == 'B'){
blood[2]++;
}else{
blood[0]++;
}
}else if(abo[0] == 'B'){
blood[1]++;
}else{
blood[3]++;
}
}
for(i =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180793/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180793/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int a[4];
int main()
{
int i;
char b[3];
while((scanf("%d,%s",&i,b))!=EOF){
if(b[0] == 'A' && b[1] == 'B') a[2]++;
else if(b[0] == 'A') a[0]++;
else if(b[0] == 'B') a[1]++;
else a[3]++;
}
printf("%d\n%d\n%d\n%d\n",a[0],a[1],a[2],a[3]);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180865/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180865/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <ctype.h>
int main(){
int i;
int a = 0;
int b = 0;
int ab = 0;
int o = 0;
char str[10];
while(1){
if(scanf("%d,%s",&i,str) == EOF)break;
if(str[0] == 'A'){
if(str[1] == 'B'){
ab = ab + 1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180922/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180922/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sosuu[10000];
int i,j,k;
int n;
sosuu[0]=2;
for(i=3,j=1;j<10000;i+=2) {
for(k=0;k<j;k++) {
if(i%sosuu[k]==0)break;
}
if(k>=j) {
sosuu[j]=i;
j++;
}
}
for(i=1;i<10000;i++)sosuu[i]+=sos... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180966/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180966/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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 Volume 0 Problem 0053
#include <stdio.h>
int flg_prime[1000001];
int main(void)
{
int i;
int j;
int n;
int sum;
flg_prime[0] = flg_prime[1] = 1;
for (i = 2; i <= 1000000; i++){
if (flg_prime[i] == 0){
j = i * 2;
while (j <= 1000000){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181008/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181008/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@flg_prime = dso_local loca... |
// AOJ 2201 Immortal Jewels
// 2018.3.11 bal4u
#include <stdio.h>
#include <math.h>
#define EPS 1e-8
typedef struct { double x, y; } PP;
typedef struct { PP s, e; } LINE;
typedef struct { PP p; double r; } C;
C c[102]; int sc;
LINE line[40001]; int sl;
#define EQ(a,b) (fabs((a)-(b))<EPS)
#define PPeQ(a,b) (... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181066/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181066/source.c"
target datalayout = "e-m:e-p270: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.JEWEL = type { %str... |
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int N;
scanf("%d", &N);
int X[100];
int Y[100];
int H[100];
for(int i = 0; i < N; i++) {
scanf("%d %d %d", &X[i], &Y[i], &H[i]);
}
int init;
for(init = 0; init < N; init++) {
if(H[init] != 0) break;
}
for(int x = 0; x <= 100; x++)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181181/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181181/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// RMQ and RUQ
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define INIVAL 2147483647
int *a, s, t, v, n, w, minval;
void find_min(int k, int l, int r)
{
if (l>=n || r<=s || t<=l) return;
if (s<=l && r<=t) {
if (a[k]<minval) minval = a[k];
} else {
if (a[((k+1)<<1)-1]>=0) find_min(((k+1)<... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181224/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181224/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct._IO_FILE = type { i... |
#include <stdio.h>
int main()
{
int t, n, max, i;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
char s[n+1];
max=0;
scanf("%s",s);
for(i=0;s[i]!='\0';i++)
if(s[i]=='1')
{
if(i+1>max) max=i+1;
if(n-i>max) max=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18129/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18129/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
void possible(int a,int b,int c,int d,int k){
int e,f;
if(a%c==0)
e=(a/c);
else
e=(a/c)+1;
if(b%d==0)
f=(b/d);
else
f=(b/d)+1;
if(e+f<=k){
printf("%d %d",k-(f),f);
printf("\n");
}
else{
printf("-1");
p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18134/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18134/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 a, b, c, d;
scanf("%d %d %d %d", &a, &b, &c, &d);
if( abs(a-c)<=d || (abs(a-b)<=d && abs(b-c)<=d) ){
printf("Yes\n");
}else{
printf("No\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181383/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181383/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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];
for (int i = 0; i < 4; ++i) {
scanf("%d", &a[i]);
}
if(abs(a[0]-a[2])<=a[3]) printf("Yes");
else if(abs(a[0]-a[1])<=a[3] && abs(a[1]-a[2])<=a[3]) printf("Yes");
else printf("No");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181440/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181440/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,frag=0,r1,r2,r3;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a-b < 0)
{
r1 = b-a;
}
else
{
r1 = a-b;
}
if(a-c < 0)
{
r3 = c-a;
}
else
{
r3 = a-c;
}
if(r1 <= d)
{
frag++;
}
if(b-c < 0)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181484/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181484/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int n;
int num[256][3];
int cnt[128];
int score[256] = {0};
int i, j;
scanf("%d", &n);
for (i = 0; i < n; i++){
for (j = 0; j < 3; j++){
scanf("%d", &num[i][j]);
}
}
for (i = 0; i < 3; i++){
for (j = 1; j <= 1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181534/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181534/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 score[200];
int main(void) {
int n,i,j,p=0,k=0,flag;
scanf("%d",&n);
int date[n][3];
for (i = 0; i < n; i++) {
for (j = 0; j < 3; j++)
scanf("%d",&date[i][j]);
}
for (i = 0; i < 3; i++) {
for (j = 0; j < n; j++) {
p = date[j][i];
flag = 0;
for (k = j+1; k < n; k++) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181578/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181578/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c[200][3],sum,i,j,k,ca[200][3];
scanf("%d",&n);
for(i=0;i<n;i++){
for(j=0;j<3;j++){
scanf("%d",&c[i][j]);
ca[i][j]=c[i][j];
}
}
for(i=0;i<3;i++){
for(j=0;j<n-1;j++){
for(k=j+1;k<n;k++){
if(c[j][i]==c[k][i]){
ca[j][i]=0;
ca[k][i]=0;
}
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181635/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181635/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 R_UP(a,b) (((a)+(b)-1)/(b))
int main()
{
int n, k;
scanf("%d %d", &n, &k);
int l1;
for (int i = 0; i < n; i++)
{
int temp;
scanf("%d", &temp);
if (temp == 1)l1 = i;
}
int l2 = n - l1 - 1;
int m = l1 - l1 / (k - 1) * (k - 1);
printf("%d\n", l1 / (k - 1) + R_UP(m + l2, k - 1));
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181750/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181750/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k;
scanf("%d %d",&n,&k);
int ans = (int)ceil((double)(n - 1)/(double)(k - 1));
printf("%d",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181800/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181800/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,N,Q,M,date,max,ii;
int Date[101];
while(1){
scanf("%d%d",&N,&Q);
if(N==0&&Q==0)break;
for(i=0;i<101;i++)Date[i]=0;
for(i=0;i<N;i++){
scanf("%d",&M);
for(j=0;j<M;j++){
scanf("%d",&date);
Date[date]++;
}
}
max=Date[0];
f... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181844/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181844/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int *number;
int i, j;
int count;
int total;
while (scanf("%d",&n) != EOF) {
count = 0;
number=(int*)malloc(sizeof(int)*(n + 1));
for (i = 0; i < (n + 1); i++) {
number[i] = i;
}
for (i = 2; i < (n + 1); i++) {... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181895/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181895/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N 1000000
int main(){
int i,j,r=2,n,furui[N]={0},count=0;
double k;
while(scanf("%d",&n)!=EOF){
k=sqrt(n);
for(i=0;i<=n;i++)furui[i]=i;
i=0;
while(i<=k){
for(i=2;i<=k;i++){
if(furui[i]!=0){
r=furui[i];
count++;
break;}
}
for(j=r;j<=n;j+=r)furui[j]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181938/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181938/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p[1000000];
int main()
{
int n;
int i, j;
for (i = 2; i < 1000000; i++){
p[i] = 1;
}
for (i = 2; i * i < 1000000; i++){
for (j = i * i; j < 1000000; j += i){
p[j] = 0;
}
}
for (i = 1; i < 1000000; i++){
p[i] += p[i - 1];
}
while (scanf("%d", &n) != EOF){
printf("%d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182023/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182023/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@p = dso_local local_unname... |
#include <stdio.h>
int prime[1000000];
int main(void)
{
int i, j;
int n;
int s;
for (i = 0; i < 1000000; i++){
prime[i] = 1;
}
prime[0] = 0;
prime[1] = 0;
for (i = 2; (i * i) < 1000000; i++){
if (prime[i] == 1){
for (j = 2; (i * j) < 1000000; j++){
prime[(i * j)] = 0;
}
}
}
while (sc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182067/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182067/source.c"
target datalayout = "e-m:e-p270: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 t;
scanf("%d", &t);
while(t--){
long long int n, B, x, y;
scanf("%lld %lld %lld %lld", &n, &B, &x, &y);
long long int sum=0, curr=0;
while(n--){
if(curr+x<=B){
sum = sum + curr + x;
curr = curr ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18211/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18211/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
const int MAX_V = 1000000; // 100????????§?´???°??¨?????????
int main() {
int i, k,a,sum=0;
int prime[MAX_V+1]; // 1????´???°???0????´???°??§??????
int pcount[MAX_V+1];
for(i = 2; i <= MAX_V; i++) {
prime[i] = 1; // 2??\????´???°??¨??????
}
for(i = 2; i*i <= MAX... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182153/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182153/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@MAX_V = dso_local local_un... |
#include <stdio.h>
#define MAX (999999)
int main(void)
{
int i, j;
int p[MAX] = {0};
// ツェツ素ツ青板表ツ催ャツ青ャツづ可使ツづつスツェ
int n, ans;
// ツつアツづつゥツづァツ素ツ青板表ツ催ャツ青ャ
p[0] = 1;
for (i = 2; i <= (MAX / 2); i++){
for (j = 2; (i * j) <= MAX; j++){
if (p[(i * j) - 1] == 0){
p[(i * j) - 1] = 1;
}
}
}
// ツつアツつアツづ慊... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182232/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182232/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p[1000000];
int main(void){
int i,j,k,a,l=1;
p[0]=2;
for(i=3;i<=999999;i+=2){
k=1;
for(j=0;j<l;j++){
if(p[j]*p[j]>i)break;
if(i%p[j]==0){
k=0;
break;
}
}
if(k==1){
p[l++]=i;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182333/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182333/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@p = dso_local local_unname... |
#include<stdio.h>
#include <stdlib.h>
#define MAX 1000000
int main(void)
{
int j,k,n,cnt;
char s[MAX];
while(scanf("%d",&n)!=EOF) {
s[1]=0;
for(j=2;j<=n;j++) {
s[j]=1;
}
for(j=2;j*j<=n;j++) {
if(s[j]!=0) {
for(k=2*j;k<=n;k+=j) {
s[k]=0;
}
}
}
cnt=0;
for(j=2;j<=n;j++) {
if(s[j]=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182391/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182391/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int n,i,j,count;
int prime[168]={2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229 ,233, 239, 241, 251, 257,... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182434/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182434/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@__const.main.prime = priva... |
#include <stdio.h>
#define PRIME_MAX 1000000
char tmp[PRIME_MAX];
int getprimes(int list[], int top){
int i, j;
int index = 0;
for(i=0;i<top;i++) {
tmp[i] = 1;
}
tmp[0] = tmp[1] = 0;
for(i=2;i<top;i++) {
if(tmp[i] == 1) {
/* 素数 */
list[index] = i;
index ++;
for(j=2;j*i<top;j++) {
tmp[j*i] ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182478/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182478/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@tmp = dso_local local_unna... |
#include<stdio.h>
//#include<math.h>
int main(){
double d[10],i;
int j;
while(scanf("%lf",&d[0])!=EOF){
for(j=1;j<6;j++)scanf(",%lf",&d[j]);
d[6]=d[2]-d[0];
d[8]=d[7]=d[3]-d[1];
d[9]=-1*d[6];
i=(d[7]*(d[4]-d[0])-d[6]*(d[5]-d[1]))/(d[9]*d[6]-d[8]*d[7]);
//printf("%f\n",i);
printf("%f %f... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182528/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182528/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h> // putchar(), fgets()
#include <stdlib.h> // strtol()
#include <ctype.h> // isupper()
typedef struct code_tbl
{
const char c;
const char *code;
} code_t;
const char NUL = '\0';
const char *code[26] =
{
/* A B C D E F G ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182593/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182593/source.c"
target datalayout = "e-m:e-p270: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.code_tbl = type { i... |
#include <stdio.h>
typedef long long ll;
int main(){
ll n,a,b;
scanf("%lld%lld%lld",&n,&a,&b);
if ( a > b ){ printf("0\n"); return 0; }
else if( a == b ){ printf("1\n"); return 0; }
else if( n == 1 ){ printf("0\n"); return 0; }
printf("%lld\n", a + (n-1)*b - ((n-1)*a + b) +1 );
return ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182643/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182643/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
#include <string.h>
int main(void){
long int n,a,b,i,cnt=0;
scanf("%ld %ld %ld",&n,&a,&b);
if(a>b) cnt=0;
else if(n==1){
if(a!=b) cnt=0;
else cnt=1;
}
else cnt=(b-a)*(n-2)+1;
printf("%ld",cnt);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182687/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182687/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
/* C program for Merge Sort */
#include <stdio.h>
#include <stdlib.h>
// Merges two subarrays of arr[].
// First subarray is arr[l..m]
// Second subarray is arr[m+1..r]
void merge(long int arr[],long int l,long int m,long int r,long int arr1[])
{
long int i, j, k;
long int n1 = m - l + 1;
long int n2 = r -... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18273/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18273/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 <stdbool.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) > (b) ? (b) : (a))
#define abs(x) ((x) > 0 ? (x) : -(x))
#define MOD 1000000007 //10^9 + 7
#define endl printf("\n")
typedef long long ll... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182773/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182773/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ball[10];
int i,j,n,N,b,c,flag;
scanf("%d",&N);
for(n=0;n<N;n++){
flag=0;
b=11;
c=11;
for(i=0;i<10;i++){
scanf("%d",&ball[i]);
}
for(i=9;i>=0;i--){
if(b>ball[i]){
b=ball[i]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182816/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182816/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
int main()
{
int n,i,a[10],b[10],aa,bb,c,x;
scanf("%d",&n);
for(;n--;)
{
a[0]=b[0]=aa=bb=0;
for(i=x=0;i<10;i++)
{
scanf("%d",&c);
if(x!=0)continue;
if(a[aa]>=c && b[bb]>=c)
x=-1;
else
{
if(a[aa]<c && (a[aa]>b[bb] || b[bb]>=c))
aa... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182917/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182917/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, m, n, ball, i, flag;
scanf("%d", &c);
while(c--){
m = n = flag = 0;
for(i = 0;i < 10;i++){
scanf("%d", &ball);
if(ball > m)
m = ball;
else if(ball > n)
n = ball;
else
flag = 1;
}
printf(flag ? "NO\n":"YES\n");
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182975/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182975/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 b[4][2],c,d[16]={0};
void f(int a){
if(a==16){
c++;
return ;
}
if(d[a]){
f(a+1);
return ;
}
int i;
for(i=0;i<4;i++){
int y=(a/4)+b[i][1],x=(a%4)+b[i][0];
if(y<0||3<y||x<0||3<x)continue;
if(d[y*4+x])continue;
d[a]=d[y*4+x]=1;
f(a+1);
d[a]=d[y*4+x]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183024/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183024/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@d = dso_local local_unname... |
#include <stdio.h>
int main(void) {
float a,b;
while(scanf("%f%f",&a,&b) != EOF){
if(a < 35.50f && b < 71.00f){
printf("AAA\n");
}
else if(a < 37.50f && b < 77.00f){
printf("AA\n");
}
else if(a < 40.00f && b < 83.00f){
printf("A\n");
}
else if(a < 43.00f && b < 89.00f){
printf("B\n");
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183068/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183068/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, n,i,j;
scanf ("%d", &t);
while (t--){
scanf ("%d", &n);
for (i=4*n-2, j=1; j <= n; j++, i-= 2){
printf ("%d", i);
if (j != n) printf(" ");
else printf ("\n");
}
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18314/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18314/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main(void){
char a[3];
scanf("%s",a);
((a[0]=='9')||(a[1]=='9')) ? printf("Yes") : printf("No");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183190/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183190/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 || N / 10 == 9)
printf("Yes\n");
else
printf("No\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183233/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183233/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
int a=n/10;
int b=n%10;
if(a==9||b==9){printf("Yes");}
else {printf("No");}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183277/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183277/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
typedef long long (ll);
#define A 200005
#define M 1000000007
ll z[A],x[A],y[A],s[A];
void merge(ll arr[],ll l,ll m,ll r)
{
ll i,j,k,n1,n2;
n1=m-l+1;
n2=r-m;
ll L[n1],R[n2];
for(i=0;i<n1;i++)
L[i]=arr[l+i];
for(j=0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18332/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18332/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 N,a,b;
scanf("%d",&N);
if(10<=N&&N<=99)
{
a=N/10;
b=N%10;
if(a==9||b==9)
{printf("Yes");}
else
{printf("No");}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183363/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183363/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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);
if(n%10==9||n/10==9){
printf("Yes\n");
}else{
printf("No\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183413/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183413/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d", &a);
if(a % 10 == 9 ) printf("Yes");
else if(90 <= a && a < 99) printf("Yes");
else printf("No");
// int i, N;
// scanf("%d", &N);
// scanf("%d", );
// for(i = 0; i < N; i++)
// {
// scanf("%d", &a[i]);
// }
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183457/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183457/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void)
{
int t;
scanf("%d",&t);
for(int i = 0;i<t;i++)
{
int n;
scanf("%d",&n);
int arr[n];
long long int sum = 0;
for(int j = 0;j<n;j++)
{
scanf("%d",&arr[j]);
sum += arr[j];
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18350/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18350/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main()
{
char s[101],t[101];
scanf("%s %s",&s,&t);
printf("%s%s\n",t,s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183543/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183543/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[300];
char T[300];
scanf("%s %s",S,T);
strcat(T,S);
printf("%s\n",T);
return(0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183637/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183637/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main (void){
char str[100];
char str2[100];
scanf("%s %s", str, str2);
printf("%s%s", str2, str);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183680/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183680/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
char a[101],b[101];
scanf("%s%s",a,b);
printf("%s%s",b,a);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_183723/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_183723/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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.