Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
See pages that link to and include this page.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.
Discuta o problema
Com que complexidade vocês fizeram esse?
eu passei con O(N^2) no TJU, no PKU tenho WA, mas es por a saida.
Passei com $O(n^2)$
fiz em $$O(n^2)$$ tambem
$O(n^2)$
Só tomo WA, mas no TJU eu consegui AC.
Como é que você estão escrevendo a saída? A área é sempre um inteiro ou um inteiro mais 0.5 (pq os vértices são inteiros), no primeiro caso eu imprimo um inteiro e no segundo um float com precisão de uma casa decimal (%0.1f).
Eu calculei 2x a área e imprimio a parte inteira desse número sobre 2. Depois imprimo um ".5" se for ímpar.
Você ta usando long long? (os limites podem estourar um int)
Era esse mesmo o problema, mudei pra long long e passou. Nem tinha reparado nisso, valeu!