#include<bits/stdc++.h>
#define int long long
using namespace std;

int get() {
	int x = 0, f = 1; char c = getchar();
	while(!isdigit(c)) { if(c == '-') f = -1; c = getchar(); }
	while(isdigit(c)) { x = x * 10 + c - '0'; c = getchar(); }
	return x * f;
}

const int N = 2e5 + 5;
int n, m, q, a[N], b[N], ans, len, bin[N], tot;
struct Ask {
	int T, x, y;
} s[N];

struct BIT {
	int sum[N], sum0;
	int lowbit(int x) { return x & (-x); }
	void add(int x, int v) { while(x <= tot) sum[x] += v, x += lowbit(x); }
	int ask(int x) { int r(0); while(x) r += sum[x], x -= lowbit(x); return r + sum0; }
	int ask(int l, int r) { if(l > r) return 0; return ask(r) - ask(l - 1); }
} A1, B1, AS, BS;

void add1(int x) {
	ans += BS.ask(a[x] + 1, tot) + bin[a[x]] * B1.ask(1, a[x]);
	A1.add(a[x], 1), AS.add(a[x], bin[a[x]]);
}

void del1(int x) {
	ans -= BS.ask(a[x] + 1, tot) + bin[a[x]] * B1.ask(1, a[x]);
	A1.add(a[x], -1), AS.add(a[x], -bin[a[x]]);
}

void add2(int x) {
	ans += AS.ask(b[x], tot) + bin[b[x]] * A1.ask(1, b[x] - 1);
	B1.add(b[x], 1), BS.add(b[x], bin[b[x]]);
}

void del2(int x) {
	ans -= AS.ask(b[x], tot) + bin[b[x]] * A1.ask(1, b[x] - 1);
	B1.add(b[x], -1), BS.add(b[x], -bin[b[x]]);
}

signed main() {
	n = get(), m = get(), q = get();
	for(int i = 1; i <= q; i++) s[i].T = get(), s[i].x = get(), s[i].y = get(), bin[i] = s[i].y;
	bin[q + 1] = 0;
	sort(bin + 1, bin + 1 + q + 1), tot = unique(bin + 1, bin + 1 + q + 1) - bin - 1;
	for(int i = 1; i <= q; i++) s[i].y = lower_bound(bin + 1, bin + 1 + tot, s[i].y) - bin;
	for(int i = 1; i <= n; i++) a[i] = 1;
	for(int i = 1; i <= m; i++) b[i] = 1;
	A1.add(1, n), B1.add(1, m);
	for(int i = 1; i <= q; i++) {
		int T = s[i].T, x = s[i].x, y = s[i].y;
		if(T == 1) del1(x), a[x] = y, add1(x);
		else del2(x), b[x] = y, add2(x);
		printf("%lld\n", ans);
	}
	return 0;
}

#include <bits/stdc++.h>
//#include<boost/multiprecision/cpp_int.hpp>
//#include <atcoder/all>
#define rep(i, a) for (int i = (int)0; i < (int)a; ++i)
#define rrep(i, a) for (int i = (int)a - 1; i >= 0; --i)
#define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define RREP(i, a, b) for (int i = (int)a - 1; i >= b; --i)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define popcount __builtin_popcount
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;

// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")

//using lll=boost::multiprecision::cpp_int;
template <class T>
inline bool chmin(T &a, T b)
{
	if (a > b)
	{
		a = b;
		return true;
	}
	return false;
}
template <class T>
inline bool chmax(T &a, T b)
{
	if (a < b)
	{
		a = b;
		return true;
	}
	return false;
}

template <typename T>
T mypow(T x, T n, const T &p = -1)
{ //x^nをmodで割った余り
	T ret = 1;
	while (n > 0)
	{
		if (n & 1)
		{
			if (p != -1)
				ret = (ret * x) % p;
			else
				ret *= x;
		}
		if (p != -1)
			x = (x * x) % p;
		else
			x *= x;
		n >>= 1;
	}
	return ret;
}

using namespace std;
// using namespace atcoder;

template<int mod>
struct Modint{
    int x;
    Modint():x(0){}
    Modint(int64_t y):x((y%mod+mod)%mod){}

    Modint &operator+=(const Modint &p){
			if((x+=p.x)>=mod)
				x -= mod;
			return *this;
		}

		Modint &operator-=(const Modint &p){
			if((x+=mod-p.x)>=mod)
				x -= mod;
			return *this;
		}

		Modint &operator*=(const Modint &p){
			x = (1LL * x * p.x) % mod;
			return *this;
		}

		Modint &operator/=(const Modint &p){
			*this *= p.inverse();
			return *this;
		}

		Modint operator-() const { return Modint(-x); }
		Modint operator+(const Modint &p) const{
			return Modint(*this) += p;
		}
		Modint operator-(const Modint &p) const{
			return Modint(*this) -= p;
		}
		Modint operator*(const Modint &p) const{
			return Modint(*this) *= p;
		}
		Modint operator/(const Modint &p) const{
			return Modint(*this) /= p;
		}

		bool operator==(const Modint &p) const { return x == p.x; }
		bool operator!=(const Modint &p) const{return x != p.x;}

		Modint inverse() const{//非再帰拡張ユークリッド
			int a = x, b = mod, u = 1, v = 0;
			while(b>0){
				int t = a / b;
				swap(a -= t * b, b);
				swap(u -= t * v, v);
			}
			return Modint(u);
		}

		Modint pow(int64_t n) const{//繰り返し二乗法
			Modint ret(1), mul(x);
			while(n>0){
				if(n&1)
					ret *= mul;
				mul *= mul;
				n >>= 1;
			}
			return ret;
		}

		friend ostream &operator<<(ostream &os,const Modint &p){
			return os << p.x;
		}
};

using modint = Modint<mod>;

void solve()
{
	double a,b;
	cin>>a>>b;
	double x=a-b;
	double ans=x/a*100;
	cout<<ans;
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout << fixed << setprecision(15);
	solve();
	return 0;
}
