Submission #54092555
Source Code Expand
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("sse4.2,abm,bmi,bmi2,popcnt,lzcnt,avx,avx2,fma")
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <set>
#include <stack>
#include <map>
#include <list>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <fstream>
#include <ios>
#include <signal.h>
#include <queue>
#include <ctime>
#include <bitset>
#include <unordered_map>
#include <random>
#include <unordered_set>
#include <functional>
//#include <windows.h>
//#include "Header.h"
//#define f first
//#define s second
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
ll GCD(ll a, ll b) {
if (b > a) {
swap(a, b);
}
if (a < 0 || b < 0) {
return a >= 0 ? a : b;
}
while (b != 0 && a != b) {
ll t = b;
b = a % b;
a = t;
}
return a;
}
pair<ll, ll> GCDEX(ll a, ll b) {
bool flag = true;
if (b > a) {
swap(a, b);
flag = false;
}
ll x1 = 1, y1 = 0, x2 = 0, y2 = 1, tx, ty;
while (b != 0 && a != b) {
tx = x1 - (a / b) * x2, ty = y1 - (a / b) * y2;
x1 = x2, y1 = y2, x2 = tx, y2 = ty;
ll t = b;
b = a % b;
a = t;
}
if (!flag) {
ll temp = x1;
x1 = y1;
y1 = temp;
}
return { x1, y1 };
}
ll bpow(ll n, ll a, const ll mod) { return n == 0 ? 1 : n & 1 ? a * (bpow(n - 1, a, mod) % mod) % mod : bpow(n >> 1, a * (a % mod) % mod, mod); }
const int SIZE = 1510;
string dfs(ll id, vector<string>& v, vector<ll>& mark) {
string temp;
if (mark[id]) {
cout << '#' << '\n';
exit(0);
}
mark[id] = 1;
for (ll i = 0; i < v[id].size(); ++i) {
if (v[id][i] == '*') {
temp = v[id].substr(0, i) + dfs(v[id][i + 1] - '1', v, mark);
if (i + 2 < v[id].size()) {
temp += v[id].substr(i + 2, v[id].size() - i - 2);
}
v[id] = temp;
if (v[id].size() > 1e6) {
cout << '#' << '\n';
exit(0);
}
}
}
mark[id] = 0;
return v[id];
}
int main(int argc, char* argv[]) {
//SetConsoleCP(1251);
//SetConsoleOutputCP(1251);
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
//string alf = "abcdefghijklmnopqrstuvwxyz";
//srand(time(0));
//const double PI = 3.1415926535897932;
//hash<string> hasher;
const double eps = 0.000000001;
const long long mod = 1e18 + 7;
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n, m, a;
cin >> n >> m;
vector<ll> v(m);
for (ll i = 0; i < m; ++i) {
cin >> v[i];
v[i] *= -1;
}
for (ll i = 0; i < n; ++i) {
for (ll j = 0; j < m; ++j) {
cin >> a;
v[j] += a;
}
}
if (*min_element(v.begin(), v.end()) >= 0) {
cout << "Yes" << '\n';
}
else {
cout << "No" << '\n';
}
return 0;
}
/*
2 3
10 20 30
20 0 10
0 100 100
2 4
10 20 30 40
20 0 10 30
0 100 100 0
*/
/*//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("sse4.2,abm,bmi,bmi2,popcnt,lzcnt,avx,avx2,fma")
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <set>
#include <stack>
#include <map>
#include <list>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <fstream>
#include <ios>
#include <signal.h>
#include <queue>
#include <ctime>
#include <windows.h>
//#include "Header.h"
//#define f first
//#define s second
using namespace std;
int main(int argc, char* argv[]) {
//SetConsoleCP(1251);
//SetConsoleOutputCP(1251);
//freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
//string alf = "abcdefghijklmnopqrstuvwxyz";
//string alf = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long cnt = 0;
for (long long i = 1; cnt + i <= 1e9; ) {
cnt += i;
i *= 2;
}
//cout << cnt << '\n';
long long t = 1;
cout << t << '\n';
srand(time(0));
while (t--) {
cout << 100000 << '\n';
for (long long i = 0; i < 1e5; ++i) {
cout << 1000000 << ' ';
}
cout << '\n' << 100000 << '\n';
for (long long i = 0; i < 1e5; ++i) {
cout << 1 << ' ' << 1 << ' ' << 100000;
}
}
return 0;
}
ll t, n, m, q, a, b, c, d, x, mx, mn, k, cnt, l, r, ans, temp, id;
string s, s1, s2;
bool flag = true;
cin >> t;
while (t--) {
}*/
Submission Info
Submission Time |
|
Task |
B - Nutrients |
User |
Darius17 |
Language |
C++ 20 (gcc 12.2) |
Score |
150 |
Code Size |
5001 Byte |
Status |
AC |
Exec Time |
1 ms |
Memory |
3636 KB |
Compile Error
Main.cpp: In function ‘std::string dfs(ll, std::vector<std::__cxx11::basic_string<char> >&, std::vector<long long int>&)’:
Main.cpp:84:22: warning: comparison of integer expressions of different signedness: ‘ll’ {aka ‘long long int’} and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
84 | for (ll i = 0; i < v[id].size(); ++i) {
| ~~^~~~~~~~~~~~~~
Main.cpp:87:23: warning: comparison of integer expressions of different signedness: ‘ll’ {aka ‘long long int’} and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
87 | if (i + 2 < v[id].size()) {
| ~~~~~~^~~~~~~~~~~~~~
Main.cpp: In function ‘int main(int, char**)’:
Main.cpp:110:18: warning: unused variable ‘eps’ [-Wunused-variable]
110 | const double eps = 0.000000001;
| ^~~
Main.cpp:111:21: warning: unused variable ‘mod’ [-Wunused-variable]
111 | const long long mod = 1e18 + 7;
| ^~~
Main.cpp:101:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
101 | int main(int argc, char* argv[]) {
| ~~~~^~~~
Main.cpp:101:26: warning: unused parameter ‘argv’ [-Wunused-parameter]
101 | int main(int argc, char* argv[]) {
| ~~~~~~^~~~~~
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
150 / 150 |
Status |
|
|
Set Name |
Test Cases |
Sample |
sample_01.txt, sample_02.txt |
All |
hand.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, sample_01.txt, sample_02.txt |
Case Name |
Status |
Exec Time |
Memory |
hand.txt |
AC |
1 ms |
3624 KB |
random_01.txt |
AC |
1 ms |
3452 KB |
random_02.txt |
AC |
1 ms |
3432 KB |
random_03.txt |
AC |
1 ms |
3512 KB |
random_04.txt |
AC |
1 ms |
3484 KB |
random_05.txt |
AC |
1 ms |
3560 KB |
random_06.txt |
AC |
1 ms |
3560 KB |
random_07.txt |
AC |
1 ms |
3444 KB |
random_08.txt |
AC |
1 ms |
3632 KB |
random_09.txt |
AC |
1 ms |
3560 KB |
random_10.txt |
AC |
1 ms |
3364 KB |
random_11.txt |
AC |
1 ms |
3560 KB |
random_12.txt |
AC |
1 ms |
3512 KB |
random_13.txt |
AC |
1 ms |
3316 KB |
random_14.txt |
AC |
1 ms |
3416 KB |
random_15.txt |
AC |
1 ms |
3560 KB |
random_16.txt |
AC |
1 ms |
3492 KB |
random_17.txt |
AC |
1 ms |
3396 KB |
random_18.txt |
AC |
1 ms |
3456 KB |
random_19.txt |
AC |
1 ms |
3400 KB |
random_20.txt |
AC |
1 ms |
3564 KB |
random_21.txt |
AC |
1 ms |
3636 KB |
random_22.txt |
AC |
1 ms |
3516 KB |
sample_01.txt |
AC |
1 ms |
3352 KB |
sample_02.txt |
AC |
1 ms |
3632 KB |