답안 #334074

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
334074 2020-12-08T09:30:35 Z beksultan04 Money (IZhO17_money) C++14
0 / 100
1 ms 492 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int,int>
#define OK puts("OK");
#define fr first
#define sc second
#define ret return
#define scan1(a) scanf("%lld",&a);
#define scan2(a,b) scanf("%lld %lld",&a, &b);
#define scan3(a,b,c) scanf("%lld %lld %lld",&a,&b,&c);
#define all(s) s.begin(),s.end()
#define pb push_back
#define endi puts("");
const int N = 1e6+12,INF=1e9+7;
int q[N],v[2501][2501],p[2501][2501],gor[N],ver[N];

main(){
    int n,j,i,ans=0;
    scan1(n)
    for (i=1;i<=n;++i)scan1(q[i])

    for (i=1;i<=n;++i)
        if (q[i] > q[i+1])ans++;

    cout <<ans;
}

Compilation message

money.cpp:18:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   18 | main(){
      |      ^
money.cpp: In function 'int main()':
money.cpp:19:11: warning: unused variable 'j' [-Wunused-variable]
   19 |     int n,j,i,ans=0;
      |           ^
money.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    9 | #define scan1(a) scanf("%lld",&a);
      |                  ~~~~~^~~~~~~~~~~
money.cpp:20:5: note: in expansion of macro 'scan1'
   20 |     scan1(n)
      |     ^~~~~
money.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    9 | #define scan1(a) scanf("%lld",&a);
      |                  ~~~~~^~~~~~~~~~~
money.cpp:21:23: note: in expansion of macro 'scan1'
   21 |     for (i=1;i<=n;++i)scan1(q[i])
      |                       ^~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 492 KB Output is correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 492 KB Output is correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 492 KB Output is correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 492 KB Output is correct
2 Incorrect 1 ms 364 KB Output isn't correct
3 Halted 0 ms 0 KB -