#include <iostream>
#include <iomanip>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <unordered_map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define LL long long
#define MP(a, b) make_pair(a, b)
#define POWER9 1000000000
#define MOD POWER9+7
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483647
#define INT_MAX 2147483647
#define LL_MIN (LL)-9223372036854775807
#define LL_MAX (LL)9223372036854775807
#define PI 3.14159265359
int N;
vector<pair<int,int> > stars[3];
bool inc(int a, int b, int c, int t, int x){
return false;
}
int ans;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
cout << setprecision(9);
cin >> N;
for(int i=0; i<N; i++){
int X,Y,C;
cin >> X >> Y >> C;
stars[C].push_back(MP(X,Y));
}
ans = 0;
for(int i=0; i<stars[0].size(); i++){
for(int j=i+1; j<stars[0].size(); j++){
for(int k=0; k<stars[1].size(); k++){
for(int l=k+1; l<stars[1].size(); l++){
for(int m=0; m<stars[2].size(); m++){
for(int n=m+1; n<stars[2].size(); n++){
bool flg = false;
flg |= inc(i,k,m,0,j);
flg |= inc(i,k,m,1,l);
flg |= inc(i,k,m,2,n);
flg |= inc(j,l,n,0,i);
flg |= inc(j,l,n,1,k);
flg |= inc(j,l,n,2,m);
if(!flg) ans++;
}
}
}
}
}
}
cout << ans << endl;
return 0;
}
Compilation message
constellation2.cpp: In function 'int main()':
constellation2.cpp:51:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<stars[0].size(); i++){
~^~~~~~~~~~~~~~~~
constellation2.cpp:52:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=i+1; j<stars[0].size(); j++){
~^~~~~~~~~~~~~~~~
constellation2.cpp:53:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int k=0; k<stars[1].size(); k++){
~^~~~~~~~~~~~~~~~
constellation2.cpp:54:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int l=k+1; l<stars[1].size(); l++){
~^~~~~~~~~~~~~~~~
constellation2.cpp:55:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int m=0; m<stars[2].size(); m++){
~^~~~~~~~~~~~~~~~
constellation2.cpp:56:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int n=m+1; n<stars[2].size(); n++){
~^~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
384 KB |
Output is correct |
2 |
Correct |
2 ms |
384 KB |
Output is correct |
3 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
9071 ms |
384 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |