摘要:
题目:Chat Servers Outgoing Traffic思路:水,map模拟#include #include #include #include #include #include #include using namespace std;mapm;int main(){ m.clear(); char s[110]; string str; int ans=0; while(gets(s)) { str=""; int l=strlen(s); if(s[0]=='+') { ... 阅读全文
摘要:
题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=16思路:最长上升子序列#include #include #include #include #include using namespace std;struct node{ int x,y;}p[1010];int dp[1010];bool cmp(node a,node b){ if(a.x==b.x) return a.yp[i].y) swap(p[i].x,p[i].y); dp[i]=1; } sor... 阅读全文