結果

問題 No.456 Millions of Submits!
ユーザー むらためむらため
提出日時 2017-08-18 10:04:43
言語 Nim
(2.0.2)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 813 bytes
コンパイル時間 6,884 ms
コンパイル使用メモリ 75,020 KB
実行使用メモリ 5,068 KB
最終ジャッジ日時 2023-09-12 14:52:42
合計ジャッジ時間 7,773 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 17) Warning: imported and not used: 'strutils' [UnusedImport]

ソースコード

diff #

import sequtils,strutils,osproc;const p = @[ """echo '

#include<stdio.h>
#include<math.h>

double calc(int a,int b,double t){
  if(a==0) return exp(pow(t,(double)1/b));
  if(b==0) return pow(t,(double)1/a);
  double x=log(11);
  for(int i=0;i<10;i++){
    double f=a*exp(x)+b*x-log(t);
    double g=a*exp(x)+b;
    x-=f/g;
  }
  return exp(exp(x));
}

int A[1000000],B[1000000];
double T[1000000],ANS[1000000];
int main(){
  int m;
  scanf("%d",&m);
  for(int i=0;i<m;i++) scanf("%d%d%lf",&A[i],&B[i],&T[i]);
  #pragma omp parallel for
  for(int i=0;i<m;i++){
     ANS[i]=calc(A[i],B[i],T[i]);
  }
  for(int i=0;i<m;i++) printf("%.9lf\n",ANS[i]);
}

' > hoge.cpp""","g++ -fopenmp hoge.cpp -o b.out"].mapIt(it.gorge)
discard execProcess("""a="$(ls -1t ../time/ | head -1)";./b.out < ../test_in/$a > ../out/$a """)
0