Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- scpc
- USACO 2017 February Contest
- USACO 2016 January Contest
- USACO 2017 December Contest
- scpc 예선
- USACO 2016 February Contest
- scpc2017
- USACO 2017 January Contest
- USACO 2016 December Contest
- USACO 2017 US Open Contest
Archives
- Today
- Total
CS's Blog
#Practice Codeforces Round #200 div1
A,B,C,D를 해결했다. A. Rational Resistance GCD처럼 풀면된다. Code : #include int main() { long long int a, b; long long int ans = 0; scanf("%lld%lld", &a, &b); while (a>0&&b>0) { long long int c; ans += a / b; a %= b; a ^= b ^= a ^= b; } printf("%lld", ans); return 0; } B. Alternating Current 결국 ++이나 --는 없다고 생각해도 문제가 동치이기 때문에 스택을 이용해서 해결해주면 된다. Code :#include #include #include using namespace std; vectorst..
Problem Solving/Practice
2017. 6. 28. 11:57