Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4bf06f2
commit and sloved 01/22
cywin1018 Jan 22, 2024
36e57e7
commit and sloved 01/23
cywin1018 Jan 23, 2024
5413f0f
commit and sloved 01/24
cywin1018 Jan 24, 2024
c2f56a8
commit and sloved 01/25
cywin1018 Jan 25, 2024
3720369
commit and sloved 01/26
cywin1018 Jan 26, 2024
ca3aa81
commit and sloved 01/27
cywin1018 Jan 27, 2024
05de5d7
commit and sloved 01/28
cywin1018 Jan 28, 2024
60e841c
commit and sloved 01/29
cywin1018 Jan 29, 2024
04c6df2
commit and sloved 01/29
cywin1018 Jan 29, 2024
f1bf87e
commit and sloved 01/30
cywin1018 Jan 30, 2024
2856f96
commit and sloved 02/01
cywin1018 Feb 1, 2024
56d4028
commit and sloved 02/02
cywin1018 Feb 2, 2024
8dd550b
commit and sloved 02/03
cywin1018 Feb 3, 2024
409f030
commit and sloved 02/04
cywin1018 Feb 4, 2024
b84d2fd
commit and sloved 02/05
cywin1018 Feb 5, 2024
e688963
commit and sloved 02/06
cywin1018 Feb 6, 2024
1ea31ef
commit and sloved 02/07
cywin1018 Feb 7, 2024
a0dd1b4
commit and sloved 02/08
cywin1018 Feb 8, 2024
73b081c
commit and sloved 02/09
cywin1018 Feb 9, 2024
7989e33
commit and sloved 02/13
cywin1018 Feb 13, 2024
aa3bb17
commit and sloved 02/14
cywin1018 Feb 14, 2024
60e0b1a
commit and sloved 02/15
cywin1018 Feb 15, 2024
7cbeac5
commit and sloved 02/15
cywin1018 Feb 15, 2024
8adbbbd
commit and sloved 02/16
cywin1018 Feb 16, 2024
2ab893a
commit and sloved 02/18
cywin1018 Feb 18, 2024
da3c7d3
commit and sloved 02/19
cywin1018 Feb 19, 2024
9a25bad
commit and sloved 02/20
cywin1018 Feb 20, 2024
161fcd4
commit and sloved 02/20
cywin1018 Feb 20, 2024
86f79a1
commit and sloved 02/21
cywin1018 Feb 21, 2024
6eba125
commit and sloved 02/22
cywin1018 Feb 22, 2024
0460554
commit and sloved 02/22
cywin1018 Feb 22, 2024
6176b67
commit and sloved 02/23
cywin1018 Feb 23, 2024
0bf26dc
commit and sloved 02/23
cywin1018 Feb 23, 2024
c7ae68d
commit and sloved 02/25
cywin1018 Feb 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions BOJ_10189.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define MOD 1000000000
const ll INF = 10e12 + 10;
using namespace std;

int main() {
ios_base::sync_with_stdio(false), cin.tie(0);
cout << "# # #### #### # #" << endl;
cout << "#### # # # # # #" << endl;
cout << "#### # # # # # #" << endl;
cout << "# # #### #### # #" << endl;
}
63 changes: 63 additions & 0 deletions BOJ_1080.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define MOD 1000000000
const ll INF = 10e12 + 10;
using namespace std;

char A[55][55];
char B[55][55];
int n, m;

void Checked(int a, int b) {
for (int i = a; i <= a + 2; i++) {
for (int j = b; j <= b + 2; j++) {
if (A[i][j] == '0')
A[i][j] = '1';
else
A[i][j] = '0';
}
}
// for (int i = 1; i <= n; i++) {
// for (int j = 1; j <= m; j++) {
// cout << A[i][j] << " ";
// }
// cout << '\n';
// }
// cout << '\n';
}

