传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4759 [题解] 排序,从大到小插入,树状数组统计. # include <vector> # include <stdio.h> # include <string.h> # include <iostream> # include <algorithm> // # include <bits/stdc++.h> using n…
4758: [Usaco2017 Jan]Subsequence Reversal Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 76 Solved: 52[Submit][Status][Discuss] Description Farmer John is arranging his NN cows in a line to take a photo (1≤N≤50). The height of the iith co w in sequ…
1636: [Usaco2007 Jan]Balanced Lineup Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 476 Solved: 345[Submit][Status] Description For the daily milking, Farmer John's N cows (1 <= N <= 50,000) always line up in the same order. One day Farmer John deci…
RMQ.. ------------------------------------------------------------------------------- #include<cstdio> #include<cstring> #include<algorithm> #include<iostream> #define rep( i , n ) for( int i = 0 ; i < n ; ++i ) #define clr( x…
1636: [Usaco2007 Jan]Balanced Lineup Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 772 Solved: 560线段树裸题... Description For the daily milking, Farmer John's N cows (1 <= N <= 50,000) always line up in the same order. One day Farmer John decides to o…
4760: [Usaco2017 Jan]Hoof, Paper, Scissors Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 136 Solved: 100[Submit][Status][Discuss] Description You have probably heard of the game "Rock, Paper, Scissors". The cows like to play a similar game th…
4756: [Usaco2017 Jan]Promotion Counting Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 305 Solved: 217[Submit][Status][Discuss] Description The cows have once again tried to form a startup company, failing to remember from past experience t hat cow…