<PREV Problem:
NEXT>
Solved by 46 users: vi002, marek.cygan, dan, LoLitter, Moonlight, zmy, Rizvanov, JohnJones_001, lutyj, littleboy, WsemirZ, davidsun, Cheryl, Chmeli_BSU, tourist, pmnox, shangjingbo, zloy_mipt, KZ, turbovenik, stas_flash, trickster, XP31, mazahaka, outlaw, MIKseR, defrager, RAVEman, Ravent, murphy, TTLovePP, Dest, EAA2008, ripatti, FMSnew, Kuznetsov_S, Irkhin, vitar, LiuChenheng, abortmozga.ru, Azizkhan, Madiyar_Tktl, NIGHTFIT, dragonic, adamant, Bekzhan.Kassenov.
UserDateAttemptTimeCMSC
Rizvanov23 jan 2008C++705.96878 
adamant06 mar 2015C++5301.97937 
RAVEman27 feb 2009C++2205.35994 
Ravent12 apr 2009C++504.071058 
stas_flash11 dec 2008C++703.931092 
Chmeli_BSU27 jul 2008C++903.941092 
turbovenik11 dec 2008C++703.961092 
trickster12 dec 2008C++203.971092 
abortmozga.ru23 nov 2011C++503.391125 
NIGHTFIT09 apr 2012C++1003.311160 
Languages
C++
38
FPC
8
Kylix
2
C
1
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Range Query

Time limit = 6 second(s)

Memory limit = 60 Mb

Your program should execute queries on setting and unsetting points on the plane.

All coordinates are integer numbers from [-2'000'000'000, 2'000'000'000];

Input No more than 100000 commands.

Output Commands' outputs. Number of lines in output should be equal to number of lines in input.

Input#1
ADD 1 1
ADD 1 2
ADD 1 3
ADD 2 1
ADD 2 2
ADD 2 3
ADD 3 1
ADD 3 2
ADD 3 3
ADD 2 2
COUNT 1 1 3 3
COUNT 1 1 2 2
COUNT 1 1 1 1
DELETE 2 2
COUNT 1 1 3 3
COUNT 1 1 2 2
COUNT 1 1 1 1
DELETE 2 2
COUNT 2 2 2 2

Output#1
ADDED
ADDED
ADDED
ADDED
ADDED
ADDED
ADDED
ADDED
ADDED
ALREADY EXISTS
9
4
1
DELETED
8
3
1
NOT FOUND
0

Author:
Andrey Lokot'
10 March 2007

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 200ms

SW soft NIX
ID = 100.26.179.196