hihoCoder太阁最新面经算法竞赛1 register

Ended

Participants:151

Verdict:Time Limit Exceeded
Score:80 / 100
Submitted:2016-05-21 23:17:46

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <deque>
#define MIN(x,y) x<y?x:y
#define MAX(x,y) x>y?x:y
using namespace std;
struct shares
{
    int time;
    int price;
};
int main()
{
    deque<struct shares> q;
    struct shares temp;
    int n;
    int t;
    char ch;
    int min,max;
    deque<struct shares>::const_iterator iter;
    cin >> n;
    for(int i=0;i<n;i++)
    {
        cin >> ch;
        if(ch == 'P')
        {
            cin >> temp.time >> temp.price;
            q.push_back(temp);
        }
        else if(ch == 'R')
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX