結果
問題 | No.538 N.G.S. |
ユーザー | TumoiYorozu |
提出日時 | 2017-06-30 22:38:27 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 4,045 bytes |
コンパイル時間 | 1,189 ms |
コンパイル使用メモリ | 162,840 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-04 20:36:46 |
合計ジャッジ時間 | 2,402 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,816 KB |
testcase_01 | AC | 2 ms
6,820 KB |
testcase_02 | AC | 1 ms
6,820 KB |
testcase_03 | AC | 1 ms
6,820 KB |
testcase_04 | AC | 1 ms
6,820 KB |
testcase_05 | AC | 2 ms
6,820 KB |
testcase_06 | AC | 1 ms
6,816 KB |
testcase_07 | AC | 1 ms
6,816 KB |
testcase_08 | AC | 1 ms
6,816 KB |
testcase_09 | AC | 1 ms
6,816 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 1 ms
6,820 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 1 ms
6,820 KB |
testcase_17 | AC | 2 ms
6,820 KB |
testcase_18 | AC | 1 ms
6,820 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 1 ms
6,820 KB |
testcase_33 | AC | 1 ms
6,816 KB |
testcase_34 | AC | 1 ms
6,816 KB |
testcase_35 | AC | 1 ms
6,816 KB |
testcase_36 | AC | 1 ms
6,816 KB |
testcase_37 | AC | 1 ms
6,816 KB |
testcase_38 | AC | 2 ms
6,820 KB |
testcase_39 | AC | 1 ms
6,816 KB |
testcase_40 | AC | 2 ms
6,820 KB |
testcase_41 | AC | 1 ms
6,816 KB |
testcase_42 | AC | 1 ms
6,820 KB |
testcase_43 | AC | 1 ms
6,816 KB |
testcase_44 | AC | 1 ms
6,816 KB |
testcase_45 | AC | 2 ms
6,816 KB |
testcase_46 | WA | - |
testcase_47 | AC | 1 ms
6,816 KB |
testcase_48 | AC | 1 ms
6,820 KB |
testcase_49 | WA | - |
testcase_50 | AC | 1 ms
6,820 KB |
testcase_51 | AC | 1 ms
6,820 KB |
testcase_52 | AC | 1 ms
6,820 KB |
testcase_53 | AC | 1 ms
6,816 KB |
testcase_54 | WA | - |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:18:26: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 18 | #define SLL3(n,m,o) scanf("%lld %lld %lld",&n,&m,&o) | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:131:9: note: in expansion of macro ‘SLL3’ 131 | SLL3(x, y, z); | ^~~~
ソースコード
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define dprint(Exp,...) if(Exp){fprintf(stderr, __VA_ARGS__);} #define printe(...) fprintf(stderr, __VA_ARGS__); #define PrtExp(_Exp) cerr<< #_Exp <<" = "<< (_Exp) #define PrtExpN(_Exp) cerr<< #_Exp <<" = "<< (_Exp) <<"\n" #define SINT(n) scanf("%d",&n) #define SINT2(n,m) scanf("%d %d",&n,&m) #define SINT3(n,m,o) scanf("%d %d %d",&n,&m,&o) #define SINT4(n,m,o,p) scanf("%d %d %d %d",&n,&m,&o,&p) #define SINT5(n,m,o,p,q) scanf("%d %d %d %d %d",&n,&m,&o,&p,&q) #define SLL(n) scanf("%lld",&n) #define SLL2(n,m) scanf("%lld %lld",&n,&m) #define SLL3(n,m,o) scanf("%lld %lld %lld",&n,&m,&o) #define SST(s) scanf("%s",s) #define SCH(c) scanf("%c",&c) #define GC() getchar() #define PINT(n) printf("%d",(int)(n)) #define PINT2(n,m) printf("%d %d",(int)(n),(int)(m)) #define PINT3(n,m,l) printf("%d %d %d",(int)(n),(int)(m),(int)(l)) #define PLL(n) printf("%lld",(long long)(n)) #define PST(s) printf("%s",(s)) #define PCH(s) printf("%c",(s)) #define PINTN(n) printf("%d\n",(int)(n)) #define PINT2N(n,m) printf("%d %d\n",(int)(n),(int)(m)) #define PINT3N(n,m,l) printf("%d %d %d\n",(int)(n),(int)(m),(int)(l)) #define PLLN(n) printf("%lld\n",(long long)(n)) #define PSTN(s) printf("%s\n",(s)) #define PCHN(s) printf("%c\n",(s)) #define PSP() printf(" ") #define PN() printf("\n") #define PC(c) putchar(c) #define CSP (' ') #define SN ("\n") #define rep(i,a) for(int i=0;i<a;i++) #define reP(i,a) for(int i=0;i<=a;i++) #define Rep(i,a) for(int i=a-1;i>=0;i--) #define ReP(i,a) for(int i=a;i>=0;i--) #define rEp(i,a) for(i=0;i<a;i++) #define rEP(i,a) for(i=0;i<=a;i++) #define REp(i,a) for(i=a-1;i>=0;i--) #define REP(i,a) for(i=a;i>=0;i--) #define repft(i,a,b) for(int i=a;i<b;i++) #define repfT(i,a,b) for(int i=a;i<=b;i++) #define Repft(i,a,b) for(int i=a-1;i>=b;i--) #define RepfT(i,a,b) for(int i=a;i>=b;i--) #define foreach(a,it) for(auto it = a.begin(); it != a.end(); ++it) #define FILL(a,v) fill(begin(a),end(a), v) #define FILL0(a) memset(a,0,sizeof(a)) #define FILL1(a) memset(a,-1,sizeof(a)) typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> Pi; typedef pair<ll, ll> Pll; const int INF = 0x2aaaaaaa; // 715,827,882 const ll INFLL = 0x1f1f1f1f1f1f1f1fLL;//2,242,545,357,980,376,863 template <class A, class B> inline ostream& operator<<(ostream& st, const pair<A, B>& P) { return st << "(" << P.first << "," << P.second << ")"; }; template <class A, class B> inline pair<A, B> operator+(const pair<A, B>& P, const pair<A, B>& Q) { return pair<A, B>(P.first + Q.first, P.second + Q.second); }; template <class A, class B> inline pair<A, B> operator-(const pair<A, B>& P, const pair<A, B>& Q) { return pair<A, B>(P.first - Q.first, P.second - Q.second); }; #define fs first #define sc second typedef complex<double> P; const int N = 1210000; const int sqrtN = 1100; bool isprime[N + 1]; void sieve_of_atkin() { int n; for (int z = 1; z <= 5; z += 4) { for (int y = z; y <= sqrtN; y += 6) { for (int x = 1; x <= sqrtN && (n = 4 * x*x + y*y) <= N; ++x) isprime[n] = !isprime[n]; for (int x = y + 1; x <= sqrtN && (n = 3 * x*x - y*y) <= N; x += 2) isprime[n] = !isprime[n]; } } for (int z = 2; z <= 4; z += 2) { for (int y = z; y <= sqrtN; y += 6) { for (int x = 1; x <= sqrtN && (n = 3 * x*x + y*y) <= N; x += 2) isprime[n] = !isprime[n]; for (int x = y + 1; x <= sqrtN && (n = 3 * x*x - y*y) <= N; x += 2) isprime[n] = !isprime[n]; } } for (int y = 3; y <= sqrtN; y += 6) { for (int z = 1; z <= 2; ++z) { for (int x = z; x <= sqrtN && (n = 4 * x*x + y*y) <= N; x += 3) isprime[n] = !isprime[n]; } } for (int n = 5; n <= sqrtN; ++n) if (isprime[n]) for (int k = n*n; k <= N; k += n*n) isprime[k] = false; isprime[2] = isprime[3] = true; } set<string> ret; int main() { ll x, y, z; SLL3(x, y, z); double r = (double)(z - y) / (y - x); double d = y - r*x; //PrtExpN(r); //PrtExpN(d); double ret = z*r + d; cout << ret << endl; }