Submission #433937

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4339372021-06-20 12:27:59ismoilovVirus Experiment (JOI19_virus)C++14
0 / 100
2 ms512 KiB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define all(x) (x).begin(), (x).end()
#define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
#define fpp(a,i,c) for(int (a) = (i); (a) <= (c); (a)++)
#define fm(a,i,c) for(int (a) = (i); (a) > (c); (a)--)
#define fmm(a,i,c) for(int (a) = (i); (a) >= (c); (a)--)
void S()
{
int m, r, c;
string d;
cin >> m >> r >> c >> d;
vector <int> ans;
int maxe = 0, maxw = 0;
if(d.find('W') == -1)
maxe = m, maxw = 0;
else{
int s = 0;
fp(i,0,m){
int j = i, s = 0;
while(d[(j%m)] == 'E')
j ++, s ++;
maxe = max(maxe, s);
}
}
if(d.find('E') == -1)
maxe = 0, maxw = m;
else{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

virus.cpp: In function 'void S()':
virus.cpp:17:17: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   17 |  if(d.find('W') == -1)
      |     ~~~~~~~~~~~~^~~~~
virus.cpp:6:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    6 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
virus.cpp:21:3: note: in expansion of macro 'fp'
   21 |   fp(i,0,m){
      |   ^~
virus.cpp:20:7: warning: unused variable 's' [-Wunused-variable]
   20 |   int s = 0;
      |       ^
virus.cpp:28:17: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   28 |  if(d.find('E') == -1)
      |     ~~~~~~~~~~~~^~~~~
virus.cpp:6:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    6 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
virus.cpp:32:3: note: in expansion of macro 'fp'
   32 |   fp(i,0,m){
      |   ^~
virus.cpp:31:7: warning: unused variable 's' [-Wunused-variable]
   31 |   int s = 0;
      |       ^
virus.cpp:6:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    6 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
virus.cpp:40:2: note: in expansion of macro 'fp'
   40 |  fp(i,0,r)
      |  ^~
virus.cpp:6:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
    6 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
virus.cpp:41:3: note: in expansion of macro 'fp'
   41 |   fp(j,0,c)
      |   ^~
virus.cpp:6:27: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
    6 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
virus.cpp:43:2: note: in expansion of macro 'fp'
   43 |  fp(i,0,r){
      |  ^~
virus.cpp:6:27: warning: unnecessary parentheses in declaration of 'j' [-Wparentheses]
    6 | #define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
      |                           ^
virus.cpp:44:3: note: in expansion of macro 'fp'
   44 |   fp(j,0,c){
      |   ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...