/******************************************************* * Copyright (C) 2015 Haotian Wu * * This file is the solution to the question: * https://www.hackerrank.com/challenges/clique * * Redistribution and use in source and binary forms are permitted. *******************************************************/ #include #include #include #include #include #include #include #include #include #include using namespace std; // See https://en.wikipedia.org/wiki/Tur%C3%A1n%27s_theorem // I don't like this problem. int main() { int tt; scanf("%d",&tt); while(tt--) { int n,m; scanf("%d %d",&n,&m); int be = 2, ed = 10000; while (be <= ed) { int r = (be + ed)/2; int arr[r]; for (int j=0;j