This file contains hidden or 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
#include <stdio.h> | |
int Max(int a, int b) { return a > b ? a : b; } | |
int main() { | |
int i, j, n, max = 0, d[501][501] = {0}; | |
scanf("%d", &n); | |
for (i = 1; i <= n; i++) | |
for (j = 1; j <= i; j++) { | |
scanf("%d", &d[i][j]); | |
if (j == 1) |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(false); | |
cin.tie(nullptr); | |
int input; | |
cin >> input; |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
const int MAX = 1000; | |
int N; | |
int d[4][MAX + 1]; | |
int house[4][MAX + 1]; // [1] : red, [2] : green, [3] : blue | |
int main(void) | |
{ |
This file contains hidden or 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
#include <iostream> | |
#include <string> | |
#include <algorithm> | |
using namespace std; | |
const int INF = 987654321; | |
const int MAX = 50; | |
int M, N; | |
string board[MAX]; | |
//(0, 0)이 W인 체스보드 |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
const int MAX = 1000000; | |
bool check[MAX+1]; | |
int main() { | |
check[0] = check[1] = true; | |
for (int i=2; i*i<=MAX; i++) { | |
if (check[i] == false) { | |
for (int j=i+i; j<=MAX; j+=i) { |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(false); | |
cin.tie(nullptr); | |
int num1, num2, minNum, repeat = 1; | |
cin >> num1; |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(false); | |
cin.tie(nullptr); | |
int testCnt; | |
cin >> testCnt; |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(false); | |
cin.tie(nullptr); | |
int test; | |
cin >> test; |
This file contains hidden or 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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(false); | |
cin.tie(nullptr); | |
int manCnt; |
This file contains hidden or 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
#include<iostream> | |
#include<cstdio> | |
using namespace std; | |
int warp(int dist) { | |
long long n, minN, powN, maxN, warpCount= 0; | |
for(n=1;;n++){ | |
powN = n*n; | |
minN = powN - n + 1; | |
maxN = powN + 1 + n - 1; |
NewerOlder