Submission #202917

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2029172020-02-18 16:37:55renebaebaeGenetics (BOI18_genetics)C++14
100 / 100
273 ms17272 KiB
#include<bits/stdc++.h>
#define ll long long
#define pb emplace_back
#define fi first
#define se second
#define mp make_pair
//#define int int64_t
using namespace std;
typedef pair<ll, ll> pii;
const int N = (int)4111;
ll p[N], k, sum[N][5], cur = 0, ss, ssum[N];
int n, m;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
char s[N][N];
int Code(char c) {
if(c == 'A') return 1;
if(c == 'C') return 2;
if(c == 'T') return 3;
return 0;
}
int main() {
// ios_base::sync_with_stdio(0);
// cin.tie(0); cout.tie(0);
#define FileName "test"
if(fopen(FileName".inp", "r")) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

genetics.cpp: In function 'int main()':
genetics.cpp:34:31: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long long int*' [-Wformat=]
     scanf("%d%d%d", &n, &m, &k);
                             ~~^
genetics.cpp:43:54: warning: array subscript has type 'char' [-Wchar-subscripts]
             for(int j = 0; j < m; ++j) sum[j][s[i][j]] += p[i];
                                                      ^
genetics.cpp:52:71: warning: array subscript has type 'char' [-Wchar-subscripts]
             for(int j = 0; j < m; ++j) ss += (ssum[j] - sum[j][s[i][j]]);
                                                                       ^
genetics.cpp:31:15: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
        freopen(FileName".inp", "r", stdin);
        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
genetics.cpp:32:15: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
        freopen(FileName".out", "w", stdout);
        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
genetics.cpp:34:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d%d", &n, &m, &k);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~
genetics.cpp:36:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%s", s[i]);
         ~~~~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...