intさわだんのBlack History

刹那的レジェンドになりたい。

AtCoder Beginner Contest

問題文
http://abc002.contest.atcoder.jp/tasks/abc002_3

解法やるだけ。

#include <cstdio>
#include <iostream>
#include <algorithm>

using namespace std;

int main(){
	
	int xa,ya,xb,yb,xc,yc;
	int ans;
	
	scanf("%d%d%d%d%d%d",&xa,&ya,&xb,&yb,&xc,&yc);
	
	int a = xb - xa;
	int b = yb - ya;
	int c = xc - xa;
	int d = yc - ya;
	
	ans = abs(a*d - b*c) / 2;
	
	cout << ans ;
	
	if( abs(a*d - b*c) % 2 == 1){
	cout << ".5";
	}
	cout << endl;
	return 0;
	}

問題文
http://abc001.contest.atcoder.jp/tasks/abc001_3

1.#include <cstdio>
2. 
3.using namespace std;
4. 
5.int main(){	
6.	
7.	int m;
8.	int vv = 0;
9.	
10.	scanf("%d",&m);
11.	
12.	if(m < 100){
13.	vv = 0;
14.	}else if(m >= 100 && m <= 5000){
15.	vv = m / 100;
16.	}else if(m >= 6000 && m <= 30000){
17.	vv = m / 1000 + 50;
18.	}else if(m >= 35000 && m <= 70000){
19.	vv = (m / 1000 - 30) / 5 + 80;
20.	}else{
21.	vv = 89;
22.	}
23.	
24.	if(vv <= 9){
25.	printf("0%d\n",vv);
26.	}else{
27.	printf("%d\n",vv);
28.	}
29.	
30.	return 0;
31.	
32.}