結果

問題 No.1435 Mmm......
ユーザー nok0nok0
提出日時 2021-03-20 09:46:41
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 2,117 ms
コンパイル使用メモリ 201,820 KB
実行使用メモリ 14,372 KB
最終ジャッジ日時 2023-08-13 01:57:02
合計ジャッジ時間 5,636 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,384 KB
testcase_06 AC 43 ms
4,436 KB
testcase_07 AC 53 ms
4,624 KB
testcase_08 AC 61 ms
4,872 KB
testcase_09 AC 57 ms
4,732 KB
testcase_10 AC 50 ms
4,560 KB
testcase_11 AC 49 ms
4,552 KB
testcase_12 AC 45 ms
4,428 KB
testcase_13 AC 44 ms
4,516 KB
testcase_14 AC 34 ms
4,384 KB
testcase_15 AC 63 ms
4,904 KB
testcase_16 AC 53 ms
4,612 KB
testcase_17 AC 38 ms
4,380 KB
testcase_18 AC 64 ms
4,912 KB
testcase_19 AC 47 ms
4,528 KB
testcase_20 AC 58 ms
4,800 KB
testcase_21 AC 140 ms
14,372 KB
testcase_22 AC 137 ms
11,660 KB
testcase_23 AC 99 ms
4,892 KB
testcase_24 AC 99 ms
4,908 KB
testcase_25 AC 99 ms
4,960 KB
testcase_26 AC 99 ms
5,008 KB
testcase_27 AC 99 ms
4,896 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: 警告: #import は廃止された GCC 拡張です [-Wdeprecated]
    1 | #import<bits/stdc++.h>
      |  ^~~~~~
main.cpp:3:25: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    3 | long R,n,i,l,r,a[1<<20];main(){for(std::cin>>n;std::cin>>a[i++];);for(std::multiset<int>s;l<n;z l++])),R+=r-l)for(;r<n;r++){s.insert(a[r]);if(*begin(s)+*++begin(s)<*--end(s)){z r]));break;}}std::cout<<R;}
      |                         ^~~~

ソースコード

diff #

#import<bits/stdc++.h>
#define z s.erase(s.find(a[
long R,n,i,l,r,a[1<<20];main(){for(std::cin>>n;std::cin>>a[i++];);for(std::multiset<int>s;l<n;z l++])),R+=r-l)for(;r<n;r++){s.insert(a[r]);if(*begin(s)+*++begin(s)<*--end(s)){z r]));break;}}std::cout<<R;}
0