본문 바로가기

전체 글

[코드포스 Practice7] C. Chewbaсca and Number Luke Skywalker gave Chewbacca an integer number x. Chewbacca isn't good at numbers but he loves inverting digits in them. Inverting digit t means replacing it with digit 9 - t. Help Chewbacca to transform the initial number x to the minimum possible positive number by inverting some (possibly, zero) digits. The decimal representation of the final number shouldn't start with a zero. Input The fir.. 더보기
[코드포스 Practice7] 후기 오랜만의 코포~~ 시험기간동안 못 풀고 끝나니 과제 생겨서 못 풀고 이제야 푼다. 보통 문제풀 때 긴장해서 파들파들 떨면서 푸는데 오늘은 떨리지는 않았다. 그래서 A랑 B번은 빠르게 넘겼음. 먼저 입출력 예시부터 적고 읽으면서 문제 이해하고.. 그 다음 C번 푸는데 C번 맞왜틀이었음ㅋㅋㅋ 아 이게 맞는데?? 왜 계속 틀리지?? 뭐가 문제지?? 그러다 한 한시간 반 쯤 남기고 D번 풀려고 했었다. D번 딱 보자마자 파라매트릭 서치 생각났다. 최솟값 구하는 거고 전에 푼 공유기 문제도 생각나고.. 그런데 푼 지 너무 오래돼서 어떻게 하지 고민하다가 다시 C번이나 풀자해서 다시 C번으로 돌아왔다. C번 0과 9만 있는 경우 빠트린거 발견해서 추가했는데 또 틀림.. 그래서 이제는 E번을 봤다. E번 읽다가 빠른.. 더보기
[코드포스 Practice6] E. Little Pony and Expected Maximum 하루 고민해봤지만 모르므로 패스.. 7번 코포 풀고 다시 봐야겠다 더보기
[코드포스 Practice6] D. Berstagram Polycarp recently signed up to a new social network Berstagram. He immediately published nn posts there. He assigned numbers from 11 to nn to all posts and published them one by one. So, just after publishing Polycarp's news feed contained posts from 11 to nn — the highest post had number 11, the next one had number 22, ..., the lowest post had number nn. After that he wrote down all likes from .. 더보기
[코드포스 Practice6] C. Food on the Plane A new airplane SuperPuperJet has an infinite number of rows, numbered with positive integers starting with 1 from cockpit to tail. There are six seats in each row, denoted with letters from 'a' to 'f'. Seats 'a', 'b' and 'c' are located to the left of an aisle (if one looks in the direction of the cockpit), while seats 'd', 'e' and 'f' are located to the right. Seats 'a' and 'f' are located near.. 더보기
[코드포스 Practice6] B. Mammoth's Genome Decoding The process of mammoth's genome decoding in Berland comes to its end! One of the few remaining tasks is to restore unrecognized nucleotides in a found chain s. Each nucleotide is coded with a capital letter of English alphabet: 'A', 'C', 'G' or 'T'. Unrecognized nucleotides are coded by a question mark '?'. Thus, s is a string consisting of letters 'A', 'C', 'G', 'T' and characters '?'. It is kn.. 더보기
[코드포스 Practice6] A. Police Recruits The police department of your city has just started its journey. Initially, they don’t have any manpower. So, they started hiring new recruits in groups. Meanwhile, crimes keeps occurring within the city. One member of the police force can investigate only one crime during his/her lifetime. If there is no police officer free (isn't busy with crime) during the occurrence of a crime, it will go un.. 더보기
[코드포스 Practice6] 후기 경험상 후기는 빨리 적는 게 좋음 그래서 곧 수업이지만 호다닥 적어야지 암튼 이번 코포 요약하면 심장 쿵쾅쿵쾅 바운스 와그작 막 사람들이 멘탈관리해라~~ 할때 이런 거 안 믿었는데 (이 때의 나 : 멘탈은 무슨 걍 실력대로 치는거 아님?) ㅅㅂㅠㅠ 중간에 막혔을 때 부터 심장 바사삭됨 밝히자면 오늘 5문제 중 한 문제 맞았다 꺌꺌 흑흑 바사삭 게다가 보통 폰이랑 카톡 다 꺼놓고 하는데 하필 오늘 까먹고 안 껐고 교수님(??) 전화와서 A 풀다가 5분동안 전화하고 왔음 으아악 그 이후로도 영어 안 읽히고, 풀었는데 코드 안 돌아가고 그러다 한문제로 끝나버렸음.. 종강하고 일 없는 백수니깐 그때는 문제 해석이나 꾸준히 해야겠다.. 진짜.. 내 영어실력에 회의감이 듬.. 토익때도 안 들었는데 코포풀다가 정신 .. 더보기