728x90

UVa 4

[C++] UVa 10718 : Bit Mask

https://onlinejudge.org/index.php?option=onlinejudge&Itemid=8&page=show_problem&problem=1659 Online Judge Our Patreons Diamond Sponsors Steven & Felix Halim Reinardus Pradhitya Gold Sponsors --- YOUR NAME HERE ---- Silver Sponsors --- YOUR NAME HERE ---- Bronze Sponsors Christianto Handojo Krzysztof Adamek Fatima Broom Amal Augustine Contribute Bitcoin onlinejudge.org N | M 의 계산 값이 최대가 되는 L과 U 사..

[UVa 10382 ] Watering Grass

https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=113&page=show_problem&problem=1323 Online Judge Our Patreons Diamond Sponsors Steven & Felix Halim Reinardus Pradhitya Gold Sponsors --- YOUR NAME HERE ---- Silver Sponsors --- YOUR NAME HERE ---- Bronze Sponsors Christianto Handojo Krzysztof Adamek Fatima Broom Amal Augustine Contribute Bitcoin onlinejudge.org # problem ..

[C++] UVa-11572 Unique Snowflake

구현 코드 ) #include #include #include using namespace std; #define maxn (int)(le9)+1 int t, n, x, ans, cnt, block; map lastseen; int main() { cin >> t; // 테스트 케이스 개수 입력 while (t--) { cin >> n; // 정수 리스트의 길이 입력 lastseen.clear(); //테스트 케이스가 1개 이상 입력 될 경우 map을 초기화 하여 입력을 받아온다. ans = 0, cnt = 0, block = 0; for (int i = 1; i > x; int lx = lastseen[x]; if (lx != 0) { block = max(block, lx); cnt = i - blo..

728x90