Submission #133396

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1333962019-07-20 14:02:00tlwpdusFriends (BOI17_friends)C++11
20 / 100
3 ms1244 KiB
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
int n, p, q;
vector<int> lis[3000];
int mat[3000][3000];
void pung() {
puts("detention");
exit(0);
}
int gn;
vector<int> grp[3000];
int chk[3000], inc[3000];
vector<int> sel, cand;
void print() {
printf("sel : ");
for (int &v : sel) printf("%d ",v); printf("\n");
printf("cand : ");
for (int &v : cand) printf("%d ",v); printf("\n\n");
}
bool bt(int nq, int dep) {
//printf("%d, %d\n",sel.size(),nq);
//print();
if (sel.size()<=p&&nq<=q) return true;
if (dep>=p+q||cand.empty()) return false;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

friends.cpp: In function 'void print()':
friends.cpp:22:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for (int &v : sel) printf("%d ",v); printf("\n");
     ^~~
friends.cpp:22:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
     for (int &v : sel) printf("%d ",v); printf("\n");
                                         ^~~~~~
friends.cpp:24:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for (int &v : cand) printf("%d ",v); printf("\n\n");
     ^~~
friends.cpp:24:42: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
     for (int &v : cand) printf("%d ",v); printf("\n\n");
                                          ^~~~~~
friends.cpp: In function 'bool bt(int, int)':
friends.cpp:29:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (sel.size()<=p&&nq<=q) return true;
         ~~~~~~~~~~^~~
friends.cpp: In function 'void solve(int, int)':
friends.cpp:73:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i=0;i<grp[t].size();i++) {
                  ~^~~~~~~~~~~~~~
friends.cpp: In function 'int main()':
friends.cpp:130:35: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
         printf("%d ",grp[i].size());
                      ~~~~~~~~~~~~~^
friends.cpp:131:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
         for (int &v : grp[i]) printf("%d ",v); printf("\n");
         ^~~
friends.cpp:131:48: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
         for (int &v : grp[i]) printf("%d ",v); printf("\n");
                                                ^~~~~~
friends.cpp:84:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d%d",&n,&p,&q);
     ~~~~~^~~~~~~~~~~~~~~~~~~
friends.cpp:87:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&mi);
         ~~~~~^~~~~~~~~~
friends.cpp:91:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
             scanf("%d",&a);
             ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...