int main() {
ios_base::sync_with_stdio(false), cin.tie(0);

cin >> n >> m;

for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> B[i][j];
}
}
int cnt = 0;
for (int i = 0; i < n - 2; i++) {
for (int j = 0; j < m - 2; j++) {
// cout << i << " " << j << '\n';
if (A[i][j] != B[i][j]) {
// cout << i << " " << j << '\n';
Checked(i, j);
cnt++;
}
}
}
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
if (A[i][j] != B[i][j])
cnt = -1;
cout << cnt << '\n';
}
13 changes: 13 additions & 0 deletions BOJ_1132.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define MOD 1000000000
const ll INF = 10e12 + 10;
using namespace std;

int main() {
ios_base::sync_with_stdio(false), cin.tie(0);

}
28 changes: 0 additions & 28 deletions BOJ_11444.cpp

This file was deleted.

46 changes: 0 additions & 46 deletions BOJ_1153.cpp

This file was deleted.

36 changes: 0 additions & 36 deletions BOJ_11687.cpp

This file was deleted.

23 changes: 23 additions & 0 deletions BOJ_11758.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define MOD 1000000000
const ll INF = 10e12 + 10;
using namespace std;

int main() {
ios_base::sync_with_stdio(false), cin.tie(0);
int x1, x2, x3, y1, y2, y3;
cin >> x1 >> y1;
cin >> x2 >> y2;
cin >> x3 >> y3;
int ccw = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);
if (ccw > 0)
cout << 1;
else if (ccw < 0)
cout << -1;
else
cout << 0;
}
32 changes: 32 additions & 0 deletions BOJ_12849.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define MOD 1000000007
const ll INF = 10e12 + 10;
using namespace std;

ll bon[8]; // 정보관을 idx= 0으로 시작하여 반시계방향으로 idx++
ll dp[8];

int main() {
ios_base::sync_with_stdio(false), cin.tie(0);
int d;
cin >> d;
dp[0] = 1;
for (int i = 0; i < d; i++) {
bon[0] = dp[1] + dp[7];
bon[1] = dp[0] + dp[2] + dp[7];
bon[2] = dp[1] + dp[3] + dp[6] + dp[7];
bon[3] = dp[2] + dp[4] + dp[6];
bon[4] = dp[3] + dp[5];
bon[5] = dp[4] + dp[6];
bon[6] = dp[2] + dp[3] + dp[5] + dp[7];
bon[7] = dp[0] + dp[1] + dp[2] + dp[6];

for (int j = 0; j < 8; j++)
dp[j] = bon[j] % MOD;
}
cout << dp[0];
}
60 changes: 60 additions & 0 deletions BOJ_12850.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define MOD 1000000007
const ll INF = 10e12 + 10;
using namespace std;

typedef vector<vector<long long> > matrix;

matrix operator *(const matrix &a, const matrix &b) {
int n = a.size();
matrix c(n, vector<long long>(n, 0));
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
for (int k = 0; k < n; k++) {
c[i][j] += (a[i][k] * b[k][j]) % MOD;
c[i][j] %= MOD;
}
}
}
return c;
}

matrix A = {
{0, 1, 0, 0, 0, 1, 0, 0},
{1, 0, 1, 0, 0, 0, 1, 0},
{0, 1, 0, 1, 0, 0, 1, 1},
{0, 0, 1, 0, 1, 0, 0, 1},
{0, 0, 0, 1, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 1, 0, 0, 1, 0, 1},
{0, 0, 1, 1, 1, 0, 1, 0}
};

matrix ans = {
{1, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 1}
};

int main() {
ios_base::sync_with_stdio(false), cin.tie(0);
int d;
cin >> d;
while (d > 0) {
if (d % 2) {
ans = ans * A;
}
A = A * A;
d /= 2;
}
cout << ans[4][4] << '\n';
}
28 changes: 28 additions & 0 deletions BOJ_1377.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define MOD 1000000000
const ll INF = 10e12 + 10;
using namespace std;

pii A[505050];

int main() {
ios_base::sync_with_stdio(false), cin.tie(0);
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> A[i].first;
A[i].second = i;
}
stable_sort(A, A + n);
int ans = 0;
for (int i = 0; i < n; i++) {
cout << A[i].second << " ";
// cout << A[i].second - i << " ";
ans = max(ans, abs(A[i].second - i));
}
// cout << ans + 1;
}
Loading