목록전체 (216)
피너클의 it공부방
https://www.acmicpc.net/problem/10807 10807번: 개수 세기 첫째 줄에 정수의 개수 N(1 ≤ N ≤ 100)이 주어진다. 둘째 줄에는 정수가 공백으로 구분되어져있다. 셋째 줄에는 찾으려고 하는 정수 v가 주어진다. 입력으로 주어지는 정수와 v는 -100보다 크거 www.acmicpc.net 간단한 구현문제다. #include using namespace std; int n, v; int arr[101]; int main() { int ans = 0; cin >> n; for (int i = 0; i > arr[i]; cin >> v; for (int i = 0; i < n; i++) if (arr[i] == v) ans++; cout
https://www.acmicpc.net/problem/11948 11948번: 과목선택 JOI는 물리, 화학, 생물, 지구과학, 역사, 지리 총 6 과목의 시험을 봤다. 각 시험의 만점은 100점이다. JOI는 물리, 화학, 생물, 지구과학 4과목 중에서 3 과목을 선택하고 역사, 지리 2 과목 중에 www.acmicpc.net 간단한 구현 문제다. #include #include using namespace std; int arr_1[4]; int arr_2[2]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); for (int i = 0; i > arr_1[i]; for (int i = 0; i <..
https://www.acmicpc.net/problem/1264 1264번: 모음의 개수 입력은 여러 개의 테스트 케이스로 이루어져 있으며, 각 줄마다 영어 대소문자, ',', '.', '!', '?', 공백으로 이루어진 문장이 주어진다. 각 줄은 최대 255글자로 이루어져 있다. 입력의 끝에는 한 줄 www.acmicpc.net 간단한 구현문제다. #include #include using namespace std; char c[] = { 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U' }; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a; string s; while (true..
https://www.acmicpc.net/problem/10768 10768번: 특별한 날 마지막 줄에 "Before", "After"나 "Special"을 출력한다. www.acmicpc.net 단순한 구현 문제다. #include using namespace std; int a, b; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> a >> b; if (a == 2 && b == 18) cout
https://www.acmicpc.net/problem/10101 10101번: 삼각형 외우기 문제의 설명에 따라 Equilateral, Isosceles, Scalene, Error 중 하나를 출력한다. www.acmicpc.net 간단한 구현문제다. 모든 조건을 구현하면 된다. #include using namespace std; int a, b, c; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> a >> b >> c; if (a == 60 && b == 60 && c == 60) cout
https://www.acmicpc.net/problem/4299 4299번: AFC 윔블던 원섭이는 잉글랜드 4부리그 풋볼 리그 2에서 활약하는 AFC 윔블던을 좋아한다. 이 팀은 2002년 윔블던 FC가 밀턴 킨스로 연고 이전을 감행하자 윔블던의 서포터들이 스스로 나서 창단한 팀이다. 윔 www.acmicpc.net 간단한 수학 문제다. cin >> a >> b; if (a < b) { cout
https://www.acmicpc.net/problem/16946 16946번: 벽 부수고 이동하기 4 N×M의 행렬로 표현되는 맵이 있다. 맵에서 0은 이동할 수 있는 곳을 나타내고, 1은 이동할 수 없는 벽이 있는 곳을 나타낸다. 한 칸에서 다른 칸으로 이동하려면, 두 칸이 인접해야 한다. 두 칸이 www.acmicpc.net 귀찮은 bfs문제다. cin >> n >> m; memset(num, 0, sizeof(num)); memset(visited, false, sizeof(visited)); for (int i = 0; i > map[i]; for (int j = 0; j < m; j++) { if (map[i][j] != '0') num[i][j] = 1; } ..
https://www.acmicpc.net/problem/2752 2752번: 세수정렬 숫자 세 개가 주어진다. 이 숫자는 1보다 크거나 같고, 1,000,000보다 작거나 같다. 이 숫자는 모두 다르다. www.acmicpc.net 간단한 정렬문제다. #include #include using namespace std; int arr[3]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> arr[0] >> arr[1] >> arr[2]; sort(arr, arr + 3); cout
https://www.acmicpc.net/problem/2420 2420번: 사파리월드 첫째 줄에 두 도메인의 유명도 N과 M이 주어진다. (-2,000,000,000 ≤ N, M ≤ 2,000,000,000) www.acmicpc.net 간단한 수학 문제다. #include using namespace std; long long a, b; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> a >> b; cout
https://www.acmicpc.net/problem/15964 15964번: 이상한 기호 부산일과학고등학교의 효진이는 수학의 귀재이다. 어떤 문제라도 보면 1분 내에 풀어버린다는 학교의 전설이 내려올 정도였는데, 이런 킹ㅡ갓 효진에게도 고민이 생겼다. 대부분의 문제에서 반 www.acmicpc.net 간단한 수학 문제다. #include using namespace std; long long a, b; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> a >> b; cout