January 2022 enrollments are closed and the course commences on 8th of January, 2022. For future cohorts Join the waitlist


#include <cstdio>

int main(int argc, char *argv[]) {
	int t;
	scanf("%d", &t);
	while(t--) {
		int x1, y1, x2, y2;
		int x3, y3;
		scanf("%d%d%d%d", &x1, &y1, &x2, &y2);

		x3 = x1 + 2 * (x2 - x1);
		y3 = y1 + 2 * (y2 - y1);

		printf("%d %d\n", x3, y3);
	return 0;

470+ Competitive Programming Solutions

If you like what you read subscribe to my newsletter.

I write essays on various engineering topics and share it through my weekly newsletter 👇