-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
151 changed files
with
6,205 additions
and
6,166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#include<stdio.h> | ||
|
||
int main() | ||
{ | ||
int a, b, h, ans; | ||
|
||
scanf("%d %d %d", &a, &b, &h); | ||
ans=((a+b)*h)/2; | ||
|
||
printf("%d\n", ans); | ||
return 0; | ||
} | ||
#include<stdio.h> | ||
|
||
int main() | ||
{ | ||
int a, b, h, ans; | ||
|
||
scanf("%d %d %d", &a, &b, &h); | ||
ans=((a+b)*h)/2; | ||
|
||
printf("%d\n", ans); | ||
return 0; | ||
} |
32 changes: 16 additions & 16 deletions
32
At Coder/164/A - Sheep and Wolves.c → AtCoder/164/A - Sheep and Wolves.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#include<stdio.h> | ||
|
||
int main() | ||
{ | ||
int s, w; | ||
scanf("%d %d", &s, &w); | ||
|
||
if(w >= s) | ||
{ | ||
printf("unsafe\n"); | ||
} | ||
else{ | ||
printf("safe\n"); | ||
} | ||
return 0; | ||
} | ||
#include<stdio.h> | ||
|
||
int main() | ||
{ | ||
int s, w; | ||
scanf("%d %d", &s, &w); | ||
|
||
if(w >= s) | ||
{ | ||
printf("unsafe\n"); | ||
} | ||
else{ | ||
printf("safe\n"); | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#include<stdio.h> | ||
|
||
int main() | ||
{ | ||
int a, b, c, d, m1, m2; | ||
|
||
scanf("%d %d %d %d", &a, &b, &c, &d); | ||
|
||
m1 = a-b; | ||
m2 = c-d; | ||
|
||
if(m1 > m2) | ||
{ | ||
printf("Yes\n"); | ||
} | ||
else | ||
{ | ||
printf("No\n"); | ||
} | ||
return 0; | ||
} | ||
#include<stdio.h> | ||
|
||
int main() | ||
{ | ||
int a, b, c, d, m1, m2; | ||
|
||
scanf("%d %d %d %d", &a, &b, &c, &d); | ||
|
||
m1 = a-b; | ||
m2 = c-d; | ||
|
||
if(m1 > m2) | ||
{ | ||
printf("Yes\n"); | ||
} | ||
else | ||
{ | ||
printf("No\n"); | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#include<stdio.h> | ||
#include<string.h> | ||
|
||
int main() | ||
{ | ||
char a[3], str1[] = "ABC", str2[] = "ARC"; | ||
scanf("%s", a); | ||
|
||
if(a == str1) | ||
{ | ||
printf("ARC\n"); | ||
} | ||
else if(a == str2) | ||
{ | ||
printf("%ABC\n"); | ||
} | ||
|
||
return 0; | ||
} | ||
#include<stdio.h> | ||
#include<string.h> | ||
|
||
int main() | ||
{ | ||
char a[3], str1[] = "ABC", str2[] = "ARC"; | ||
scanf("%s", a); | ||
|
||
if(a == str1) | ||
{ | ||
printf("ARC\n"); | ||
} | ||
else if(a == str2) | ||
{ | ||
printf("%ABC\n"); | ||
} | ||
|
||
return 0; | ||
} |
38 changes: 19 additions & 19 deletions
38
...Coder Beginner Contest 145/A - Circle.Cpp → ...Coder Beginner Contest 145/A - Circle.Cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
//thanks God For Every Thing! | ||
//contest link: | ||
#include<bits/stdc++.h> | ||
#define pi acose(-1) | ||
|
||
typedef long long int ll; | ||
typedef double dl; | ||
using namespace std; | ||
const int mx = 1e2+5; | ||
|
||
|
||
int main() | ||
{ | ||
int n; | ||
cin>>n; | ||
cout<< n*n; | ||
|
||
return 0; | ||
} | ||
//thanks God For Every Thing! | ||
//contest link: | ||
#include<bits/stdc++.h> | ||
#define pi acose(-1) | ||
|
||
typedef long long int ll; | ||
typedef double dl; | ||
using namespace std; | ||
const int mx = 1e2+5; | ||
|
||
|
||
int main() | ||
{ | ||
int n; | ||
cin>>n; | ||
cout<< n*n; | ||
|
||
return 0; | ||
} |
80 changes: 40 additions & 40 deletions
80
...AtCoder Beginner Contest 145/B - Echo.cpp → ...AtCoder Beginner Contest 145/B - Echo.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
//thanks God For Every Thing! | ||
//contest link: | ||
#include<bits/stdc++.h> | ||
#define pi acose(-1) | ||
|
||
typedef long long int ll; | ||
typedef double dl; | ||
using namespace std; | ||
const int mx = 1e2+5; | ||
|
||
|
||
int main() | ||
{ | ||
int n, h1; | ||
cin>>n; | ||
if(n%2==1) | ||
{ | ||
cout<<"No"<<endl; | ||
return 0; | ||
} | ||
char str[n+5]; | ||
for(int i=0; i<n; i++) | ||
{ | ||
cin>>str[i]; | ||
} | ||
int cnt=0; | ||
|
||
for(int i=0; i<n/2; i++) | ||
{ | ||
if(str[i]!=str[n/2+i]) | ||
{ | ||
cout<<"No"<<endl; | ||
return 0; | ||
} | ||
} | ||
|
||
cout<<"Yes"<<endl; | ||
|
||
return 0; | ||
} | ||
//thanks God For Every Thing! | ||
//contest link: | ||
#include<bits/stdc++.h> | ||
#define pi acose(-1) | ||
|
||
typedef long long int ll; | ||
typedef double dl; | ||
using namespace std; | ||
const int mx = 1e2+5; | ||
|
||
|
||
int main() | ||
{ | ||
int n, h1; | ||
cin>>n; | ||
if(n%2==1) | ||
{ | ||
cout<<"No"<<endl; | ||
return 0; | ||
} | ||
char str[n+5]; | ||
for(int i=0; i<n; i++) | ||
{ | ||
cin>>str[i]; | ||
} | ||
int cnt=0; | ||
|
||
for(int i=0; i<n/2; i++) | ||
{ | ||
if(str[i]!=str[n/2+i]) | ||
{ | ||
cout<<"No"<<endl; | ||
return 0; | ||
} | ||
} | ||
|
||
cout<<"Yes"<<endl; | ||
|
||
return 0; | ||
} |
File renamed without changes.
File renamed without changes.
36 changes: 18 additions & 18 deletions
36
.../AtCoder Beginner Contest 168/Therefore.c → .../AtCoder Beginner Contest 168/Therefore.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#include<stdio.h> | ||
|
||
int main() | ||
{ | ||
int n, last_digit; | ||
scanf("%d", &n); | ||
last_digit = n%10; | ||
if(last_digit == 2 ||last_digit == 4 || last_digit == 5||last_digit == 7||last_digit == 9){ | ||
printf("hon\n"); | ||
} | ||
else if(last_digit == 0||last_digit == 1||last_digit == 6||last_digit == 8){ | ||
printf("pon\n"); | ||
} | ||
else if(last_digit == 3){ | ||
printf("bon\n"); | ||
} | ||
return 0; | ||
} | ||
#include<stdio.h> | ||
|
||
int main() | ||
{ | ||
int n, last_digit; | ||
scanf("%d", &n); | ||
last_digit = n%10; | ||
if(last_digit == 2 ||last_digit == 4 || last_digit == 5||last_digit == 7||last_digit == 9){ | ||
printf("hon\n"); | ||
} | ||
else if(last_digit == 0||last_digit == 1||last_digit == 6||last_digit == 8){ | ||
printf("pon\n"); | ||
} | ||
else if(last_digit == 3){ | ||
printf("bon\n"); | ||
} | ||
return 0; | ||
} |
56 changes: 28 additions & 28 deletions
56
...tCoder Beginner Contest 168/Triple Dots.c → ...tCoder Beginner Contest 168/Triple Dots.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
#include<stdio.h> | ||
#include<string.h> | ||
|
||
int main() | ||
{ | ||
char str[105]; | ||
int k, ln, i; | ||
//int unused __attribute__((unused)); | ||
/*unused = */scanf("%d",&k); | ||
char n[k]; | ||
n[k]='\0'; | ||
/*unused = */scanf("%s", str); | ||
ln = strlen(str); | ||
|
||
if(ln <=k) | ||
{ | ||
printf("%s\n", str); | ||
} | ||
else | ||
{ | ||
for(i=0; i<k; i++) | ||
{ | ||
n[i]=str[i]; | ||
} | ||
printf("%s...\n", n); | ||
} | ||
|
||
} | ||
#include<stdio.h> | ||
#include<string.h> | ||
|
||
int main() | ||
{ | ||
char str[105]; | ||
int k, ln, i; | ||
//int unused __attribute__((unused)); | ||
/*unused = */scanf("%d",&k); | ||
char n[k]; | ||
n[k]='\0'; | ||
/*unused = */scanf("%s", str); | ||
ln = strlen(str); | ||
|
||
if(ln <=k) | ||
{ | ||
printf("%s\n", str); | ||
} | ||
else | ||
{ | ||
for(i=0; i<k; i++) | ||
{ | ||
n[i]=str[i]; | ||
} | ||
printf("%s...\n", n); | ||
} | ||
|
||
} |
24 changes: 12 additions & 12 deletions
24
At Coder/AtCoder Beginner Contest 169/A.CPP → AtCoder/AtCoder Beginner Contest 169/A.CPP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#include<bits/stdc++.h> | ||
|
||
using namespace std; | ||
|
||
int main() | ||
{ | ||
int a, b, c; | ||
cin>>a>>b; | ||
c=a*b; | ||
cout<<c<<endl; | ||
return 0; | ||
} | ||
#include<bits/stdc++.h> | ||
|
||
using namespace std; | ||
|
||
int main() | ||
{ | ||
int a, b, c; | ||
cin>>a>>b; | ||
c=a*b; | ||
cout<<c<<endl; | ||
return 0; | ||
} |
Oops, something went wrong.