본문 바로가기

전체보기115

ACMICPC 1205 : 등수 구하기 http://www.acmicpc.net/problem/1205 #include #include using namespace std; int main() { vector scores; int num_score, score, max_rank; cin >> num_score >> score >> max_rank; for (int i = 0; i > in_temp; scores.push_back(in_temp); } if (num_score == max_rank && scores[num_score - 1] >= score) cout 2014. 12. 13.
Visual Studio에서 컴파일시 콘솔창 유지하기 증상:Visual Studio에서 디버깅 하지 않고 시작(Ctrl + F5)을 해도 컴파일시 콘솔창이 꺼지는 현상 해결 방법 1 코드에 system("pause");를 추가한다. #include int main(...) { // 코드 내용 system("pause"); return 0; } 해결 방법 21. 프로젝트 설정(Properties) -> 구성 속성(Configuration Properties) -> 링커(Linker) -> 시스템(System) -> 하위 시스템(Subsystem) -> 콘솔 Console(/SUBSYSTEM:CONSOLE) 선택 2014. 12. 13.
ACMICPC 1002 : 터렛 http://www.acmicpc.net/problem/1002 #include using namespace std; int main(){ int num_cases = 0; cin >> num_cases; for (int i = 0; i > x1 >> y1 >> r1 >> x2 >> y2 >> r2; d1 = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); d2 = (r1 + r2) * (r1 + r2); if (x1 == x2 && y1 == y2 && r1 == r2) { cout 2014. 12. 12.
ACMICPC 1000 : A+B http://www.acmicpc.net/problem/1000 #include using namespace std; int main(){ int a, b; cin >> a >> b; cout 2014. 12. 12.
Algospot : LECTURE https://algospot.com/judge/problem/read/LECTURE #include #include #include #include using namespace std; int main(void) { int num_cases = 0; cin >> num_cases; for (int i = 0; i > in_str; int half_size = in_str.length() / 2; for (int j = 0; j < half_size; ++j) { vec_string.push_back(in_str.substr(j * 2, 2)); } sort(vec_string... 2014. 12. 12.
Algospot : DRAWRECT https://algospot.com/judge/problem/read/DRAWRECT #include using namespace std; int GetDifferent(int a, int b, int c) { return (a == b) ? c : (b == c) ? a : b; } int main() { int num_cases = 0; cin >> num_cases; for (int i = 0; i > x[j] >> y[j]; } cout 2014. 12. 11.