Submission #146403


Source Code Expand

#include <iostream>
#include "stdio.h"

using namespace std;

int main (int argc, char** argv){

  float xa, xb, xc;
  float ya, yb, yc;

  scanf("%f%f%f%f%f%f",&xa,&ya,&xb,&yb,&xc,&yc);

  float a = xb - xa;
  float b = yb - ya;
  float c = xc - xa;
  float d = yc - ya;

  float seq = a * d - b * c;

  if ( seq < 0 ){
    seq = 0 - seq;
  }

  cout << (seq / 2) << endl;

  return 0;
}

Submission Info

Submission Time
Task A - 正直者
User masa57cs
Language C++ (G++ 4.6.4)
Score 0
Code Size 414 Byte
Status WA
Exec Time 114 ms
Memory 1552 KB

Compile Error

./Main.cpp: In function ‘int main(int, char**)’:
./Main.cpp:11:48: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]

Judge Result

Set Name all
Score / Max Score 0 / 100
Status
WA × 27
Set Name Test Cases
all 00_sample_01.txt, 00_sample_02.txt, kensho_diff01, kensho_diff02, kensho_diff03, kensho_diff04, kensho_diff05, kensho_min-max01, kensho_min-max02, kensho_min-max03, kensho_min-max04, kensho_min-max05, kensho_min-max06, kensho_min-max07, kensho_min-max08, kensho_min-max09, kensho_min-max10, kensho_rand01, kensho_rand02, kensho_rand03, kensho_rand04, kensho_rand05, kensho_rand06, kensho_rand07, kensho_rand08, kensho_rand09, kensho_rand10
Case Name Status Exec Time Memory
00_sample_01.txt WA 114 ms 1536 KB
00_sample_02.txt WA 38 ms 1544 KB
kensho_diff01 WA 37 ms 1540 KB
kensho_diff02 WA 36 ms 1548 KB
kensho_diff03 WA 37 ms 1548 KB
kensho_diff04 WA 37 ms 1536 KB
kensho_diff05 WA 37 ms 1544 KB
kensho_min-max01 WA 38 ms 1540 KB
kensho_min-max02 WA 38 ms 1548 KB
kensho_min-max03 WA 37 ms 1540 KB
kensho_min-max04 WA 35 ms 1540 KB
kensho_min-max05 WA 37 ms 1540 KB
kensho_min-max06 WA 39 ms 1536 KB
kensho_min-max07 WA 38 ms 1536 KB
kensho_min-max08 WA 38 ms 1532 KB
kensho_min-max09 WA 36 ms 1544 KB
kensho_min-max10 WA 36 ms 1504 KB
kensho_rand01 WA 36 ms 1544 KB
kensho_rand02 WA 37 ms 1552 KB
kensho_rand03 WA 36 ms 1548 KB
kensho_rand04 WA 37 ms 1548 KB
kensho_rand05 WA 36 ms 1540 KB
kensho_rand06 WA 33 ms 1552 KB
kensho_rand07 WA 36 ms 1544 KB
kensho_rand08 WA 34 ms 1544 KB
kensho_rand09 WA 33 ms 1544 KB
kensho_rand10 WA 37 ms 1536 KB