B. Checkout Assistant time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Bob came to a cash & carry store, put n items into his trolley, and went to the checkout counter to pay. Each item is d…
题目描述 Bob 来到一家现购自运商店,将 n 件商品放入了他的手推车,然后到收银台 付款.每件商品由它的价格 pi 和收银员扫描它的时间 ti 秒定义.当收银员正在扫 描某件商品时,Bob 可以从他的手推车中偷走某些其它商品.Bob 需要恰好 1 秒 来偷走一件商品.Bob 需要付给收银员的最少钱数是多少?请记住,收银员扫描 商品的顺序由 Bob 决定. 输入格式 输入第一行包含数 n(1≤n≤2000).接下来 n 行每行每件商品由 一对数 ti,ci(0≤ti≤2000,1≤ci≤10^9…
A. World Football Cup #include <bits/stdc++.h> using namespace std; ; char name[N][N]; map<string, int> mp; char s[N]; struct P { int id, point; int dif, goal; bool operator < (const P &rhs) const { if (point == rhs.point &&…
A. Puzzles Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/problemset/problem/337/A Description The end of the school year is near and Ms. Manana, the teacher, will soon have to say goodbye to a yet another class. She decided to p…
A. Straight «A» time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Noora is a student of one famous high school. It's her final year in school — she is going to study in university next year.…
A. Straight «A» 题面 Noora is a student of one famous high school. It's her final year in school - she is going to study in university next year. However, she has to get an «A» graduation certificate in order to apply to a prestigious one. In school, w…
Puzzles Time Limit: 1000ms Memory Limit: 262144KB This problem will be judged on CodeForces. Original ID: 337A64-bit integer IO format: %I64d Java class name: (Any) The end of the school year is near and Ms. Manana, the teacher, will soon have t…