제출 #299136

#제출 시각아이디문제언어결과실행 시간메모리
299136theshadow_04평균 (COCI14_prosjek)C++14
50 / 50
1 ms512 KiB
// VU TRUONG AN #include <bits/stdc++.h> #define F first #define S second #define MOD 1000000007 #define pb push_back #define bit(x,p) ((x>>p) & 1) #define ll long long #define Task "Prosjek" using namespace std; const int base = 100003; const int maxn = 100005; int n; long long b[maxn]; int main(){ ios_base::sync_with_stdio(0); cout.tie(0); cin.tie(0); if(fopen(Task".inp","r")){ freopen(Task".inp","r",stdin); freopen(Task".out","w",stdout); } cin >> n; for(int i = 1;i <= n;++i) cin >> b[i]; for(int i = 1;i <= n;++i){ long long a = 1ll * b[i] * i - 1ll * b[i - 1] * (i - 1); cout << a << " "; } }

컴파일 시 표준 에러 (stderr) 메시지

prosjek.cpp: In function 'int main()':
prosjek.cpp:22:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   22 |   freopen(Task".inp","r",stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
prosjek.cpp:23:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   23 |   freopen(Task".out","w",stdout);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...