제출 #101889

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
1018892019-03-20 18:39:57KCSCBoat (APIO16_boat)C++14
100 / 100
671 ms3456 KiB
#include <bits/stdc++.h>
using namespace std;
const int DIM = 505;
const int MOD = 1000000007;
vector<int> lst;
pair<int, int> seg[DIM];
int dp[DIM], dp2[DIM][DIM];
int fct[DIM], inv[DIM], cmb[DIM * 2][DIM];
int logPow(int x, int n) {
if (!n) { return 1; }
int y = logPow(x, n >> 1);
if (n | 1) { y = 1LL * y * y % MOD; }
if (n & 1) { y = 1LL * y * x % MOD; }
return y; }
int main(void) {
#ifdef HOME
freopen("boat.in", "r", stdin);
freopen("boat.out", "w", stdout);
#endif
int n; cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> seg[i].first >> seg[i].second;
lst.push_back(seg[i].first); lst.push_back(++seg[i].second); }
sort(lst.begin(), lst.end());
lst.resize(unique(lst.begin(), lst.end()) - lst.begin());
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

boat.cpp: In function 'int main()':
boat.cpp:35:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i < lst.size(); ++i) {
                  ~~^~~~~~~~~~~~
boat.cpp:44:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i < lst.size(); ++i) {
                  ~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...