mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-23 19:08:47 +00:00
parent
156d860a8a
commit
7477da6e72
31
S2OJ/1448/1448.cpp
Normal file
31
S2OJ/1448/1448.cpp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
|
using std::cin;
|
||||||
|
using std::cout;
|
||||||
|
const char endl = '\n';
|
||||||
|
|
||||||
|
int n, m;
|
||||||
|
std::set<int> set;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
cin >> n >> m;
|
||||||
|
|
||||||
|
set.insert(0);
|
||||||
|
set.insert(n);
|
||||||
|
|
||||||
|
while (m--) {
|
||||||
|
int k;
|
||||||
|
|
||||||
|
cin >> k;
|
||||||
|
|
||||||
|
set.insert(k);
|
||||||
|
|
||||||
|
int prev = *--set.lower_bound(k),
|
||||||
|
next = *set.upper_bound(k);
|
||||||
|
|
||||||
|
cout << (k - prev) * (next - k) << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
BIN
S2OJ/1448/data/problem.conf
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/problem.conf
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower1.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower1.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower1.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower1.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower10.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower10.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower10.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower10.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower11.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower11.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower11.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower11.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower12.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower12.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower12.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower12.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower13.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower13.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower13.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower13.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower14.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower14.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower14.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower14.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower15.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower15.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower15.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower15.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower16.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower16.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower16.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower16.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower17.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower17.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower17.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower17.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower18.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower18.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower18.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower18.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower19.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower19.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower19.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower19.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower2.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower2.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower2.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower2.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower20.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower20.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower20.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower20.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower3.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower3.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower3.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower3.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower4.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower4.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower4.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower4.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower5.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower5.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower5.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower5.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower6.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower6.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower6.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower6.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower7.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower7.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower7.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower7.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower8.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower8.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower8.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower8.out
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower9.in
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower9.in
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
S2OJ/1448/data/sunflower9.out
(Stored with Git LFS)
Normal file
BIN
S2OJ/1448/data/sunflower9.out
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user