# | Submission time^{} |
Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|

255768 | 2020-08-01T20:03:06 Z | dolphingarlic | Teams (IOI15_teams) | C++14 | 4000 ms | 34964 KB |

#include "teams.h" #include <bits/stdc++.h> #define FOR(i, x, y) for (int i = x; i < y; i++) using namespace std; multiset<pair<int, int>> students; void init(int N, int A[], int B[]) { FOR(i, 0, N) students.insert({B[i], A[i]}); } int can(int M, int K[]) { sort(K, K + M); vector<pair<int, int>> removed; FOR(i, 0, M) { vector<pair<int, int>> to_remove; for (pair<int, int> j : students) { if (K[i] <= j.first && K[i] >= j.second) to_remove.push_back(j); if (to_remove.size() == K[i]) break; } if (to_remove.size() != K[i]) { for (pair<int, int> j : removed) students.insert(j); return 0; } for (pair<int, int> j : to_remove) { students.erase(students.find(j)); removed.push_back(j); } } for (pair<int, int> j : removed) students.insert(j); return 1; }

### Compilation message

# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|

1 | Correct | 1 ms | 256 KB | Output is correct |

2 | Correct | 1 ms | 256 KB | Output is correct |

3 | Correct | 1 ms | 384 KB | Output is correct |

4 | Correct | 1 ms | 384 KB | Output is correct |

5 | Correct | 1 ms | 384 KB | Output is correct |

6 | Correct | 1 ms | 384 KB | Output is correct |

7 | Correct | 2 ms | 384 KB | Output is correct |

8 | Correct | 3 ms | 384 KB | Output is correct |

9 | Correct | 1 ms | 384 KB | Output is correct |

10 | Correct | 2 ms | 384 KB | Output is correct |

11 | Correct | 0 ms | 384 KB | Output is correct |

12 | Correct | 2 ms | 384 KB | Output is correct |

13 | Correct | 3 ms | 384 KB | Output is correct |

14 | Correct | 3 ms | 384 KB | Output is correct |

15 | Correct | 2 ms | 384 KB | Output is correct |

16 | Correct | 1 ms | 384 KB | Output is correct |

17 | Correct | 1 ms | 256 KB | Output is correct |

18 | Correct | 1 ms | 256 KB | Output is correct |

19 | Correct | 1 ms | 384 KB | Output is correct |

20 | Correct | 1 ms | 256 KB | Output is correct |

21 | Correct | 1 ms | 256 KB | Output is correct |

22 | Correct | 1 ms | 256 KB | Output is correct |

23 | Correct | 1 ms | 256 KB | Output is correct |

24 | Correct | 1 ms | 256 KB | Output is correct |

25 | Correct | 1 ms | 384 KB | Output is correct |

26 | Correct | 1 ms | 256 KB | Output is correct |

# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|

1 | Correct | 50 ms | 6904 KB | Output is correct |

2 | Correct | 43 ms | 6976 KB | Output is correct |

3 | Correct | 64 ms | 7544 KB | Output is correct |

4 | Correct | 49 ms | 7544 KB | Output is correct |

5 | Correct | 64 ms | 7796 KB | Output is correct |

6 | Correct | 146 ms | 7288 KB | Output is correct |

7 | Correct | 40 ms | 6648 KB | Output is correct |

8 | Correct | 42 ms | 6648 KB | Output is correct |

9 | Correct | 54 ms | 7800 KB | Output is correct |

10 | Correct | 44 ms | 7408 KB | Output is correct |

11 | Correct | 41 ms | 7544 KB | Output is correct |

12 | Correct | 45 ms | 7676 KB | Output is correct |

13 | Correct | 62 ms | 7992 KB | Output is correct |

14 | Correct | 37 ms | 7932 KB | Output is correct |

15 | Correct | 57 ms | 7160 KB | Output is correct |

16 | Correct | 42 ms | 6904 KB | Output is correct |

17 | Correct | 52 ms | 8344 KB | Output is correct |

18 | Correct | 64 ms | 8180 KB | Output is correct |

# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|

1 | Correct | 937 ms | 7744 KB | Output is correct |

2 | Correct | 1400 ms | 7904 KB | Output is correct |

3 | Execution timed out | 4021 ms | 8824 KB | Time limit exceeded |

4 | Halted | 0 ms | 0 KB | - |

# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|

1 | Execution timed out | 4054 ms | 34964 KB | Time limit exceeded |

2 | Halted | 0 ms | 0 KB | - |