Skip to content

Commit ca61c38

Browse files
committed
AtCoder ABC303, Delete unusable files
1 parent a87c0e4 commit ca61c38

File tree

12 files changed

+105
-154
lines changed

12 files changed

+105
-154
lines changed

.idea/.gitignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/.name

Lines changed: 0 additions & 1 deletion
This file was deleted.

.idea/algorithm-study.iml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

.vscode/tasks.json

Lines changed: 0 additions & 79 deletions
This file was deleted.

AtCoder/ABC303/a.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include <bits/stdc++.h>
2+
3+
using namespace std;
4+
5+
int main() {
6+
int n, i;
7+
bool res = true;
8+
string s1, s2;
9+
cin >> n;
10+
cin >> s1 >> s2;
11+
for (i = 0; i < n; i++) {
12+
if (!(
13+
(s1[i] == s2[i]) ||
14+
(s1[i] == 'o' && s2[i] == '0') ||
15+
(s1[i] == '0' && s2[i] == 'o') ||
16+
(s1[i] == 'l' && s2[i] == '1') ||
17+
(s1[i] == '1' && s2[i] == 'l')
18+
)) {
19+
res = false;
20+
break;
21+
}
22+
}
23+
cout << (res ? "Yes" : "No");
24+
return 0;
25+
}

AtCoder/ABC303/b.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include <bits/stdc++.h>
2+
3+
using namespace std;
4+
5+
int rec[51][51];
6+
7+
int main() {
8+
int n, m, i, j, k, a, b, c = 0, arr[51][51];
9+
cin >> n >> m;
10+
for (j = 0; j < m; j++) {
11+
for (i = 0; i < n; i++) {
12+
cin >> arr[j][i];
13+
}
14+
}
15+
for (j = 0; j < m; j++) {
16+
for (i = 0; i < n - 2; i++) {
17+
for (k = i + 2; k < n; k++) {
18+
a = min(arr[j][k], arr[j][i]);
19+
b = max(arr[j][k], arr[j][i]);
20+
rec[a][b] += 1;
21+
}
22+
}
23+
}
24+
for (j = 1; j <= n - 1; j++) {
25+
for (i = j + 1; i <= n; i++) {
26+
if (rec[j][i] == m) {
27+
c += 1;
28+
}
29+
}
30+
}
31+
cout << c;
32+
return 0;
33+
}

AtCoder/ABC303/c.cpp

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#include <bits/stdc++.h>
2+
#define SALT 200001
3+
4+
using namespace std;
5+
using ull = unsigned long long;
6+
7+
unordered_map<ull, bool> items;
8+
9+
ull key(ull x, ull y) {
10+
return (x + SALT) * 1000000 + y + SALT;
11+
}
12+
13+
int main() {
14+
string s;
15+
int n, m, h, k, i, x, y;
16+
bool res = true;
17+
cin >> n >> m >> h >> k >> s;
18+
for (i = 0; i < m; i++) {
19+
cin >> x >> y;
20+
items[key(x, y)] = true;
21+
}
22+
x = 0;
23+
y = 0;
24+
for (i = 0; i < n; i++) {
25+
if (s[i] == 'R') {
26+
x += 1;
27+
} else if (s[i] == 'L') {
28+
x -= 1;
29+
} else if (s[i] == 'U') {
30+
y += 1;
31+
} else {
32+
y -= 1;
33+
}
34+
h -= 1;
35+
if (h < 0) {
36+
res = false;
37+
break;
38+
}
39+
if (h < k && items[key(x, y)]) {
40+
h = k;
41+
items[key(x, y)] = false;
42+
}
43+
}
44+
cout << (res ? "Yes" : "No");
45+
return 0;
46+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Solve algorithm problems and write code.
99
- [CodeUp](https://codeup.kr)
1010
- [Baekjoon Online Judge](https://www.acmicpc.net)
1111
- [LeetCode](https://leetcode.com/problemset/all)
12+
- [AtCoder](https://atcoder.jp)
1213

1314
<br/>
1415

0 commit comments

Comments
 (0)